From 2c75cf85991bd0c22eaabe4ccd3bfb658ec59d32 Mon Sep 17 00:00:00 2001 From: Michael Stanclift Date: Wed, 22 May 2024 04:05:33 -0500 Subject: [PATCH] Add "Warning preset" link to admin navigation (#26199) --- config/locales/en-GB.yml | 2 +- config/locales/en.yml | 2 +- config/navigation.rb | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/config/locales/en-GB.yml b/config/locales/en-GB.yml index 7e31080dfa..7cd888b373 100644 --- a/config/locales/en-GB.yml +++ b/config/locales/en-GB.yml @@ -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 diff --git a/config/locales/en.yml b/config/locales/en.yml index d3704bbbcf..43aa8481c6 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -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 diff --git a/config/navigation.rb b/config/navigation.rb index efac96d46e..c1dd81501c 100644 --- a/config/navigation.rb +++ b/config/navigation.rb @@ -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) }