2022-02-14 15:27:53 -05:00
|
|
|
- content_for :page_title do
|
|
|
|
= t('disputes.strikes.title', action: t(@strike.action, scope: 'disputes.strikes.title_actions'), date: l(@strike.created_at.to_date))
|
|
|
|
|
|
|
|
- content_for :heading_actions do
|
|
|
|
- if @appeal.persisted?
|
2022-05-06 15:41:34 -04:00
|
|
|
= link_to t('disputes.strikes.approve_appeal'), approve_admin_disputes_appeal_path(@appeal), method: :post, class: 'button' if can?(:approve, @appeal)
|
|
|
|
= link_to t('disputes.strikes.reject_appeal'), reject_admin_disputes_appeal_path(@appeal), method: :post, class: 'button button--destructive' if can?(:reject, @appeal)
|
2022-02-14 15:27:53 -05:00
|
|
|
|
|
|
|
- if @strike.overruled?
|
|
|
|
%p.hint
|
|
|
|
%span.positive-hint
|
|
|
|
= fa_icon 'check'
|
|
|
|
= ' '
|
|
|
|
= t 'disputes.strikes.appeal_approved'
|
|
|
|
- elsif @appeal.persisted? && @appeal.rejected?
|
|
|
|
%p.hint
|
|
|
|
%span.negative-hint
|
|
|
|
= fa_icon 'times'
|
|
|
|
= ' '
|
|
|
|
= t 'disputes.strikes.appeal_rejected'
|
|
|
|
|
|
|
|
.report-header
|
|
|
|
.report-header__card
|
|
|
|
.strike-card
|
|
|
|
- unless @strike.none_action?
|
2022-02-22 00:20:04 -05:00
|
|
|
%p= t "user_mailer.warning.explanation.#{@strike.action}", instance: Rails.configuration.x.local_domain
|
2022-02-14 15:27:53 -05:00
|
|
|
|
|
|
|
- unless @strike.text.blank?
|
2022-03-25 21:53:34 -04:00
|
|
|
= linkify(@strike.text)
|
2022-02-14 15:27:53 -05:00
|
|
|
|
|
|
|
- if @strike.report && !@strike.report.other?
|
|
|
|
%p
|
|
|
|
%strong= t('user_mailer.warning.reason')
|
|
|
|
= t("user_mailer.warning.categories.#{@strike.report.category}")
|
|
|
|
|
|
|
|
- if @strike.report.violation? && @strike.report.rule_ids.present?
|
2022-02-22 00:20:04 -05:00
|
|
|
%ul.strike-card__rules
|
2022-02-14 15:27:53 -05:00
|
|
|
- @strike.report.rules.each do |rule|
|
2022-02-22 00:20:04 -05:00
|
|
|
%li
|
|
|
|
%span.strike-card__rules__text= rule.text
|
2022-02-14 15:27:53 -05:00
|
|
|
|
|
|
|
- if @strike.status_ids.present? && !@strike.status_ids.empty?
|
|
|
|
%p
|
|
|
|
%strong= t('user_mailer.warning.statuses')
|
|
|
|
|
|
|
|
.strike-card__statuses-list
|
|
|
|
- status_map = @strike.statuses.includes(:application, :media_attachments).index_by(&:id)
|
|
|
|
|
|
|
|
- @strike.status_ids.each do |status_id|
|
|
|
|
.strike-card__statuses-list__item
|
|
|
|
- if (status = status_map[status_id.to_i])
|
|
|
|
.one-liner
|
|
|
|
= link_to short_account_status_url(@strike.target_account, status_id), class: 'emojify' do
|
|
|
|
= one_line_preview(status)
|
|
|
|
|
2022-03-09 03:06:17 -05:00
|
|
|
- status.ordered_media_attachments.each do |media_attachment|
|
2022-02-14 15:27:53 -05:00
|
|
|
%abbr{ title: media_attachment.description }
|
|
|
|
= fa_icon 'link'
|
|
|
|
= media_attachment.file_file_name
|
|
|
|
.strike-card__statuses-list__item__meta
|
|
|
|
%time.formatted{ datetime: status.created_at.iso8601, title: l(status.created_at) }= l(status.created_at)
|
2022-11-06 21:40:17 -05:00
|
|
|
- unless status.application.nil?
|
|
|
|
·
|
|
|
|
= status.application.name
|
2022-02-14 15:27:53 -05:00
|
|
|
- else
|
|
|
|
.one-liner= t('disputes.strikes.status', id: status_id)
|
|
|
|
.strike-card__statuses-list__item__meta
|
|
|
|
= t('disputes.strikes.status_removed')
|
|
|
|
|
|
|
|
.report-header__details
|
|
|
|
.report-header__details__item
|
|
|
|
.report-header__details__item__header
|
|
|
|
%strong= t('disputes.strikes.created_at')
|
|
|
|
.report-header__details__item__content
|
|
|
|
%time.formatted{ datetime: @strike.created_at.iso8601, title: l(@strike.created_at) }= l(@strike.created_at)
|
|
|
|
.report-header__details__item
|
|
|
|
.report-header__details__item__header
|
|
|
|
%strong= t('disputes.strikes.recipient')
|
|
|
|
.report-header__details__item__content
|
2022-02-22 09:27:25 -05:00
|
|
|
= link_to @strike.target_account.username, can?(:show, @strike.target_account) ? admin_account_path(@strike.target_account_id) : ActivityPub::TagManager.instance.url_for(@strike.target_account), class: 'table-action-link'
|
2022-02-14 15:27:53 -05:00
|
|
|
.report-header__details__item
|
|
|
|
.report-header__details__item__header
|
|
|
|
%strong= t('disputes.strikes.action_taken')
|
|
|
|
.report-header__details__item__content
|
|
|
|
- if @strike.overruled?
|
|
|
|
%del= t(@strike.action, scope: 'user_mailer.warning.title')
|
|
|
|
- else
|
|
|
|
= t(@strike.action, scope: 'user_mailer.warning.title')
|
|
|
|
- if @strike.report && can?(:show, @strike.report)
|
|
|
|
.report-header__details__item
|
|
|
|
.report-header__details__item__header
|
|
|
|
%strong= t('disputes.strikes.associated_report')
|
|
|
|
.report-header__details__item__content
|
2022-02-22 09:27:25 -05:00
|
|
|
= link_to t('admin.reports.report', id: @strike.report.id), admin_report_path(@strike.report), class: 'table-action-link'
|
2022-02-14 15:27:53 -05:00
|
|
|
- if @appeal.persisted?
|
|
|
|
.report-header__details__item
|
|
|
|
.report-header__details__item__header
|
|
|
|
%strong= t('disputes.strikes.appeal_submitted_at')
|
|
|
|
.report-header__details__item__content
|
|
|
|
%time.formatted{ datetime: @appeal.created_at.iso8601, title: l(@appeal.created_at) }= l(@appeal.created_at)
|
|
|
|
%hr.spacer/
|
|
|
|
|
|
|
|
- if @appeal.persisted?
|
|
|
|
%h3= t('disputes.strikes.appeal')
|
|
|
|
|
|
|
|
.report-notes
|
|
|
|
.report-notes__item
|
|
|
|
= image_tag @appeal.account.avatar.url, class: 'report-notes__item__avatar'
|
|
|
|
|
|
|
|
.report-notes__item__header
|
|
|
|
%span.username
|
|
|
|
= link_to @appeal.account.username, can?(:show, @appeal.account) ? admin_account_path(@appeal.account_id) : short_account_url(@appeal.account)
|
2022-12-15 10:35:25 -05:00
|
|
|
%time.relative-formatted{ datetime: @appeal.created_at.iso8601 }
|
2023-01-05 07:35:28 -05:00
|
|
|
= l @appeal.created_at.to_date
|
2022-02-14 15:27:53 -05:00
|
|
|
|
|
|
|
.report-notes__item__content
|
|
|
|
= simple_format(h(@appeal.text))
|
|
|
|
- elsif can?(:appeal, @strike)
|
|
|
|
%h3= t('disputes.strikes.appeals.submit')
|
|
|
|
|
|
|
|
= simple_form_for(@appeal, url: disputes_strike_appeal_path(@strike)) do |f|
|
|
|
|
.fields-group
|
|
|
|
= f.input :text, wrapper: :with_label, input_html: { maxlength: 500 }
|
|
|
|
|
|
|
|
.actions
|
|
|
|
= f.button :button, t('disputes.strikes.appeals.submit'), type: :submit
|