2017-02-16 10:28:10 +09:00
|
|
|
- content_for :page_title do
|
2017-04-14 04:49:07 +09:00
|
|
|
= t('admin.reports.report', id: @report.id)
|
2017-02-17 08:42:52 +09:00
|
|
|
|
2020-01-10 09:10:17 +09:00
|
|
|
- content_for :heading_actions do
|
2018-04-11 03:27:59 +09:00
|
|
|
- if @report.unresolved?
|
2024-10-04 01:12:15 +09:00
|
|
|
= link_to t('admin.reports.mark_as_resolved'), resolve_admin_report_path(@report), method: :post, class: 'button'
|
2018-04-03 05:04:14 +09:00
|
|
|
- else
|
2024-10-04 01:12:15 +09:00
|
|
|
= link_to t('admin.reports.mark_as_unresolved'), reopen_admin_report_path(@report), method: :post, class: 'button'
|
2018-04-03 05:04:14 +09:00
|
|
|
|
2023-11-15 23:18:43 +09:00
|
|
|
- unless @report.account.local? || @report.target_account.local?
|
|
|
|
.flash-message= t('admin.reports.forwarded_replies_explanation')
|
|
|
|
|
2022-01-17 17:41:33 +09:00
|
|
|
.report-header
|
2023-10-17 01:07:17 +09:00
|
|
|
= render 'admin/reports/header_card', report: @report
|
|
|
|
= render 'admin/reports/header_details', report: @report
|
2018-04-03 05:04:14 +09:00
|
|
|
|
2018-04-20 09:28:48 +09:00
|
|
|
%hr.spacer
|
2018-04-03 05:04:14 +09:00
|
|
|
|
2022-01-17 17:41:33 +09:00
|
|
|
%h3= t 'admin.reports.category'
|
2020-04-29 02:39:16 +09:00
|
|
|
|
2022-01-17 17:41:33 +09:00
|
|
|
%p= t 'admin.reports.category_description_html'
|
2019-12-17 07:55:16 +09:00
|
|
|
|
2024-03-20 22:45:34 +09:00
|
|
|
= react_admin_component :report_reason_selector,
|
|
|
|
category: @report.category,
|
|
|
|
disabled: @report.action_taken?,
|
|
|
|
id: @report.id,
|
|
|
|
rule_ids: @report.rule_ids&.map(&:to_s)
|
2019-12-17 07:55:16 +09:00
|
|
|
|
2022-01-17 17:41:33 +09:00
|
|
|
- if @report.comment.present?
|
2023-10-17 01:07:17 +09:00
|
|
|
= render 'admin/reports/comment', report: @report
|
2022-01-17 17:41:33 +09:00
|
|
|
|
|
|
|
%hr.spacer/
|
2017-02-17 08:42:52 +09:00
|
|
|
|
2022-02-12 05:51:57 +09:00
|
|
|
%h3
|
|
|
|
= t 'admin.reports.statuses'
|
|
|
|
%small.section-skip-link
|
|
|
|
= link_to '#actions' do
|
2024-08-08 08:08:36 +09:00
|
|
|
= material_symbol 'keyboard_double_arrow_down'
|
2022-02-12 05:51:57 +09:00
|
|
|
= t('admin.reports.skip_to_actions')
|
2022-01-17 17:41:33 +09:00
|
|
|
|
|
|
|
%p
|
|
|
|
= t 'admin.reports.statuses_description_html'
|
|
|
|
—
|
2024-04-24 01:43:49 +09:00
|
|
|
= link_to safe_join([material_symbol('add'), t('admin.reports.add_to_report')]),
|
2024-03-15 20:19:00 +09:00
|
|
|
admin_account_statuses_path(@report.target_account_id, report_id: @report.id),
|
|
|
|
class: 'table-action-link'
|
2022-01-17 17:41:33 +09:00
|
|
|
|
2024-06-14 18:54:22 +09:00
|
|
|
= form_with model: @form, url: batch_admin_account_statuses_path(@report.target_account_id, report_id: @report.id) do |f|
|
2022-01-17 17:41:33 +09: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
|
|
|
|
- if !@statuses.empty? && @report.unresolved?
|
2024-04-24 01:43:49 +09:00
|
|
|
= f.button safe_join([material_symbol('close'), t('admin.statuses.batch.remove_from_report')]), name: :remove_from_report, class: 'table-action-link', type: :submit
|
2022-01-17 17:41:33 +09:00
|
|
|
.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 09:28:48 +09:00
|
|
|
%hr.spacer/
|
2018-04-03 05:04:14 +09:00
|
|
|
|
2023-01-13 19:03:14 +09:00
|
|
|
%p#actions= t(@report.target_account.local? ? 'admin.reports.actions_description_html' : 'admin.reports.actions_description_remote_html')
|
2022-02-12 05:51:57 +09:00
|
|
|
|
2023-10-11 22:58:33 +09:00
|
|
|
= render partial: 'admin/reports/actions', locals: { report: @report, statuses: @statuses }
|
2022-01-17 17:41:33 +09:00
|
|
|
|
|
|
|
- unless @action_logs.empty?
|
|
|
|
%hr.spacer/
|
|
|
|
|
|
|
|
%h3= t 'admin.reports.action_log'
|
|
|
|
|
|
|
|
.report-notes
|
|
|
|
= render @action_logs
|
2018-04-20 09:28:48 +09:00
|
|
|
|
|
|
|
%hr.spacer/
|
|
|
|
|
2022-01-17 17:41:33 +09:00
|
|
|
%h3= t 'admin.reports.notes.title'
|
|
|
|
|
|
|
|
%p= t 'admin.reports.notes_description_html'
|
|
|
|
|
|
|
|
.report-notes
|
|
|
|
= render @report_notes
|
2018-04-20 09:28:48 +09:00
|
|
|
|
2024-05-15 22:38:36 +09:00
|
|
|
= simple_form_for @report_note, url: admin_report_notes_path do |form|
|
|
|
|
= form.input :report_id, as: :hidden
|
|
|
|
|
|
|
|
= render 'shared/error_messages', object: @report_note
|
2018-04-03 05:04:14 +09:00
|
|
|
|
2018-04-20 09:28:48 +09:00
|
|
|
.field-group
|
2024-05-15 22:38:36 +09:00
|
|
|
= form.input :content, input_html: { placeholder: t('admin.reports.notes.placeholder'), maxlength: ReportNote::CONTENT_SIZE_LIMIT, rows: 6, autofocus: @report_note.errors.any? }
|
2018-04-03 05:04:14 +09:00
|
|
|
|
2018-04-20 09:28:48 +09:00
|
|
|
.actions
|
2018-04-11 03:27:59 +09:00
|
|
|
- if @report.unresolved?
|
2024-05-15 22:38:36 +09:00
|
|
|
= form.button :button, t('admin.reports.notes.create_and_resolve'), name: :create_and_resolve, type: :submit
|
2018-04-11 03:27:59 +09:00
|
|
|
- else
|
2024-05-15 22:38:36 +09:00
|
|
|
= form.button :button, t('admin.reports.notes.create_and_unresolve'), name: :create_and_unresolve, type: :submit
|
|
|
|
= form.button :button, t('admin.reports.notes.create'), type: :submit
|