From c8060892f6ab8228d5503251dbbefb08a61b8c87 Mon Sep 17 00:00:00 2001 From: Claire Date: Mon, 21 Aug 2023 19:18:12 +0200 Subject: [PATCH] Change admin e-mail notification settins to be their own settings group --- .../preferences/notifications/show.html.haml | 13 +++++++++---- config/locales/en.yml | 1 + 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/app/views/settings/preferences/notifications/show.html.haml b/app/views/settings/preferences/notifications/show.html.haml index cb1ad0886d..0913bda9ae 100644 --- a/app/views/settings/preferences/notifications/show.html.haml +++ b/app/views/settings/preferences/notifications/show.html.haml @@ -18,14 +18,19 @@ = ff.input :'notification_emails.reblog', wrapper: :with_label, label: I18n.t('simple_form.labels.notification_emails.reblog') = ff.input :'notification_emails.favourite', wrapper: :with_label, label: I18n.t('simple_form.labels.notification_emails.favourite') = ff.input :'notification_emails.mention', wrapper: :with_label, label: I18n.t('simple_form.labels.notification_emails.mention') - = ff.input :'notification_emails.report', wrapper: :with_label, label: I18n.t('simple_form.labels.notification_emails.report') if current_user.can?(:manage_reports) - = ff.input :'notification_emails.appeal', as: :boolean, wrapper: :with_label, label: I18n.t('simple_form.labels.notification_emails.appeal') if current_user.can?(:manage_appeals) - = ff.input :'notification_emails.pending_account', wrapper: :with_label, label: I18n.t('simple_form.labels.notification_emails.pending_account') if current_user.can?(:manage_users) - = ff.input :'notification_emails.trends', wrapper: :with_label, label: I18n.t('simple_form.labels.notification_emails.trending_tag') if current_user.can?(:manage_taxonomies) .fields-group = ff.input :always_send_emails, wrapper: :with_label, label: I18n.t('simple_form.labels.defaults.setting_always_send_emails'), hint: I18n.t('simple_form.hints.defaults.setting_always_send_emails') + - if current_user.can?(:manage_reports, :manage_appeals, :manage_users, :manage_taxonomies) + %h4= t 'notifications.administration_emails' + + .fields-group + = ff.input :'notification_emails.report', wrapper: :with_label, label: I18n.t('simple_form.labels.notification_emails.report') if current_user.can?(:manage_reports) + = ff.input :'notification_emails.appeal', as: :boolean, wrapper: :with_label, label: I18n.t('simple_form.labels.notification_emails.appeal') if current_user.can?(:manage_appeals) + = ff.input :'notification_emails.pending_account', wrapper: :with_label, label: I18n.t('simple_form.labels.notification_emails.pending_account') if current_user.can?(:manage_users) + = ff.input :'notification_emails.trends', wrapper: :with_label, label: I18n.t('simple_form.labels.notification_emails.trending_tag') if current_user.can?(:manage_taxonomies) + %h4= t 'notifications.other_settings' .fields-group diff --git a/config/locales/en.yml b/config/locales/en.yml index 389b7aa661..71121bb2e2 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1446,6 +1446,7 @@ en: update: subject: "%{name} edited a post" notifications: + administration_emails: Admin e-mail notifications email_events: Events for e-mail notifications email_events_hint: 'Select events that you want to receive notifications for:' other_settings: Other notifications settings