2017-10-04 17:22:52 +09:00
|
|
|
- content_for :page_title do
|
|
|
|
= t('settings.notifications')
|
|
|
|
|
2020-03-09 00:04:03 +09:00
|
|
|
- content_for :heading_actions do
|
|
|
|
= button_tag t('generic.save_changes'), class: 'button', form: 'edit_notification'
|
|
|
|
|
2024-10-01 19:34:05 +09:00
|
|
|
= simple_form_for current_user, url: settings_preferences_notifications_path, html: { id: :edit_notification } do |f|
|
2017-10-04 17:22:52 +09:00
|
|
|
= render 'shared/error_messages', object: current_user
|
|
|
|
|
2019-12-02 21:39:53 +09:00
|
|
|
%h4= t 'notifications.email_events'
|
2019-11-30 01:03:06 +09:00
|
|
|
|
2019-12-02 21:39:53 +09:00
|
|
|
%p.hint= t 'notifications.email_events_hint'
|
2019-11-30 01:03:06 +09:00
|
|
|
|
2023-03-30 21:44:00 +09:00
|
|
|
= f.simple_fields_for :settings, current_user.settings do |ff|
|
|
|
|
.fields-group
|
|
|
|
= ff.input :'notification_emails.follow', wrapper: :with_label, label: I18n.t('simple_form.labels.notification_emails.follow')
|
|
|
|
= ff.input :'notification_emails.follow_request', wrapper: :with_label, label: I18n.t('simple_form.labels.notification_emails.follow_request')
|
|
|
|
= 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')
|
|
|
|
|
|
|
|
.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')
|
2022-04-09 01:03:31 +09:00
|
|
|
|
2023-09-02 00:47:07 +09:00
|
|
|
- if current_user.can?(:manage_reports, :manage_appeals, :manage_users, :manage_taxonomies) || (SoftwareUpdate.check_enabled? && current_user.can?(:view_devops))
|
2023-08-24 21:43:00 +09:00
|
|
|
%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)
|
|
|
|
|
2023-09-02 00:47:07 +09:00
|
|
|
- if SoftwareUpdate.check_enabled? && current_user.can?(:view_devops)
|
|
|
|
.fields-group
|
2024-01-09 18:31:32 +09:00
|
|
|
= ff.input :'notification_emails.software_updates',
|
|
|
|
collection: %w(none critical patch all),
|
|
|
|
hint: false,
|
|
|
|
include_blank: false,
|
|
|
|
label_method: ->(setting) { I18n.t("simple_form.labels.notification_emails.software_updates.#{setting}") },
|
|
|
|
label: I18n.t('simple_form.labels.notification_emails.software_updates.label'),
|
|
|
|
wrapper: :with_label
|