Module: Decidim::Admin::DashboardHelper

Defined in:
app/helpers/decidim/admin/dashboard_helper.rb

Overview

This module includes helpers to be used in the admin dashboard, including helper methods to show the Admin Terms of Use.

Instance Method Summary collapse

Instance Method Details

#admin_terms_announcement_argsObject



7
8
9
10
11
12
# File 'app/helpers/decidim/admin/dashboard_helper.rb', line 7

def admin_terms_announcement_args
  {
    callout_class: "warning",
    announcement: announcement_body
  }
end

#announcement_bodyObject



14
15
16
17
18
19
20
21
22
# File 'app/helpers/decidim/admin/dashboard_helper.rb', line 14

def announcement_body
  body = t("required_review.callout", scope: "decidim.admin.admin_terms_of_use")
  body += " "
  body += link_to(
    t("required_review.cta", scope: "decidim.admin.admin_terms_of_use"),
    admin_terms_show_path
  )
  body
end