Add link to admin dashboard to profile dropdown

This commit is contained in:
Andreas Nedbal 2022-11-20 18:01:00 +01:00 committed by Andreas Nedbal
parent d0654d7d9d
commit 6d462cbd1b
1 changed files with 4 additions and 14 deletions

View File

@ -7,20 +7,6 @@
%i.fa.fa-fw.fa-cog %i.fa.fa-fw.fa-cog
= t(".settings") = t(".settings")
.dropdown-divider .dropdown-divider
- if current_user.has_role?(:administrator)
%a.dropdown-item{ href: rails_admin_path }
%i.fa.fa-fw.fa-cogs
= t(".admin")
%a.dropdown-item{ href: sidekiq_web_path }
%i.fa.fa-fw.fa-bar-chart
= t(".sidekiq")
%a.dropdown-item{ href: pghero_path }
%i.fa.fa-fw.fa-database
= t(".pghero")
%a.dropdown-item{ href: announcement_index_path }
%i.fa.fa-fw.fa-info
= t(".announcements")
.dropdown-divider
- if current_user.mod? - if current_user.mod?
- if moderation_view? - if moderation_view?
= link_to moderation_toggle_unmask_path, class: "dropdown-item", data: { turbo_method: :post } do = link_to moderation_toggle_unmask_path, class: "dropdown-item", data: { turbo_method: :post } do
@ -36,6 +22,10 @@
%a.dropdown-item{ href: moderation_reports_path } %a.dropdown-item{ href: moderation_reports_path }
%i.fa.fa-fw.fa-gavel %i.fa.fa-fw.fa-gavel
= t(".moderation") = t(".moderation")
- if current_user.has_role?(:administrator)
%a.dropdown-item{ href: admin_dashboard_path }
%i.fa.fa-fw.fa-cogs
= t(".admin")
.dropdown-divider .dropdown-divider
- if APP_CONFIG["canny"] - if APP_CONFIG["canny"]
%h6.dropdown-header.d-none.d-sm-block %h6.dropdown-header.d-none.d-sm-block