Add "Warning preset" link to admin navigation (#26199)

This commit is contained in:
Michael Stanclift 2024-05-22 04:05:33 -05:00 committed by GitHub
parent a2b4c29c8f
commit 2c75cf8599
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 3 additions and 2 deletions

View file

@ -950,7 +950,7 @@ en-GB:
delete: Delete
edit_preset: Edit warning preset
empty: You haven't defined any warning presets yet.
title: Manage warning presets
title: Warning presets
webhooks:
add_new: Add endpoint
delete: Delete

View file

@ -951,7 +951,7 @@ en:
delete: Delete
edit_preset: Edit warning preset
empty: You haven't defined any warning presets yet.
title: Manage warning presets
title: Warning presets
webhooks:
add_new: Add endpoint
delete: Delete

View file

@ -59,6 +59,7 @@ SimpleNavigation::Configuration.run do |navigation|
s.item :dashboard, safe_join([fa_icon('tachometer fw'), t('admin.dashboard.title')]), admin_dashboard_path, if: -> { current_user.can?(:view_dashboard) }
s.item :settings, safe_join([fa_icon('cogs fw'), t('admin.settings.title')]), admin_settings_path, if: -> { current_user.can?(:manage_settings) }, highlights_on: %r{/admin/settings}
s.item :rules, safe_join([fa_icon('gavel fw'), t('admin.rules.title')]), admin_rules_path, highlights_on: %r{/admin/rules}, if: -> { current_user.can?(:manage_rules) }
s.item :warning_presets, safe_join([fa_icon('warning fw'), t('admin.warning_presets.title')]), admin_warning_presets_path, highlights_on: %r{/admin/warning_presets}, if: -> { current_user.can?(:manage_settings) }
s.item :roles, safe_join([fa_icon('vcard fw'), t('admin.roles.title')]), admin_roles_path, highlights_on: %r{/admin/roles}, if: -> { current_user.can?(:manage_roles) }
s.item :announcements, safe_join([fa_icon('bullhorn fw'), t('admin.announcements.title')]), admin_announcements_path, highlights_on: %r{/admin/announcements}, if: -> { current_user.can?(:manage_announcements) }
s.item :custom_emojis, safe_join([fa_icon('smile-o fw'), t('admin.custom_emojis.title')]), admin_custom_emojis_path, highlights_on: %r{/admin/custom_emojis}, if: -> { current_user.can?(:manage_custom_emojis) }