Class: Decidim::Meetings::MeetingMCell
Overview
This cell renders the Medium (:m) meeting card for an given instance of a Meeting
Instance Method Summary
collapse
#default_locale?
Methods inherited from CardMCell
#show
Methods included from CardHelper
#card_for
Instance Method Details
#address ⇒ Object
22
23
24
|
# File 'decidim-meetings/app/cells/decidim/meetings/meeting_m_cell.rb', line 22
def address
decidim_html_escape(render)
end
|
#badge ⇒ Object
34
35
36
|
# File 'decidim-meetings/app/cells/decidim/meetings/meeting_m_cell.rb', line 34
def badge
render if has_badge?
end
|
#date ⇒ Object
18
19
20
|
# File 'decidim-meetings/app/cells/decidim/meetings/meeting_m_cell.rb', line 18
def date
render
end
|
#description ⇒ Object
30
31
32
|
# File 'decidim-meetings/app/cells/decidim/meetings/meeting_m_cell.rb', line 30
def description
present(model).description(strip_tags: true).truncate(120, separator: /\s/)
end
|
#has_authors? ⇒ Boolean
10
11
12
|
# File 'decidim-meetings/app/cells/decidim/meetings/meeting_m_cell.rb', line 10
def has_authors?
true
end
|
#has_badge? ⇒ Boolean
38
39
40
|
# File 'decidim-meetings/app/cells/decidim/meetings/meeting_m_cell.rb', line 38
def has_badge?
withdrawn?
end
|
#render_authorship ⇒ Object
14
15
16
|
# File 'decidim-meetings/app/cells/decidim/meetings/meeting_m_cell.rb', line 14
def render_authorship
cell "decidim/author", author_presenter_for(model.normalized_author)
end
|
#state_classes ⇒ Object
42
43
44
|
# File 'decidim-meetings/app/cells/decidim/meetings/meeting_m_cell.rb', line 42
def state_classes
["alert"]
end
|
#title ⇒ Object
26
27
28
|
# File 'decidim-meetings/app/cells/decidim/meetings/meeting_m_cell.rb', line 26
def title
present(model).title(html_escape: true)
end
|