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
|
|
|
|
|
|
|
.table-wrapper
|
|
|
|
%table.table.inline-table
|
|
|
|
%tbody
|
2018-04-20 02:28:48 +02:00
|
|
|
%tr
|
|
|
|
%th= t('admin.reports.reported_account')
|
|
|
|
%td= admin_account_link_to @report.target_account
|
2019-12-12 19:50:23 +01:00
|
|
|
%td= table_link_to 'flag', t('admin.reports.account.reports', count: @report.target_account.targeted_reports.count), admin_reports_path(target_account_id: @report.target_account.id)
|
|
|
|
%td= table_link_to 'file', t('admin.reports.account.notes', count: @report.target_account.targeted_moderation_notes.count), admin_reports_path(target_account_id: @report.target_account.id)
|
2018-04-20 02:28:48 +02:00
|
|
|
%tr
|
|
|
|
%th= t('admin.reports.reported_by')
|
2019-09-09 20:42:43 +02:00
|
|
|
- if @report.account.instance_actor?
|
|
|
|
%td{ colspan: 3 }= site_hostname
|
|
|
|
- elsif @report.account.local?
|
2018-05-04 13:26:25 +02:00
|
|
|
%td= admin_account_link_to @report.account
|
2019-12-12 19:50:23 +01:00
|
|
|
%td= table_link_to 'flag', t('admin.reports.account.reports', count: @report.account.targeted_reports.count), admin_reports_path(target_account_id: @report.account.id)
|
|
|
|
%td= table_link_to 'file', t('admin.reports.account.notes', count: @report.account.targeted_moderation_notes.count), admin_reports_path(target_account_id: @report.account.id)
|
2018-05-04 13:26:25 +02:00
|
|
|
- else
|
|
|
|
%td{ colspan: 3 }= @report.account.domain
|
2018-04-10 20:27:59 +02:00
|
|
|
%tr
|
|
|
|
%th= t('admin.reports.created_at')
|
2018-04-20 02:28:48 +02:00
|
|
|
%td{ colspan: 3 }
|
2018-04-10 20:27:59 +02:00
|
|
|
%time.formatted{ datetime: @report.created_at.iso8601 }
|
2018-04-02 22:04:14 +02:00
|
|
|
%tr
|
|
|
|
%th= t('admin.reports.updated_at')
|
2018-04-20 02:28:48 +02:00
|
|
|
%td{ colspan: 3 }
|
2018-04-02 22:04:14 +02:00
|
|
|
%time.formatted{ datetime: @report.updated_at.iso8601 }
|
|
|
|
%tr
|
|
|
|
%th= t('admin.reports.status')
|
2018-04-10 20:27:59 +02:00
|
|
|
%td
|
2018-04-02 22:04:14 +02:00
|
|
|
- if @report.action_taken?
|
|
|
|
= t('admin.reports.resolved')
|
|
|
|
- else
|
|
|
|
= t('admin.reports.unresolved')
|
2018-04-20 02:28:48 +02:00
|
|
|
%td{ colspan: 2 }
|
2018-04-10 20:27:59 +02:00
|
|
|
- if @report.action_taken?
|
|
|
|
= table_link_to 'envelope-open', t('admin.reports.reopen'), admin_report_path(@report, outcome: 'reopen'), method: :put
|
2018-04-02 22:04:14 +02:00
|
|
|
- if !@report.action_taken_by_account.nil?
|
|
|
|
%tr
|
|
|
|
%th= t('admin.reports.action_taken_by')
|
2018-04-20 02:28:48 +02:00
|
|
|
%td{ colspan: 3 }
|
|
|
|
= admin_account_link_to @report.action_taken_by_account
|
2018-04-02 22:04:14 +02:00
|
|
|
- else
|
|
|
|
%tr
|
|
|
|
%th= t('admin.reports.assigned')
|
|
|
|
%td
|
|
|
|
- if @report.assigned_account.nil?
|
|
|
|
\-
|
|
|
|
- else
|
2018-04-20 02:28:48 +02:00
|
|
|
= admin_account_link_to @report.assigned_account
|
|
|
|
%td
|
2018-04-02 22:04:14 +02:00
|
|
|
- if @report.assigned_account != current_user.account
|
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
|
|
|
= table_link_to 'user', t('admin.reports.assign_to_self'), assign_to_self_admin_report_path(@report), method: :post
|
2018-04-20 02:28:48 +02:00
|
|
|
%td
|
2018-04-02 22:04:14 +02:00
|
|
|
- if !@report.assigned_account.nil?
|
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
|
|
|
= 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
|
|
|
|
2020-04-28 19:39:16 +02:00
|
|
|
%div.action-buttons
|
|
|
|
%div
|
|
|
|
|
2019-12-16 23:55:16 +01:00
|
|
|
- if @report.unresolved?
|
2020-04-28 19:39:16 +02:00
|
|
|
%div
|
2019-12-16 23:55:16 +01:00
|
|
|
- if @report.target_account.local?
|
|
|
|
= link_to t('admin.accounts.warn'), new_admin_account_action_path(@report.target_account_id, type: 'none', report_id: @report.id), class: 'button'
|
|
|
|
= link_to t('admin.accounts.disable'), new_admin_account_action_path(@report.target_account_id, type: 'disable', report_id: @report.id), class: 'button button--destructive'
|
|
|
|
= link_to t('admin.accounts.silence'), new_admin_account_action_path(@report.target_account_id, type: 'silence', report_id: @report.id), class: 'button button--destructive'
|
|
|
|
= link_to t('admin.accounts.perform_full_suspension'), new_admin_account_action_path(@report.target_account_id, type: 'suspend', report_id: @report.id), class: 'button button--destructive'
|
|
|
|
|
|
|
|
%hr.spacer
|
|
|
|
|
2018-04-20 02:28:48 +02:00
|
|
|
.speech-bubble
|
|
|
|
.speech-bubble__bubble= simple_format(@report.comment.presence || t('admin.reports.comment.none'))
|
|
|
|
.speech-bubble__owner
|
2018-05-21 17:33:20 +02:00
|
|
|
- if @report.account.local?
|
|
|
|
= admin_account_link_to @report.account
|
|
|
|
- else
|
|
|
|
= @report.account.domain
|
|
|
|
%br/
|
2018-04-20 02:28:48 +02:00
|
|
|
%time.formatted{ datetime: @report.created_at.iso8601 }
|
2017-02-17 00:42:52 +01:00
|
|
|
|
2017-04-14 11:10:28 +02:00
|
|
|
- unless @report.statuses.empty?
|
2018-04-20 02:28:48 +02:00
|
|
|
%hr.spacer/
|
2018-04-02 22:04:14 +02:00
|
|
|
|
2017-07-18 16:38:22 +02:00
|
|
|
= form_for(@form, url: admin_report_reported_statuses_path(@report.id)) do |f|
|
2018-04-20 02:28:48 +02:00
|
|
|
.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
|
|
|
|
= f.button safe_join([fa_icon('eye-slash'), t('admin.statuses.batch.nsfw_on')]), name: :nsfw_on, class: 'table-action-link', type: :submit, data: { confirm: t('admin.reports.are_you_sure') }
|
|
|
|
= f.button safe_join([fa_icon('eye'), t('admin.statuses.batch.nsfw_off')]), name: :nsfw_off, class: 'table-action-link', type: :submit, data: { confirm: t('admin.reports.are_you_sure') }
|
|
|
|
= f.button safe_join([fa_icon('trash'), t('admin.statuses.batch.delete')]), name: :delete, class: 'table-action-link', type: :submit, data: { confirm: t('admin.reports.are_you_sure') }
|
|
|
|
.batch-table__body
|
|
|
|
= render partial: 'admin/reports/status', collection: @report.statuses, locals: { f: f }
|
2017-02-17 00:42:52 +01:00
|
|
|
|
2018-04-20 02:28:48 +02:00
|
|
|
%hr.spacer/
|
2018-04-02 22:04:14 +02:00
|
|
|
|
2018-04-20 02:28:48 +02:00
|
|
|
- @report_notes.each do |item|
|
|
|
|
- if item.is_a?(Admin::ActionLog)
|
|
|
|
= render partial: 'action_log', locals: { action_log: item }
|
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
|
|
|
- else
|
2018-04-20 02:28:48 +02:00
|
|
|
= render item
|
2018-04-02 22:04:14 +02:00
|
|
|
|
2018-04-20 02:28:48 +02:00
|
|
|
= simple_form_for @report_note, url: admin_report_notes_path do |f|
|
2018-04-02 22:04:14 +02:00
|
|
|
= render 'shared/error_messages', object: @report_note
|
2018-04-20 02:28:48 +02:00
|
|
|
= f.input :report_id, as: :hidden
|
2018-04-10 20:27:59 +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-10 20:27:59 +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
|