Add option to include reported statuses in warning e-mail (#11639)
This commit is contained in:
parent
37f612074e
commit
73ca0bb925
12 changed files with 85 additions and 14 deletions
|
@ -13,6 +13,10 @@
|
|||
.fields-group
|
||||
= f.input :send_email_notification, as: :boolean, wrapper: :with_label
|
||||
|
||||
- if params[:report_id].present?
|
||||
.fields-group
|
||||
= f.input :include_statuses, as: :boolean, wrapper: :with_label
|
||||
|
||||
%hr.spacer/
|
||||
|
||||
- unless @warning_presets.empty?
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
- i ||= 0
|
||||
- highlighted ||= false
|
||||
|
||||
%table.email-table{ cellspacing: 0, cellpadding: 0, dir: 'ltr' }
|
||||
%tbody
|
||||
|
@ -14,7 +15,7 @@
|
|||
%table.column{ cellspacing: 0, cellpadding: 0 }
|
||||
%tbody
|
||||
%tr
|
||||
%td.column-cell.padded.status
|
||||
%td.column-cell.padded.status{ class: highlighted ? 'status--highlighted' : '' }
|
||||
%table.status-header{ cellspacing: 0, cellpadding: 0 }
|
||||
%tbody
|
||||
%tr
|
||||
|
@ -32,5 +33,10 @@
|
|||
%div{ dir: rtl_status?(status) ? 'rtl' : 'ltr' }
|
||||
= Formatter.instance.format(status)
|
||||
|
||||
- if status.media_attachments.size > 0
|
||||
%p
|
||||
- status.media_attachments.each do |a|
|
||||
= link_to medium_url(a), medium_url(a)
|
||||
|
||||
%p.status-footer
|
||||
= link_to l(status.created_at), web_url("statuses/#{status.id}")
|
||||
|
|
|
@ -42,6 +42,14 @@
|
|||
- unless @warning.text.blank?
|
||||
= Formatter.instance.linkify(@warning.text)
|
||||
|
||||
- unless @statuses.empty?
|
||||
%p
|
||||
%strong= t('user_mailer.warning.statuses')
|
||||
|
||||
- unless @statuses.empty?
|
||||
- @statuses.each_with_index do |status, i|
|
||||
= render 'notification_mailer/status', status: status, i: i + 1, highlighted: true
|
||||
|
||||
%table.email-table{ cellspacing: 0, cellpadding: 0 }
|
||||
%tbody
|
||||
%tr
|
||||
|
@ -50,7 +58,7 @@
|
|||
%table.content-section{ cellspacing: 0, cellpadding: 0 }
|
||||
%tbody
|
||||
%tr
|
||||
%td.content-cell
|
||||
%td.content-cell{ class: @statuses.empty? ? '' : 'content-start' }
|
||||
%table.column{ cellspacing: 0, cellpadding: 0 }
|
||||
%tbody
|
||||
%tr
|
||||
|
@ -61,3 +69,20 @@
|
|||
%td.button-primary
|
||||
= link_to about_more_url do
|
||||
%span= t 'user_mailer.warning.review_server_policies'
|
||||
|
||||
%table.email-table{ cellspacing: 0, cellpadding: 0 }
|
||||
%tbody
|
||||
%tr
|
||||
%td.email-body
|
||||
.email-container
|
||||
%table.content-section{ cellspacing: 0, cellpadding: 0 }
|
||||
%tbody
|
||||
%tr
|
||||
%td.content-cell
|
||||
.email-row
|
||||
.col-6
|
||||
%table.column{ cellspacing: 0, cellpadding: 0 }
|
||||
%tbody
|
||||
%tr
|
||||
%td.column-cell.text-center
|
||||
%p= t 'user_mailer.warning.get_in_touch', instance: @instance
|
||||
|
|
|
@ -7,3 +7,16 @@
|
|||
|
||||
<% end %>
|
||||
<%= @warning.text %>
|
||||
<% unless @statuses.empty? %>
|
||||
<%= t('user_mailer.warning.statuses') %>
|
||||
|
||||
<% @statuses.each do |status| %>
|
||||
|
||||
<%= render 'notification_mailer/status', status: status %>
|
||||
---
|
||||
<% end %>
|
||||
<% else %>
|
||||
---
|
||||
<% end %>
|
||||
|
||||
<%= t 'user_mailer.warning.get_in_touch', instance: @instance %>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue