Class: Decidim::ParticipatoryProcessGroups::ContentBlocks::TitleCell

Inherits:
ViewModel
  • Object
show all
Includes:
IconHelper, SanitizeHelper
Defined in:
decidim-participatory_processes/app/cells/decidim/participatory_process_groups/content_blocks/title_cell.rb

Instance Method Summary collapse

Methods included from IconHelper

#component_icon, #manifest_icon, #resource_icon

Methods included from LayoutHelper

#_icon_classes, #extended_navigation_bar, #external_icon, #favicon, #icon, #organization_colors, #role

Methods included from SanitizeHelper

#decidim_html_escape, #decidim_sanitize, #decidim_sanitize_newsletter, #decidim_url_escape, included

Methods inherited from ViewModel

#call, #current_user

Methods included from FilterParamsHelper

#filter_link_params

Methods included from MarkupHelper

#element_id

Methods included from ReplaceButtonsHelper

#button_to, #submit_tag

Methods included from ActionAuthorizationHelper

#action_authorized_button_to, #action_authorized_link_to, #logged_button_to, #logged_link_to

Methods included from ScopesHelper

#has_visible_scopes?, #scope_name_for_picker, #scopes_picker_field, #scopes_picker_filter, #scopes_picker_tag

Methods included from TranslatableAttributes

#default_locale?

Methods included from DecidimFormHelper

#areas_for_select, #base_error_messages, #decidim_form_for, #decidim_form_slug_url, #editor_field_tag, #form_field_has_error?, #form_required_explanation, #name_with_locale, #scopes_picker_field_tag, #tab_element_class_for, #translated_field_tag

Methods included from ResourceHelper

#linked_classes_filter_values_for, #linked_classes_for, #linked_resources_for, #resource_locator, #resource_title

Instance Method Details

#decidim_participatory_processesObject


40
41
42
# File 'decidim-participatory_processes/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_textObject


36
37
38
# File 'decidim-participatory_processes/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

Returns:

  • (Boolean)

24
25
26
# File 'decidim-participatory_processes/app/cells/decidim/participatory_process_groups/content_blocks/title_cell.rb', line 24

def has_group_url?
  group_url.present?
end

#has_hashtag?Boolean

Returns:

  • (Boolean)

20
21
22
# File 'decidim-participatory_processes/app/cells/decidim/participatory_process_groups/content_blocks/title_cell.rb', line 20

def has_hashtag?
  hashtag_text.present?
end

#has_meta_scope?Boolean

Returns:

  • (Boolean)

32
33
34
# File 'decidim-participatory_processes/app/cells/decidim/participatory_process_groups/content_blocks/title_cell.rb', line 32

def has_meta_scope?
  meta_scope.present?
end

#hashtag_textObject


16
17
18
# File 'decidim-participatory_processes/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_scopeObject


28
29
30
# File 'decidim-participatory_processes/app/cells/decidim/participatory_process_groups/content_blocks/title_cell.rb', line 28

def meta_scope
  @meta_scope ||= translated_attribute(participatory_process_group.meta_scope)
end

#participatory_process_groupObject


12
13
14
# File 'decidim-participatory_processes/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_countObject


44
45
46
# File 'decidim-participatory_processes/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