Module: Decidim::Elections::ApplicationHelper

Includes:
CheckBoxesTreeHelper
Defined in:
decidim-elections/app/helpers/decidim/elections/application_helper.rb

Overview

Custom helpers, scoped to the elections engine.

Instance Method Summary collapse

Methods included from CheckBoxesTreeHelper

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

Instance Method Details

#state_filter_valuesObject


10
11
12
13
14
15
16
17
18
19
# File 'decidim-elections/app/helpers/decidim/elections/application_helper.rb', line 10

def state_filter_values
  TreeNode.new(
    TreePoint.new("", t("elections.elections.filters.all", scope: "decidim")),
    [
      TreePoint.new("active", t("elections.elections.filters.active", scope: "decidim")),
      TreePoint.new("upcoming", t("elections.elections.filters.upcoming", scope: "decidim")),
      TreePoint.new("finished", t("elections.elections.filters.finished", scope: "decidim"))
    ]
  )
end