Class: Decidim::ParticipatoryProcessGroups::ContentBlocks::TitleCell
- Inherits:
-
ViewModel
- Object
- ViewModel
- Decidim::ParticipatoryProcessGroups::ContentBlocks::TitleCell
show all
- Includes:
- IconHelper, SanitizeHelper, TwitterSearchHelper
- Defined in:
- decidim-participatory_processes/app/cells/decidim/participatory_process_groups/content_blocks/title_cell.rb
Constant Summary
Constants included
from IconHelper
IconHelper::DEFAULT_RESOURCE_TYPE_ICONS
Instance Method Summary
collapse
Methods included from IconHelper
#component_icon, #manifest_icon, #resource_icon, #resource_type_icon, #resource_type_icon_key
Instance Method Details
#decidim_participatory_processes ⇒ Object
41
42
43
|
# File 'decidim-participatory_processes/app/cells/decidim/participatory_process_groups/content_blocks/title_cell.rb', line 41
def decidim_participatory_processes
Decidim::ParticipatoryProcesses::Engine.routes.url_helpers
end
|
#group_url_text ⇒ Object
37
38
39
|
# File 'decidim-participatory_processes/app/cells/decidim/participatory_process_groups/content_blocks/title_cell.rb', line 37
def group_url_text
group_uri.host + group_uri.path
end
|
#has_group_url? ⇒ Boolean
25
26
27
|
# File 'decidim-participatory_processes/app/cells/decidim/participatory_process_groups/content_blocks/title_cell.rb', line 25
def has_group_url?
group_url.present?
end
|
#has_hashtag? ⇒ Boolean
21
22
23
|
# File 'decidim-participatory_processes/app/cells/decidim/participatory_process_groups/content_blocks/title_cell.rb', line 21
def has_hashtag?
hashtag_text.present?
end
|
33
34
35
|
# File 'decidim-participatory_processes/app/cells/decidim/participatory_process_groups/content_blocks/title_cell.rb', line 33
def has_meta_scope?
meta_scope.present?
end
|
#hashtag_text ⇒ Object
17
18
19
|
# File 'decidim-participatory_processes/app/cells/decidim/participatory_process_groups/content_blocks/title_cell.rb', line 17
def hashtag_text
@hashtag_text ||= decidim_html_escape(participatory_process_group.hashtag || "")
end
|
29
30
31
|
# File 'decidim-participatory_processes/app/cells/decidim/participatory_process_groups/content_blocks/title_cell.rb', line 29
def meta_scope
@meta_scope ||= translated_attribute(participatory_process_group.meta_scope)
end
|
#participatory_process_group ⇒ Object
13
14
15
|
# File 'decidim-participatory_processes/app/cells/decidim/participatory_process_groups/content_blocks/title_cell.rb', line 13
def participatory_process_group
@participatory_process_group ||= Decidim::ParticipatoryProcessGroup.find(model.scoped_resource_id)
end
|
#participatory_processes_count ⇒ Object
45
46
47
|
# File 'decidim-participatory_processes/app/cells/decidim/participatory_process_groups/content_blocks/title_cell.rb', line 45
def participatory_processes_count
@participatory_processes_count ||= processes.count
end
|