@ -5,7 +5,7 @@
= t('admin.reports.report', id: @report.id)
= t('admin.reports.report', id: @report.id)
%div{ style: 'overflow: hidden; margin-bottom: 20px' }
%div{ style: 'overflow: hidden; margin-bottom: 20px' }
- if !@report.action_taken ?
- if @report.unresolved ?
%div{ style: 'float: right' }
%div{ style: 'float: right' }
= link_to t('admin.reports.silence_account'), admin_report_path(@report, outcome: 'silence'), method: :put, class: 'button'
= link_to t('admin.reports.silence_account'), admin_report_path(@report, outcome: 'silence'), method: :put, class: 'button'
= link_to t('admin.reports.suspend_account'), admin_report_path(@report, outcome: 'suspend'), method: :put, class: 'button'
= link_to t('admin.reports.suspend_account'), admin_report_path(@report, outcome: 'suspend'), method: :put, class: 'button'
@ -17,22 +17,29 @@
.table-wrapper
.table-wrapper
%table.table.inline-table
%table.table.inline-table
%tbody
%tbody
%tr
%th= t('admin.reports.created_at')
%td{colspan: 2}
%time.formatted{ datetime: @report.created_at.iso8601 }
%tr
%tr
%th= t('admin.reports.updated_at')
%th= t('admin.reports.updated_at')
%td{colspan: 2}
%td{colspan: 2}
%time.formatted{ datetime: @report.updated_at.iso8601 }
%time.formatted{ datetime: @report.updated_at.iso8601 }
%tr
%tr
%th= t('admin.reports.status')
%th= t('admin.reports.status')
%td{colspan: 2}
%td
- if @report.action_taken?
- if @report.action_taken?
= t('admin.reports.resolved')
= t('admin.reports.resolved')
= table_link_to 'envelope-open', t('admin.reports.reopen'), admin_report_path(@report, outcome: 'reopen'), method: :put
- else
- else
= t('admin.reports.unresolved')
= t('admin.reports.unresolved')
%td{style: "text-align: right; overflow: hidden;"}
- if @report.action_taken?
= table_link_to 'envelope-open', t('admin.reports.reopen'), admin_report_path(@report, outcome: 'reopen'), method: :put
- if !@report.action_taken_by_account.nil?
- if !@report.action_taken_by_account.nil?
%tr
%tr
%th= t('admin.reports.action_taken_by')
%th= t('admin.reports.action_taken_by')
%td= @report.action_taken_by_account.acct
%td{colspan: 2}
= @report.action_taken_by_account.acct
- else
- else
%tr
%tr
%th= t('admin.reports.assigned')
%th= t('admin.reports.assigned')
@ -47,6 +54,8 @@
- if !@report.assigned_account.nil?
- if !@report.assigned_account.nil?
= table_link_to 'trash', t('admin.reports.unassign'), admin_report_path(@report, outcome: 'unassign'), method: :put
= table_link_to 'trash', t('admin.reports.unassign'), admin_report_path(@report, outcome: 'unassign'), method: :put
%hr{ class: "section-break"}/
.report-accounts
.report-accounts
.report-accounts__item
.report-accounts__item
%h3= t('admin.reports.reported_account')
%h3= t('admin.reports.reported_account')
@ -88,22 +97,28 @@
= link_to admin_report_reported_status_path(@report, status), method: :delete, class: 'icon-button trash-button', title: t('admin.reports.delete'), data: { confirm: t('admin.reports.are_you_sure') }, remote: true do
= link_to admin_report_reported_status_path(@report, status), method: :delete, class: 'icon-button trash-button', title: t('admin.reports.delete'), data: { confirm: t('admin.reports.are_you_sure') }, remote: true do
= fa_icon 'trash'
= fa_icon 'trash'
%hr/
%hr{ class: "section-break"} /
%h3= t('admin.reports.notes.label')
%h3= t('admin.reports.notes.label')
- if @report_notes.length > 0
- if @report_notes.length > 0
.table-wrapper
%ul
%table.table
%thead
%tr
%th
%tbody
= render @report_notes
= render @report_notes
= simple_form_for @report_note, url: admin_report_notes_path do |f|
%h4= t('admin.reports.notes.new_label')
= form_for @report_note, url: admin_report_notes_path, html: { class: 'report-note__form' } do |f|
= render 'shared/error_messages', object: @report_note
= render 'shared/error_messages', object: @report_note
= f.input :content
= f.text_area :content, placeholder: t('admin.reports.notes.placeholder'), rows: 6, class: 'report-note__textarea'
= f.hidden_field :report_id
= f.hidden_field :report_id
= f.button :button, t('admin.reports.notes.create'), type: :submit
%div{ class: 'report-note__buttons' }
= f.button :button, t('admin.reports.notes.create_and_resolve'), type: :submit, name: :create_and_resolve
- if @report.unresolved?
= f.submit t('admin.reports.notes.create_and_resolve'), name: :create_and_resolve, class: 'button report-note__button'
- else
= f.submit t('admin.reports.notes.create_and_unresolve'), name: :create_and_unresolve, class: 'button report-note__button'
= f.submit t('admin.reports.notes.create'), class: 'button report-note__button'
- if @report_history.length > 0
%h3= t('admin.reports.history')
%ul
= render @report_history