Module: Decidim::Proposals::CollaborativeDraftHelper

Included in:
ApplicationHelper
Defined in:
decidim-proposals/app/helpers/decidim/proposals/collaborative_draft_helper.rb

Overview

Custom helpers, scoped to the collaborative_draft resource.

Instance Method Summary collapse

Instance Method Details

#accept_request_button_labelObject


20
21
22
# File 'decidim-proposals/app/helpers/decidim/proposals/collaborative_draft_helper.rb', line 20

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

#filter_collaborative_drafts_state_valuesObject


8
9
10
11
12
13
14
15
16
17
18
# File 'decidim-proposals/app/helpers/decidim/proposals/collaborative_draft_helper.rb', line 8

def filter_collaborative_drafts_state_values
  scope = "decidim.proposals.collaborative_drafts.filters"
  Decidim::CheckBoxesTreeHelper::TreeNode.new(
    Decidim::CheckBoxesTreeHelper::TreePoint.new("", t("all", scope: scope)),
    [
      Decidim::CheckBoxesTreeHelper::TreePoint.new("open", t("open", scope: scope)),
      Decidim::CheckBoxesTreeHelper::TreePoint.new("withdrawn", t("withdrawn", scope: scope)),
      Decidim::CheckBoxesTreeHelper::TreePoint.new("published", t("published", scope: scope))
    ]
  )
end

#reject_request_button_labelObject


24
25
26
# File 'decidim-proposals/app/helpers/decidim/proposals/collaborative_draft_helper.rb', line 24

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