From 14f436c457560862fafabd753eb314c8b8a8e674 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Mon, 17 Jan 2022 09:41:33 +0100 Subject: Add notifications for statuses deleted by moderators (#17204) --- app/views/user_mailer/warning.html.haml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'app/views/user_mailer/warning.html.haml') diff --git a/app/views/user_mailer/warning.html.haml b/app/views/user_mailer/warning.html.haml index 5a2911ecb..bda1fef6c 100644 --- a/app/views/user_mailer/warning.html.haml +++ b/app/views/user_mailer/warning.html.haml @@ -37,16 +37,26 @@ %tr %td.column-cell.text-center - unless @warning.none_action? - %p= t "user_mailer.warning.explanation.#{@warning.action}" + %p= t "user_mailer.warning.explanation.#{@warning.action}", instance: @instance - unless @warning.text.blank? = Formatter.instance.linkify(@warning.text) - - if !@statuses.nil? && !@statuses.empty? + - 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') -- if !@statuses.nil? && !@statuses.empty? +- unless @statuses.empty? - @statuses.each_with_index do |status, i| = render 'notification_mailer/status', status: status, i: i + 1, highlighted: true -- cgit