diff --git a/app/mailers/admin_mailer.rb b/app/mailers/admin_mailer.rb index 385e53c657..2a6fbb0ab7 100644 --- a/app/mailers/admin_mailer.rb +++ b/app/mailers/admin_mailer.rb @@ -1,6 +1,8 @@ # frozen_string_literal: true class AdminMailer < ApplicationMailer + layout 'admin_mailer' + helper :accounts helper :languages diff --git a/app/views/admin_mailer/new_appeal.text.erb b/app/views/admin_mailer/new_appeal.text.erb index 8b85823608..0494f88985 100644 --- a/app/views/admin_mailer/new_appeal.text.erb +++ b/app/views/admin_mailer/new_appeal.text.erb @@ -1,5 +1,3 @@ -<%= raw t('application_mailer.salutation', name: display_name(@me)) %> - <%= raw t('admin_mailer.new_appeal.body', target: @appeal.account.username, action_taken_by: @appeal.strike.account.username, date: l(@appeal.strike.created_at, format: :with_time_zone), type: t(@appeal.strike.action, scope: 'admin_mailer.new_appeal.actions')) %> > <%= raw word_wrap(@appeal.text, break_sequence: "\n> ") %> diff --git a/app/views/admin_mailer/new_critical_software_updates.text.erb b/app/views/admin_mailer/new_critical_software_updates.text.erb index c901bc50f7..63c170dc0d 100644 --- a/app/views/admin_mailer/new_critical_software_updates.text.erb +++ b/app/views/admin_mailer/new_critical_software_updates.text.erb @@ -1,5 +1,3 @@ -<%= raw t('application_mailer.salutation', name: display_name(@me)) %> - <%= raw t('admin_mailer.new_critical_software_updates.body') %> <%= raw t('application_mailer.view')%> <%= admin_software_updates_url %> diff --git a/app/views/admin_mailer/new_pending_account.text.erb b/app/views/admin_mailer/new_pending_account.text.erb index a8a2a35fa5..9eabb8f150 100644 --- a/app/views/admin_mailer/new_pending_account.text.erb +++ b/app/views/admin_mailer/new_pending_account.text.erb @@ -1,5 +1,3 @@ -<%= raw t('application_mailer.salutation', name: display_name(@me)) %> - <%= raw t('admin_mailer.new_pending_account.body') %> <%= @account.user_email %> (@<%= @account.username %>) diff --git a/app/views/admin_mailer/new_report.text.erb b/app/views/admin_mailer/new_report.text.erb index f8a5224a10..8482225abe 100644 --- a/app/views/admin_mailer/new_report.text.erb +++ b/app/views/admin_mailer/new_report.text.erb @@ -1,5 +1,3 @@ -<%= raw t('application_mailer.salutation', name: display_name(@me)) %> - <%= raw(@report.account.local? ? t('admin_mailer.new_report.body', target: @report.target_account.pretty_acct, reporter: @report.account.pretty_acct) : t('admin_mailer.new_report.body_remote', target: @report.target_account.acct, domain: @report.account.domain)) %> <%= raw t('application_mailer.view')%> <%= admin_report_url(@report) %> diff --git a/app/views/admin_mailer/new_software_updates.text.erb b/app/views/admin_mailer/new_software_updates.text.erb index 2fc4d1a5f2..96808f3cb3 100644 --- a/app/views/admin_mailer/new_software_updates.text.erb +++ b/app/views/admin_mailer/new_software_updates.text.erb @@ -1,5 +1,3 @@ -<%= raw t('application_mailer.salutation', name: display_name(@me)) %> - <%= raw t('admin_mailer.new_software_updates.body') %> <%= raw t('application_mailer.view')%> <%= admin_software_updates_url %> diff --git a/app/views/admin_mailer/new_trends.text.erb b/app/views/admin_mailer/new_trends.text.erb index 10b10e6045..4bcfa14010 100644 --- a/app/views/admin_mailer/new_trends.text.erb +++ b/app/views/admin_mailer/new_trends.text.erb @@ -1,5 +1,3 @@ -<%= raw t('application_mailer.salutation', name: display_name(@me)) %> - <%= raw t('admin_mailer.new_trends.body') %> <%= render partial: 'new_trending_links', object: @links unless @links.empty? %> diff --git a/app/views/layouts/admin_mailer.text.erb b/app/views/layouts/admin_mailer.text.erb new file mode 100644 index 0000000000..298007ac87 --- /dev/null +++ b/app/views/layouts/admin_mailer.text.erb @@ -0,0 +1,3 @@ +<%= raw t('application_mailer.salutation', name: display_name(@me)) %> + +<%= yield %>