mirror of
https://github.com/mastodon/mastodon.git
synced 2025-09-05 17:31:12 +00:00
Embody the spirit of thanksgiving
This commit is contained in:
parent
c2b7b28919
commit
9e181bbed2
16
app/helpers/admin/reports_helper.rb
Normal file
16
app/helpers/admin/reports_helper.rb
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
module Admin::ReportsHelper
|
||||||
|
def explanation_key(action)
|
||||||
|
explanation_mapping.fetch(action) { action }
|
||||||
|
end
|
||||||
|
|
||||||
|
private
|
||||||
|
|
||||||
|
def explanation_mapping
|
||||||
|
{
|
||||||
|
'delete' => 'delete_statuses',
|
||||||
|
'mark_as_sensitive' => 'mark_statuses_as_sensitive',
|
||||||
|
}
|
||||||
|
end
|
||||||
|
end
|
|
@ -1,5 +1,4 @@
|
||||||
- target_acct = @report.target_account.acct
|
- target_acct = @report.target_account.acct
|
||||||
- warning_action = { 'delete' => 'delete_statuses', 'mark_as_sensitive' => 'mark_statuses_as_sensitive' }.fetch(@moderation_action, @moderation_action)
|
|
||||||
|
|
||||||
- content_for :page_title do
|
- content_for :page_title do
|
||||||
= t('admin.reports.confirm_action', acct: target_acct)
|
= t('admin.reports.confirm_action', acct: target_acct)
|
||||||
|
@ -26,8 +25,8 @@
|
||||||
%p.hint= t('admin.reports.summary.preview_preamble_html', acct: target_acct)
|
%p.hint= t('admin.reports.summary.preview_preamble_html', acct: target_acct)
|
||||||
|
|
||||||
.strike-card
|
.strike-card
|
||||||
- unless warning_action == 'none'
|
- unless @moderation_action == 'none'
|
||||||
%p= t "user_mailer.warning.explanation.#{warning_action}", instance: Rails.configuration.x.local_domain
|
%p= t "user_mailer.warning.explanation.#{explanation_key(@moderation_action)}", instance: Rails.configuration.x.local_domain
|
||||||
|
|
||||||
.fields-group
|
.fields-group
|
||||||
= form.text_area :text,
|
= form.text_area :text,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user