Module: Decidim::Proposals::CollaborativeDraftHelper

Included in:
ApplicationHelper
Defined in:
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 '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

#collaborative_drafts_states_collectionObject



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

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

#reject_request_button_labelObject



24
25
26
# File '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