2017-07-18 16:38:22 +02:00
|
|
|
- content_for :header_tags do
|
2020-11-06 11:56:31 +01:00
|
|
|
= javascript_pack_tag 'admin', async: true, crossorigin: 'anonymous'
|
2022-01-17 09:41:33 +01:00
|
|
|
= javascript_pack_tag 'public', async: true, crossorigin: 'anonymous'
|
2017-07-18 16:38:22 +02:00
|
|
|
|
2017-02-16 02:28:10 +01:00
|
|
|
- content_for :page_title do
|
2017-04-13 21:49:07 +02:00
|
|
|
= t('admin.reports.report', id: @report.id)
|
2017-02-17 00:42:52 +01:00
|
|
|
|
2020-01-10 01:10:17 +01:00
|
|
|
- content_for :heading_actions do
|
2018-04-10 20:27:59 +02:00
|
|
|
- if @report.unresolved?
|
2019-12-16 23:55:16 +01:00
|
|
|
= link_to t('admin.reports.mark_as_resolved'), resolve_admin_report_path(@report), method: :post, class: 'button'
|
2018-04-02 22:04:14 +02:00
|
|
|
- else
|
Add moderation warnings (#9519)
* Add moderation warnings
Replace individual routes for disabling, silencing, and suspending
a user, as well as the report update route, with a unified account
action controller that allows you to select an action (none,
disable, silence, suspend) as well as whether it should generate an
e-mail notification with optional custom text. That notification,
with the optional custom text, is saved as a warning.
Additionally, there are warning presets you can configure to save
time when performing the above.
* Use Account#local_username_and_domain
2018-12-22 20:02:09 +01:00
|
|
|
= link_to t('admin.reports.mark_as_unresolved'), reopen_admin_report_path(@report), method: :post, class: 'button'
|
2018-04-02 22:04:14 +02:00
|
|
|
|
2022-01-17 09:41:33 +01:00
|
|
|
.report-header
|
|
|
|
.report-header__card
|
|
|
|
.account-card
|
|
|
|
.account-card__header
|
|
|
|
= image_tag @report.target_account.header.url, alt: ''
|
|
|
|
.account-card__title
|
|
|
|
.account-card__title__avatar
|
|
|
|
= image_tag @report.target_account.avatar.url, alt: ''
|
|
|
|
.display-name
|
|
|
|
%bdi
|
|
|
|
%strong.emojify.p-name= display_name(@report.target_account, custom_emojify: true)
|
|
|
|
%span
|
|
|
|
= acct(@report.target_account)
|
|
|
|
= fa_icon('lock') if @report.target_account.locked?
|
|
|
|
- if @report.target_account.note.present?
|
|
|
|
.account-card__bio.emojify
|
2022-03-28 01:17:17 +02:00
|
|
|
= prerender_custom_emojis(account_bio_format(@report.target_account), @report.target_account.emojis)
|
2022-01-17 09:41:33 +01:00
|
|
|
.account-card__actions
|
|
|
|
.account-card__counters
|
|
|
|
.account-card__counters__item
|
|
|
|
= friendly_number_to_human @report.target_account.statuses_count
|
|
|
|
%small= t('accounts.posts', count: @report.target_account.statuses_count).downcase
|
|
|
|
.account-card__counters__item
|
|
|
|
= friendly_number_to_human @report.target_account.followers_count
|
|
|
|
%small= t('accounts.followers', count: @report.target_account.followers_count).downcase
|
|
|
|
.account-card__counters__item
|
|
|
|
= friendly_number_to_human @report.target_account.following_count
|
|
|
|
%small= t('accounts.following', count: @report.target_account.following_count).downcase
|
|
|
|
.account-card__actions__button
|
|
|
|
= link_to t('admin.reports.view_profile'), admin_account_path(@report.target_account_id), class: 'button'
|
|
|
|
.report-header__details.report-header__details--horizontal
|
|
|
|
.report-header__details__item
|
|
|
|
.report-header__details__item__header
|
|
|
|
%strong= t('admin.accounts.joined')
|
|
|
|
.report-header__details__item__content
|
|
|
|
%time.time-ago{ datetime: @report.target_account.created_at.iso8601, title: l(@report.target_account.created_at) }= l @report.target_account.created_at
|
|
|
|
.report-header__details__item
|
|
|
|
.report-header__details__item__header
|
|
|
|
%strong= t('accounts.last_active')
|
|
|
|
.report-header__details__item__content
|
|
|
|
- if @report.target_account.last_status_at.present?
|
|
|
|
%time.time-ago{ datetime: @report.target_account.last_status_at.to_date.iso8601, title: l(@report.target_account.last_status_at.to_date) }= l @report.target_account.last_status_at
|
|
|
|
.report-header__details__item
|
|
|
|
.report-header__details__item__header
|
|
|
|
%strong= t('admin.accounts.strikes')
|
|
|
|
.report-header__details__item__content
|
2022-02-14 21:27:53 +01:00
|
|
|
= @report.target_account.previous_strikes_count
|
2022-01-17 09:41:33 +01:00
|
|
|
|
|
|
|
.report-header__details
|
|
|
|
.report-header__details__item
|
|
|
|
.report-header__details__item__header
|
|
|
|
%strong= t('admin.reports.created_at')
|
|
|
|
.report-header__details__item__content
|
|
|
|
%time.formatted{ datetime: @report.created_at.iso8601 }
|
|
|
|
.report-header__details__item
|
|
|
|
.report-header__details__item__header
|
|
|
|
%strong= t('admin.reports.reported_by')
|
|
|
|
.report-header__details__item__content
|
2019-09-09 20:42:43 +02:00
|
|
|
- if @report.account.instance_actor?
|
2022-01-17 09:41:33 +01:00
|
|
|
= site_hostname
|
2019-09-09 20:42:43 +02:00
|
|
|
- elsif @report.account.local?
|
2022-01-17 09:41:33 +01:00
|
|
|
= admin_account_link_to @report.account
|
|
|
|
- else
|
|
|
|
= @report.account.domain
|
|
|
|
.report-header__details__item
|
|
|
|
.report-header__details__item__header
|
|
|
|
%strong= t('admin.reports.status')
|
|
|
|
.report-header__details__item__content
|
|
|
|
- if @report.action_taken?
|
|
|
|
= t('admin.reports.resolved')
|
2018-05-04 13:26:25 +02:00
|
|
|
- else
|
2022-01-17 09:41:33 +01:00
|
|
|
= t('admin.reports.unresolved')
|
|
|
|
- unless @report.target_account.local?
|
|
|
|
.report-header__details__item
|
|
|
|
.report-header__details__item__header
|
|
|
|
%strong= t('admin.reports.forwarded')
|
|
|
|
.report-header__details__item__content
|
|
|
|
- if @report.forwarded?
|
|
|
|
= t('simple_form.yes')
|
2018-04-02 22:04:14 +02:00
|
|
|
- else
|
2022-01-17 09:41:33 +01:00
|
|
|
= t('simple_form.no')
|
|
|
|
- if !@report.action_taken_by_account.nil?
|
|
|
|
.report-header__details__item
|
|
|
|
.report-header__details__item__header
|
|
|
|
%strong= t('admin.reports.action_taken_by')
|
|
|
|
.report-header__details__item__content
|
|
|
|
= admin_account_link_to @report.action_taken_by_account
|
|
|
|
- else
|
|
|
|
.report-header__details__item
|
|
|
|
.report-header__details__item__header
|
|
|
|
%strong= t('admin.reports.assigned')
|
|
|
|
.report-header__details__item__content
|
|
|
|
- if @report.assigned_account.nil?
|
|
|
|
= t 'admin.reports.no_one_assigned'
|
|
|
|
- else
|
|
|
|
= admin_account_link_to @report.assigned_account
|
|
|
|
—
|
|
|
|
- if @report.assigned_account != current_user.account
|
|
|
|
= table_link_to 'user', t('admin.reports.assign_to_self'), assign_to_self_admin_report_path(@report), method: :post
|
|
|
|
- elsif !@report.assigned_account.nil?
|
|
|
|
= table_link_to 'trash', t('admin.reports.unassign'), unassign_admin_report_path(@report), method: :post
|
2018-04-02 22:04:14 +02:00
|
|
|
|
2018-04-20 02:28:48 +02:00
|
|
|
%hr.spacer
|
2018-04-02 22:04:14 +02:00
|
|
|
|
2022-01-17 09:41:33 +01:00
|
|
|
%h3= t 'admin.reports.category'
|
2020-04-28 19:39:16 +02:00
|
|
|
|
2022-01-17 09:41:33 +01:00
|
|
|
%p= t 'admin.reports.category_description_html'
|
2019-12-16 23:55:16 +01:00
|
|
|
|
2022-01-17 09:41:33 +01:00
|
|
|
= react_admin_component :report_reason_selector, id: @report.id, category: @report.category, rule_ids: @report.rule_ids&.map(&:to_s), disabled: @report.action_taken?
|
2019-12-16 23:55:16 +01:00
|
|
|
|
2022-01-17 09:41:33 +01:00
|
|
|
- if @report.comment.present?
|
2022-02-26 21:14:12 +01:00
|
|
|
- if @report.account.instance_actor?
|
|
|
|
%p= t('admin.reports.comment_description_html', name: content_tag(:strong, site_hostname, class: 'username'))
|
|
|
|
- elsif @report.account.local?
|
|
|
|
%p= t('admin.reports.comment_description_html', name: content_tag(:strong, @report.account.username, class: 'username'))
|
|
|
|
- else
|
|
|
|
%p= t('admin.reports.comment_description_html', name: t('admin.reports.remote_user_placeholder', instance: @report.account.domain))
|
2022-01-17 09:41:33 +01:00
|
|
|
|
2022-02-11 21:51:57 +01:00
|
|
|
.report-notes
|
|
|
|
.report-notes__item
|
2022-02-26 21:14:12 +01:00
|
|
|
- if @report.account.local? && !@report.account.instance_actor?
|
|
|
|
= image_tag @report.account.avatar.url, class: 'report-notes__item__avatar'
|
|
|
|
- else
|
|
|
|
= image_tag(full_asset_url('avatars/original/missing.png', skip_pipeline: true), class: 'report-notes__item__avatar')
|
2022-02-11 21:51:57 +01:00
|
|
|
|
|
|
|
.report-notes__item__header
|
|
|
|
%span.username
|
2022-02-26 21:14:12 +01:00
|
|
|
- if @report.account.instance_actor?
|
|
|
|
= site_hostname
|
|
|
|
- elsif @report.account.local?
|
|
|
|
= link_to @report.account.username, admin_account_path(@report.account_id)
|
|
|
|
- else
|
|
|
|
= link_to @report.account.domain, admin_instance_path(@report.account.domain)
|
2022-12-15 16:35:25 +01:00
|
|
|
%time.relative-formatted{ datetime: @report.created_at.iso8601 }
|
|
|
|
= t('admin.report_notes.created_at')
|
2022-01-17 09:41:33 +01:00
|
|
|
|
2022-02-11 21:51:57 +01:00
|
|
|
.report-notes__item__content
|
|
|
|
= simple_format(h(@report.comment))
|
2022-01-17 09:41:33 +01:00
|
|
|
|
|
|
|
%hr.spacer/
|
2017-02-17 00:42:52 +01:00
|
|
|
|
2022-02-11 21:51:57 +01:00
|
|
|
%h3
|
|
|
|
= t 'admin.reports.statuses'
|
|
|
|
%small.section-skip-link
|
|
|
|
= link_to '#actions' do
|
|
|
|
= fa_icon 'angle-double-down'
|
|
|
|
= t('admin.reports.skip_to_actions')
|
2022-01-17 09:41:33 +01:00
|
|
|
|
|
|
|
%p
|
|
|
|
= t 'admin.reports.statuses_description_html'
|
|
|
|
—
|
|
|
|
= link_to safe_join([fa_icon('plus'), t('admin.reports.add_to_report')]), admin_account_statuses_path(@report.target_account_id, report_id: @report.id), class: 'table-action-link'
|
|
|
|
|
|
|
|
= form_for(@form, url: batch_admin_account_statuses_path(@report.target_account_id, report_id: @report.id)) do |f|
|
|
|
|
.batch-table
|
|
|
|
.batch-table__toolbar
|
|
|
|
%label.batch-table__toolbar__select.batch-checkbox-all
|
|
|
|
= check_box_tag :batch_checkbox_all, nil, false
|
|
|
|
.batch-table__toolbar__actions
|
|
|
|
- if !@statuses.empty? && @report.unresolved?
|
|
|
|
= f.button safe_join([fa_icon('times'), t('admin.statuses.batch.remove_from_report')]), name: :remove_from_report, class: 'table-action-link', type: :submit
|
|
|
|
.batch-table__body
|
|
|
|
- if @statuses.empty?
|
|
|
|
= nothing_here 'nothing-here--under-tabs'
|
|
|
|
- else
|
|
|
|
= render partial: 'admin/reports/status', collection: @statuses, locals: { f: f }
|
|
|
|
|
|
|
|
- if @report.unresolved?
|
2018-04-20 02:28:48 +02:00
|
|
|
%hr.spacer/
|
2018-04-02 22:04:14 +02:00
|
|
|
|
2022-02-11 21:51:57 +01:00
|
|
|
%p#actions= t 'admin.reports.actions_description_html'
|
|
|
|
|
|
|
|
= render partial: 'admin/reports/actions'
|
2022-01-17 09:41:33 +01:00
|
|
|
|
|
|
|
- unless @action_logs.empty?
|
|
|
|
%hr.spacer/
|
|
|
|
|
|
|
|
%h3= t 'admin.reports.action_log'
|
|
|
|
|
|
|
|
.report-notes
|
|
|
|
= render @action_logs
|
2018-04-20 02:28:48 +02:00
|
|
|
|
|
|
|
%hr.spacer/
|
|
|
|
|
2022-01-17 09:41:33 +01:00
|
|
|
%h3= t 'admin.reports.notes.title'
|
|
|
|
|
|
|
|
%p= t 'admin.reports.notes_description_html'
|
|
|
|
|
|
|
|
.report-notes
|
|
|
|
= render @report_notes
|
2018-04-20 02:28:48 +02:00
|
|
|
|
|
|
|
= simple_form_for @report_note, url: admin_report_notes_path do |f|
|
|
|
|
= f.input :report_id, as: :hidden
|
2018-04-02 22:04:14 +02:00
|
|
|
|
2018-04-20 02:28:48 +02:00
|
|
|
.field-group
|
|
|
|
= f.input :content, placeholder: t('admin.reports.notes.placeholder'), rows: 6
|
2018-04-02 22:04:14 +02:00
|
|
|
|
2018-04-20 02:28:48 +02:00
|
|
|
.actions
|
2018-04-10 20:27:59 +02:00
|
|
|
- if @report.unresolved?
|
2018-04-20 02:28:48 +02:00
|
|
|
= f.button :button, t('admin.reports.notes.create_and_resolve'), name: :create_and_resolve, type: :submit
|
2018-04-10 20:27:59 +02:00
|
|
|
- else
|
2018-04-20 02:28:48 +02:00
|
|
|
= f.button :button, t('admin.reports.notes.create_and_unresolve'), name: :create_and_unresolve, type: :submit
|
|
|
|
= f.button :button, t('admin.reports.notes.create'), type: :submit
|