Sha256: a9e22a2b26d5925aaa4d9da7dcdab93fd74c9852b2f88ad825a817e9a2bdf356

Contents?: true

Size: 883 Bytes

Versions: 13

Compression:

Stored size: 883 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module Budgets
    # Custom helpers, scoped to the budgets engine.
    #
    module ApplicationHelper
      include PaginateHelper
      include Decidim::Comments::CommentsHelper
      include ProjectsHelper
      include Decidim::CheckBoxesTreeHelper

      def filter_status_values
        TreeNode.new(
          TreePoint.new("", t("decidim.budgets.projects.filters.status_values.all")),
          [
            TreePoint.new("selected", t("decidim.budgets.projects.filters.status_values.selected")),
            TreePoint.new("not_selected", t("decidim.budgets.projects.filters.status_values.not_selected"))
          ]
        )
      end

      def component_name
        (defined?(current_component) && translated_attribute(current_component&.name).presence) || t("decidim.components.budgets.name")
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
decidim-budgets-0.29.1 app/helpers/decidim/budgets/application_helper.rb
decidim-budgets-0.28.4 app/helpers/decidim/budgets/application_helper.rb
decidim-budgets-0.29.0 app/helpers/decidim/budgets/application_helper.rb
decidim-budgets-0.28.3 app/helpers/decidim/budgets/application_helper.rb
decidim-budgets-0.29.0.rc4 app/helpers/decidim/budgets/application_helper.rb
decidim-budgets-0.29.0.rc3 app/helpers/decidim/budgets/application_helper.rb
decidim-budgets-0.29.0.rc2 app/helpers/decidim/budgets/application_helper.rb
decidim-budgets-0.29.0.rc1 app/helpers/decidim/budgets/application_helper.rb
decidim-budgets-0.28.2 app/helpers/decidim/budgets/application_helper.rb
decidim-budgets-0.28.1 app/helpers/decidim/budgets/application_helper.rb
decidim-budgets-0.28.0 app/helpers/decidim/budgets/application_helper.rb
decidim-budgets-0.28.0.rc5 app/helpers/decidim/budgets/application_helper.rb
decidim-budgets-0.28.0.rc4 app/helpers/decidim/budgets/application_helper.rb