app/helpers/decidim/elections/application_helper.rb in decidim-elections-0.22.0 vs app/helpers/decidim/elections/application_helper.rb in decidim-elections-0.23.0
- old
+ new
@@ -3,8 +3,20 @@
module Decidim
module Elections
# Custom helpers, scoped to the elections engine.
#
module ApplicationHelper
+ include Decidim::CheckBoxesTreeHelper
+
+ 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
end
end
end