Class: Decidim::Meetings::MeetingMCell
- Inherits:
-
CardMCell
- Object
- CardMCell
- Decidim::Meetings::MeetingMCell
show all
- Includes:
- MeetingCellsHelper
- Defined in:
- app/cells/decidim/meetings/meeting_m_cell.rb
Overview
This cell renders the Medium (:m) meeting card for an given instance of a Meeting
Instance Method Summary
collapse
#author_presenter_for, #calculate_start_and_end_time_of_agenda_items, #current_user_groups?, #display_duration_agenda_items, #google_calendar_event_url, #meeting_description, #meeting_type_badge_css_class, #registration_code_help_text, #validation_state_for
#activity_filter_values, #filter_date_values, #filter_origin_values, #filter_type_values, #iframe_embed_or_live_event_page?, #online_or_hybrid_meeting?, #prevent_timeout_seconds, #render_meeting_body, #safe_content?
Methods included from MapHelper
#meetings_data_for_map
Instance Method Details
#address ⇒ Object
22
23
24
|
# File 'app/cells/decidim/meetings/meeting_m_cell.rb', line 22
def address
decidim_html_escape(render)
end
|
#badge ⇒ Object
34
35
36
|
# File 'app/cells/decidim/meetings/meeting_m_cell.rb', line 34
def badge
render if has_badge?
end
|
#date ⇒ Object
18
19
20
|
# File 'app/cells/decidim/meetings/meeting_m_cell.rb', line 18
def date
render
end
|
#description ⇒ Object
30
31
32
|
# File '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 'app/cells/decidim/meetings/meeting_m_cell.rb', line 10
def has_authors?
true
end
|
#has_badge? ⇒ Boolean
38
39
40
|
# File 'app/cells/decidim/meetings/meeting_m_cell.rb', line 38
def has_badge?
withdrawn?
end
|
#render_authorship ⇒ Object
14
15
16
|
# File '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 'app/cells/decidim/meetings/meeting_m_cell.rb', line 42
def state_classes
["alert"]
end
|
#title ⇒ Object
26
27
28
|
# File 'app/cells/decidim/meetings/meeting_m_cell.rb', line 26
def title
present(model).title
end
|