2017-02-15 17:28:10 -08:00
|
|
|
- content_for :page_title do
|
2017-04-13 12:49:07 -07:00
|
|
|
= t('admin.reports.report', id: @report.id)
|
2017-02-16 15:42:52 -08:00
|
|
|
|
2018-04-02 13:04:14 -07:00
|
|
|
%div{ style: 'overflow: hidden; margin-bottom: 20px' }
|
2018-04-10 11:27:59 -07:00
|
|
|
- if @report.unresolved?
|
2018-04-02 13:04:14 -07:00
|
|
|
%div{ style: 'float: right' }
|
|
|
|
= link_to t('admin.reports.silence_account'), admin_report_path(@report, outcome: 'silence'), method: :put, class: 'button'
|
2018-08-22 02:53:41 -07:00
|
|
|
= link_to t('admin.reports.suspend_account'), new_admin_account_suspension_path(@report.target_account_id, report_id: @report.id), class: 'button'
|
2018-04-02 13:04:14 -07:00
|
|
|
%div{ style: 'float: left' }
|
|
|
|
= link_to t('admin.reports.mark_as_resolved'), admin_report_path(@report, outcome: 'resolve'), method: :put, class: 'button'
|
|
|
|
- else
|
|
|
|
= link_to t('admin.reports.mark_as_unresolved'), admin_report_path(@report, outcome: 'reopen'), method: :put, class: 'button'
|
|
|
|
|
2018-04-19 17:28:48 -07:00
|
|
|
%hr.spacer
|
|
|
|
|
2018-04-02 13:04:14 -07:00
|
|
|
.table-wrapper
|
|
|
|
%table.table.inline-table
|
|
|
|
%tbody
|
2018-04-19 17:28:48 -07:00
|
|
|
%tr
|
|
|
|
%th= t('admin.reports.reported_account')
|
|
|
|
%td= admin_account_link_to @report.target_account
|
|
|
|
%td= table_link_to 'flag', pluralize(@report.target_account.targeted_reports.count, t('admin.reports.account.report')), admin_reports_path(target_account_id: @report.target_account.id)
|
|
|
|
%td= table_link_to 'file', pluralize(@report.target_account.targeted_moderation_notes.count, t('admin.reports.account.note')), admin_reports_path(target_account_id: @report.target_account.id)
|
|
|
|
%tr
|
|
|
|
%th= t('admin.reports.reported_by')
|
2018-05-04 04:26:25 -07:00
|
|
|
- if @report.account.local?
|
|
|
|
%td= admin_account_link_to @report.account
|
|
|
|
%td= table_link_to 'flag', pluralize(@report.account.targeted_reports.count, t('admin.reports.account.report')), admin_reports_path(target_account_id: @report.account.id)
|
|
|
|
%td= table_link_to 'file', pluralize(@report.account.targeted_moderation_notes.count, t('admin.reports.account.note')), admin_reports_path(target_account_id: @report.account.id)
|
|
|
|
- else
|
|
|
|
%td{ colspan: 3 }= @report.account.domain
|
2018-04-10 11:27:59 -07:00
|
|
|
%tr
|
|
|
|
%th= t('admin.reports.created_at')
|
2018-04-19 17:28:48 -07:00
|
|
|
%td{ colspan: 3 }
|
2018-04-10 11:27:59 -07:00
|
|
|
%time.formatted{ datetime: @report.created_at.iso8601 }
|
2018-04-02 13:04:14 -07:00
|
|
|
%tr
|
|
|
|
%th= t('admin.reports.updated_at')
|
2018-04-19 17:28:48 -07:00
|
|
|
%td{ colspan: 3 }
|
2018-04-02 13:04:14 -07:00
|
|
|
%time.formatted{ datetime: @report.updated_at.iso8601 }
|
|
|
|
%tr
|
|
|
|
%th= t('admin.reports.status')
|
2018-04-10 11:27:59 -07:00
|
|
|
%td
|
2018-04-02 13:04:14 -07:00
|
|
|
- if @report.action_taken?
|
|
|
|
= t('admin.reports.resolved')
|
|
|
|
- else
|
|
|
|
= t('admin.reports.unresolved')
|
2018-04-19 17:28:48 -07:00
|
|
|
%td{ colspan: 2 }
|
2018-04-10 11:27:59 -07: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 13:04:14 -07:00
|
|
|
- if !@report.action_taken_by_account.nil?
|
|
|
|
%tr
|
|
|
|
%th= t('admin.reports.action_taken_by')
|
2018-04-19 17:28:48 -07:00
|
|
|
%td{ colspan: 3 }
|
|
|
|
= admin_account_link_to @report.action_taken_by_account
|
2018-04-02 13:04:14 -07:00
|
|
|
- else
|
|
|
|
%tr
|
|
|
|
%th= t('admin.reports.assigned')
|
|
|
|
%td
|
|
|
|
- if @report.assigned_account.nil?
|
|
|
|
\-
|
|
|
|
- else
|
2018-04-19 17:28:48 -07:00
|
|
|
= admin_account_link_to @report.assigned_account
|
|
|
|
%td
|
2018-04-02 13:04:14 -07:00
|
|
|
- if @report.assigned_account != current_user.account
|
|
|
|
= table_link_to 'user', t('admin.reports.assign_to_self'), admin_report_path(@report, outcome: 'assign_to_self'), method: :put
|
2018-04-19 17:28:48 -07:00
|
|
|
%td
|
2018-04-02 13:04:14 -07:00
|
|
|
- if !@report.assigned_account.nil?
|
|
|
|
= table_link_to 'trash', t('admin.reports.unassign'), admin_report_path(@report, outcome: 'unassign'), method: :put
|
|
|
|
|
2018-04-19 17:28:48 -07:00
|
|
|
%hr.spacer
|
2018-04-02 13:04:14 -07:00
|
|
|
|
2018-04-19 17:28:48 -07:00
|
|
|
.speech-bubble
|
|
|
|
.speech-bubble__bubble= simple_format(@report.comment.presence || t('admin.reports.comment.none'))
|
|
|
|
.speech-bubble__owner
|
2018-05-21 08:33:20 -07:00
|
|
|
- if @report.account.local?
|
|
|
|
= admin_account_link_to @report.account
|
|
|
|
- else
|
|
|
|
= @report.account.domain
|
|
|
|
%br/
|
2018-04-19 17:28:48 -07:00
|
|
|
%time.formatted{ datetime: @report.created_at.iso8601 }
|
2017-02-16 15:42:52 -08:00
|
|
|
|
2017-04-14 02:10:28 -07:00
|
|
|
- unless @report.statuses.empty?
|
2018-04-19 17:28:48 -07:00
|
|
|
%hr.spacer/
|
2018-04-02 13:04:14 -07:00
|
|
|
|
2017-07-18 07:38:22 -07:00
|
|
|
= form_for(@form, url: admin_report_reported_statuses_path(@report.id)) do |f|
|
2018-04-19 17:28:48 -07: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-16 15:42:52 -08:00
|
|
|
|
2018-04-19 17:28:48 -07:00
|
|
|
%hr.spacer/
|
2018-04-02 13:04:14 -07:00
|
|
|
|
2018-04-19 17:28:48 -07:00
|
|
|
- @report_notes.each do |item|
|
|
|
|
- if item.is_a?(Admin::ActionLog)
|
|
|
|
= render partial: 'action_log', locals: { action_log: item }
|
|
|
|
- elsif item.is_a?(ReportNote)
|
|
|
|
= render item
|
2018-04-02 13:04:14 -07:00
|
|
|
|
2018-04-19 17:28:48 -07:00
|
|
|
= simple_form_for @report_note, url: admin_report_notes_path do |f|
|
2018-04-02 13:04:14 -07:00
|
|
|
= render 'shared/error_messages', object: @report_note
|
2018-04-19 17:28:48 -07:00
|
|
|
= f.input :report_id, as: :hidden
|
2018-04-10 11:27:59 -07:00
|
|
|
|
2018-04-19 17:28:48 -07:00
|
|
|
.field-group
|
|
|
|
= f.input :content, placeholder: t('admin.reports.notes.placeholder'), rows: 6
|
2018-04-10 11:27:59 -07:00
|
|
|
|
2018-04-19 17:28:48 -07:00
|
|
|
.actions
|
2018-04-10 11:27:59 -07:00
|
|
|
- if @report.unresolved?
|
2018-04-19 17:28:48 -07:00
|
|
|
= f.button :button, t('admin.reports.notes.create_and_resolve'), name: :create_and_resolve, type: :submit
|
2018-04-10 11:27:59 -07:00
|
|
|
- else
|
2018-04-19 17:28:48 -07: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
|