Module: Decidim::Admin::DashboardHelper

Defined in:
decidim-admin/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 service.

Instance Method Summary collapse

Instance Method Details

#admin_terms_announcement_argsObject



7
8
9
10
11
12
# File 'decidim-admin/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 'decidim-admin/app/helpers/decidim/admin/dashboard_helper.rb', line 14

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