Class: Decidim::ParticipatoryProcessGroups::ContentBlocks::TitleCell
- Inherits:
-
ViewModel
- Object
- ViewModel
- Decidim::ParticipatoryProcessGroups::ContentBlocks::TitleCell
- Includes:
- IconHelper, SanitizeHelper
- Defined in:
- app/cells/decidim/participatory_process_groups/content_blocks/title_cell.rb
Instance Method Summary collapse
- #decidim_participatory_processes ⇒ Object
- #group_url_text ⇒ Object
- #has_group_url? ⇒ Boolean
- #has_hashtag? ⇒ Boolean
- #has_meta_scope? ⇒ Boolean
- #hashtag_text ⇒ Object
- #meta_scope ⇒ Object
- #participatory_process_group ⇒ Object
- #participatory_processes_count ⇒ Object
Instance Method Details
#decidim_participatory_processes ⇒ Object
40 41 42 |
# File 'app/cells/decidim/participatory_process_groups/content_blocks/title_cell.rb', line 40 def decidim_participatory_processes Decidim::ParticipatoryProcesses::Engine.routes.url_helpers end |
#group_url_text ⇒ Object
36 37 38 |
# File 'app/cells/decidim/participatory_process_groups/content_blocks/title_cell.rb', line 36 def group_url_text group_uri.host + group_uri.path end |
#has_group_url? ⇒ Boolean
24 25 26 |
# File 'app/cells/decidim/participatory_process_groups/content_blocks/title_cell.rb', line 24 def has_group_url? group_url.present? end |
#has_hashtag? ⇒ Boolean
20 21 22 |
# File 'app/cells/decidim/participatory_process_groups/content_blocks/title_cell.rb', line 20 def has_hashtag? hashtag_text.present? end |
#has_meta_scope? ⇒ Boolean
32 33 34 |
# File 'app/cells/decidim/participatory_process_groups/content_blocks/title_cell.rb', line 32 def .present? end |
#hashtag_text ⇒ Object
16 17 18 |
# File 'app/cells/decidim/participatory_process_groups/content_blocks/title_cell.rb', line 16 def hashtag_text @hashtag_text ||= decidim_html_escape(participatory_process_group.hashtag || "") end |
#meta_scope ⇒ Object
28 29 30 |
# File 'app/cells/decidim/participatory_process_groups/content_blocks/title_cell.rb', line 28 def @meta_scope ||= translated_attribute(participatory_process_group.) end |
#participatory_process_group ⇒ Object
12 13 14 |
# File 'app/cells/decidim/participatory_process_groups/content_blocks/title_cell.rb', line 12 def participatory_process_group @participatory_process_group ||= Decidim::ParticipatoryProcessGroup.find(model.scoped_resource_id) end |
#participatory_processes_count ⇒ Object
44 45 46 |
# File 'app/cells/decidim/participatory_process_groups/content_blocks/title_cell.rb', line 44 def participatory_processes_count @participatory_processes_count ||= participatory_process_group.participatory_processes.count end |