2024-01-15 10:18:59 -08:00
|
|
|
= content_for :heading do
|
|
|
|
= render 'application/mailer/heading', heading_title: t("user_mailer.warning.title.#{@warning.action}"), heading_image_url: full_pack_url('media/images/mailer-new/heading/warning.png')
|
|
|
|
%table.email-w-full{ cellspacing: 0, cellpadding: 0, border: 0, role: 'presentation' }
|
|
|
|
%tr
|
|
|
|
%td.email-body-padding-td
|
|
|
|
%table.email-inner-card-table{ cellspacing: 0, cellpadding: 0, border: 0, role: 'presentation' }
|
|
|
|
%tr
|
|
|
|
%td.email-inner-card-td-without-padding
|
|
|
|
%table.email-w-full{ cellspacing: 0, cellpadding: 0, border: 0, role: 'presentation' }
|
Add moderation warnings (#9519)
* Add moderation warnings
Replace individual routes for disabling, silencing, and suspending
a user, as well as the report update route, with a unified account
action controller that allows you to select an action (none,
disable, silence, suspend) as well as whether it should generate an
e-mail notification with optional custom text. That notification,
with the optional custom text, is saved as a warning.
Additionally, there are warning presets you can configure to save
time when performing the above.
* Use Account#local_username_and_domain
2018-12-22 11:02:09 -08:00
|
|
|
%tr
|
2024-01-15 10:18:59 -08:00
|
|
|
%td.email-prose.email-padding-24
|
|
|
|
- unless @warning.none_action?
|
|
|
|
%p= t "user_mailer.warning.explanation.#{@warning.action}", instance: @instance
|
|
|
|
|
|
|
|
- if @warning.text.present?
|
|
|
|
= linkify(@warning.text)
|
|
|
|
|
|
|
|
- if @warning.report && !@warning.report.other?
|
|
|
|
%p
|
|
|
|
%strong= t('user_mailer.warning.reason')
|
|
|
|
= t("user_mailer.warning.categories.#{@warning.report.category}")
|
|
|
|
|
|
|
|
- if @warning.report.violation? && @warning.report.rule_ids.present?
|
|
|
|
%ul.rules-list
|
|
|
|
- @warning.report.rules.each do |rule|
|
|
|
|
%li= rule.text
|
|
|
|
|
|
|
|
- unless @statuses.empty?
|
|
|
|
%p
|
|
|
|
%strong= t('user_mailer.warning.statuses')
|
|
|
|
|
|
|
|
- unless @statuses.empty?
|
|
|
|
%table.email-w-full{ cellspacing: 0, cellpadding: 0, border: 0, role: 'presentation' }
|
|
|
|
%tr
|
|
|
|
%td.email-border-top
|
|
|
|
- @statuses.each_with_index do |status, i|
|
|
|
|
%table.email-w-full{ cellspacing: 0, cellpadding: 0, border: 0, role: 'presentation' }
|
|
|
|
%tr
|
|
|
|
%td.email-border-bottom.email-padding-24
|
|
|
|
= render 'notification_mailer/status', status: status, i: i + 1, highlighted: true, time_zone: @resource.time_zone.presence
|
|
|
|
|
|
|
|
%table.email-w-full{ cellspacing: 0, cellpadding: 0, border: 0, role: 'presentation' }
|
2019-08-23 13:37:23 -07:00
|
|
|
%tr
|
2024-01-15 10:18:59 -08:00
|
|
|
%td.email-prose.email-padding-24
|
|
|
|
%p= t 'user_mailer.warning.appeal_description', instance: @instance
|
|
|
|
= render 'application/mailer/button', text: t('user_mailer.warning.appeal'), url: disputes_strike_url(@warning)
|