Module: Decidim::Meetings::ApplicationHelper

Includes:
CheckBoxesTreeHelper, Comments::CommentsHelper, Decidim::MapHelper, MapHelper, MeetingsHelper, PaginateHelper, SanitizeHelper
Included in:
PublicParticipantsListCell
Defined in:
decidim-meetings/app/helpers/decidim/meetings/application_helper.rb

Overview

Custom helpers, scoped to the meetings engine.

Instance Method Summary collapse

Methods included from CheckBoxesTreeHelper

#check_boxes_tree_options, #filter_categories_values, #filter_scopes_values, #filter_scopes_values_from, #filter_scopes_values_from_parent, #filter_tree_from, #resource_filter_scope_values, #scope_children_to_tree

Methods included from SanitizeHelper

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

Methods included from Comments::CommentsHelper

#comments_for, #inline_comments_for

Methods included from MeetingsHelper

#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

Methods included from ResourceHelper

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

Methods included from TranslationsHelper

empty_translatable, ensure_translatable, multi_translation, translated_in_current_locale?

Methods included from TranslatableAttributes

#default_locale?

Methods included from ApplicationHelper

#cell, #edit_link, #extra_admin_link, #html_truncate, #present, #resolve_presenter_class, #step_cta_url

Methods included from CacheHelper

#cache

Methods included from AmendmentsHelper

#accept_and_reject_buttons_for, #action_button_card_for, #allowed_to_accept_and_reject?, #allowed_to_promote?, #amend_button_for, #amenders_list_for, #amendments_enabled?, #amendments_for, #amendments_form_field_for, #amendments_form_fields_label, #amendments_form_fields_value, #can_participate_in_private_space?, #can_react_to_emendation?, #emendation_actions_for, #emendation_announcement_for, #promote_button_for, #render_emendation_body

Methods included from RichTextEditorHelper

included, #text_editor_for

Methods included from ContextualHelpHelper

#floating_help

Methods included from ScopesHelper

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

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 OmniauthHelper

#normalize_provider_name, #oauth_icon, #provider_name

Methods included from MapHelper

#meetings_data_for_map

Methods included from Decidim::MapHelper

#dynamic_map_for, #static_map_link

Methods included from PaginateHelper

#decidim_paginate

Instance Method Details

#activity_filter_valuesObject

Options to filter meetings by activity.


54
55
56
57
58
59
# File 'decidim-meetings/app/helpers/decidim/meetings/application_helper.rb', line 54

def activity_filter_values
  [
    ["all", t("decidim.meetings.meetings.filters.all")],
    ["my_meetings", t("decidim.meetings.meetings.filters.my_meetings")]
  ]
end

#filter_date_valuesObject


43
44
45
46
47
48
49
50
51
# File 'decidim-meetings/app/helpers/decidim/meetings/application_helper.rb', line 43

def filter_date_values
  TreeNode.new(
    TreePoint.new("", t("decidim.meetings.meetings.filters.date_values.all")),
    [
      TreePoint.new("upcoming", t("decidim.meetings.meetings.filters.date_values.upcoming")),
      TreePoint.new("past", t("decidim.meetings.meetings.filters.date_values.past"))
    ]
  )
end

#filter_origin_valuesObject


16
17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'decidim-meetings/app/helpers/decidim/meetings/application_helper.rb', line 16

def filter_origin_values
  origin_values = []
  origin_values << TreePoint.new("official", t("decidim.meetings.meetings.filters.origin_values.official"))
  origin_values << TreePoint.new("citizens", t("decidim.meetings.meetings.filters.origin_values.citizens")) # todo
  if current_organization.user_groups_enabled?
    origin_values << TreePoint.new("user_group", t("decidim.meetings.meetings.filters.origin_values.user_groups")) # todo
  end
  # if current_organization.user_groups_enabled? and component_settings enabled enabled

  TreeNode.new(
    TreePoint.new("", t("decidim.meetings.meetings.filters.origin_values.all")),
    origin_values
  )
end

#filter_type_valuesObject


31
32
33
34
35
36
37
38
39
40
41
# File 'decidim-meetings/app/helpers/decidim/meetings/application_helper.rb', line 31

def filter_type_values
  type_values = []
  Decidim::Meetings::Meeting::TYPE_OF_MEETING.each do |type|
    type_values << TreePoint.new(type, t("decidim.meetings.meetings.filters.type_values.#{type}"))
  end

  TreeNode.new(
    TreePoint.new("", t("decidim.meetings.meetings.filters.type_values.all")),
    type_values
  )
end