6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
# File 'lib/decidim/templates/menu.rb', line 6
def self.
Decidim. :admin_template_types_menu do ||
.add_item :questionnaires,
I18n.t("template_types.questionnaires", scope: "decidim.templates"),
decidim_admin_templates.questionnaire_templates_path,
icon_name: "clipboard-line",
if: allowed_to?(:index, :templates),
active: (
is_active_link?(decidim_admin_templates.questionnaire_templates_path) ||
is_active_link?(decidim_admin_templates.root_path)
) && !is_active_link?(decidim_admin_templates.block_user_templates_path) &&
!is_active_link?(decidim_admin_templates.proposal_answer_templates_path)
.add_item :user_reports,
I18n.t("template_types.block_user", scope: "decidim.templates"),
decidim_admin_templates.block_user_templates_path,
icon_name: "user-forbid-line",
if: allowed_to?(:index, :templates),
active: is_active_link?(decidim_admin_templates.block_user_templates_path)
.add_item :proposal_answers,
I18n.t("template_types.proposal_answer_templates", scope: "decidim.templates"),
decidim_admin_templates.proposal_answer_templates_path,
icon_name: "file-copy-line",
if: allowed_to?(:index, :templates),
active: is_active_link?(decidim_admin_templates.proposal_answer_templates_path)
end
end
|