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

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

Instance Method Summary collapse

Methods included from TwitterSearchHelper

#twitter_hashtag_url

Methods included from IconHelper

#component_icon, #manifest_icon, #resource_icon

Methods included from LayoutHelper

#_icon_classes, #apple_favicon, #application_path, #extended_navigation_bar, #external_icon, #favicon, #icon, #legacy_favicon, #organization_colors, #role

Methods included from SanitizeHelper

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

Methods inherited from ViewModel

#call, #current_user

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


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_textObject


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

Returns:

  • (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

Returns:

  • (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

#has_meta_scope?Boolean

Returns:

  • (Boolean)

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_textObject


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

#meta_scopeObject


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_groupObject


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_countObject


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 ||= participatory_process_group.participatory_processes.count
end