Sha256: 6fad0c587710115912d4a561a4943baee272dbb96d9703abac6ba174ce8e983f
Contents?: true
Size: 986 Bytes
Versions: 8
Compression:
Stored size: 986 Bytes
Contents
# frozen_string_literal: true module Decidim module Elections module Admin # Custom helpers for trustees admin. # module TrusteesParticipatorySpacesHelper include Decidim::PaginateHelper def trustee_current_participatory_space(trustee) trustee.trustees_participatory_spaces.find_by(participatory_space: current_participatory_space) end def considered_icon_action_for(trustee) if trustee_current_participatory_space(trustee).considered "close-line" else "check-line" end end def considered_label_action_for(trustee) if trustee_current_participatory_space(trustee).considered t("trustees_participatory_spaces.actions.disable", scope: "decidim.elections.admin") else t("trustees_participatory_spaces.actions.enable", scope: "decidim.elections.admin") end end end end end end
Version data entries
8 entries across 8 versions & 1 rubygems