Sha256: 870f577bedf3d1bed633d4d2e464c2de2c19fc73e1a7cc347598031b3ab0d6ee

Contents?: true

Size: 998 Bytes

Versions: 18

Compression:

Stored size: 998 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module Proposals
    # Custom helpers, scoped to the collaborative_draft resource.
    #
    module CollaborativeDraftHelper
      def collaborative_drafts_states_collection
        scope = "decidim.proposals.collaborative_drafts.filters"
        @collaborative_drafts_states_collection ||= begin
          collection = []
          collection << ["all", t("all", scope: scope)]
          collection << ["open", t("open", scope: scope)]
          collection << ["withdrawn", t("withdrawn", scope: scope)]
          collection << ["published", t("published", scope: scope)]
          collection
        end
      end

      def accept_request_button_label
        t("accept_request", scope: "decidim.proposals.collaborative_drafts.requests.collaboration_requests")
      end

      def reject_request_button_label
        t("reject_request", scope: "decidim.proposals.collaborative_drafts.requests.collaboration_requests")
      end
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
decidim-proposals-0.20.1 app/helpers/decidim/proposals/collaborative_draft_helper.rb
decidim-proposals-0.20.0 app/helpers/decidim/proposals/collaborative_draft_helper.rb
decidim-proposals-0.19.1 app/helpers/decidim/proposals/collaborative_draft_helper.rb
decidim-proposals-0.18.1 app/helpers/decidim/proposals/collaborative_draft_helper.rb
decidim-proposals-0.19.0 app/helpers/decidim/proposals/collaborative_draft_helper.rb
decidim-proposals-0.17.2 app/helpers/decidim/proposals/collaborative_draft_helper.rb
decidim-proposals-0.18.0 app/helpers/decidim/proposals/collaborative_draft_helper.rb
decidim-proposals-0.17.1 app/helpers/decidim/proposals/collaborative_draft_helper.rb
decidim-proposals-0.16.1 app/helpers/decidim/proposals/collaborative_draft_helper.rb
decidim-proposals-0.17.0 app/helpers/decidim/proposals/collaborative_draft_helper.rb
decidim-proposals-0.16.0 app/helpers/decidim/proposals/collaborative_draft_helper.rb
decidim-proposals-0.15.2 app/helpers/decidim/proposals/collaborative_draft_helper.rb
decidim-proposals-0.15.1 app/helpers/decidim/proposals/collaborative_draft_helper.rb
decidim-proposals-0.15.0 app/helpers/decidim/proposals/collaborative_draft_helper.rb
decidim-proposals-0.14.4 app/helpers/decidim/proposals/collaborative_draft_helper.rb
decidim-proposals-0.14.3 app/helpers/decidim/proposals/collaborative_draft_helper.rb
decidim-proposals-0.14.2 app/helpers/decidim/proposals/collaborative_draft_helper.rb
decidim-proposals-0.14.1 app/helpers/decidim/proposals/collaborative_draft_helper.rb