show.html.haml 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. - content_for :page_title do
  2. = t('admin.reports.report', id: @report.id)
  3. - content_for :heading_actions do
  4. - if @report.unresolved?
  5. = link_to t('admin.reports.mark_as_resolved'), resolve_admin_report_path(@report), method: :post, class: 'button'
  6. - else
  7. = link_to t('admin.reports.mark_as_unresolved'), reopen_admin_report_path(@report), method: :post, class: 'button'
  8. - unless @report.account.local? || @report.target_account.local?
  9. .flash-message= t('admin.reports.forwarded_replies_explanation')
  10. .report-header
  11. = render 'admin/reports/header_card', report: @report
  12. = render 'admin/reports/header_details', report: @report
  13. %hr.spacer
  14. %h3= t 'admin.reports.category'
  15. %p= t 'admin.reports.category_description_html'
  16. = react_admin_component :report_reason_selector, id: @report.id, category: @report.category, rule_ids: @report.rule_ids&.map(&:to_s), disabled: @report.action_taken?
  17. - if @report.comment.present?
  18. = render 'admin/reports/comment', report: @report
  19. %hr.spacer/
  20. %h3
  21. = t 'admin.reports.statuses'
  22. %small.section-skip-link
  23. = link_to '#actions' do
  24. = fa_icon 'angle-double-down'
  25. = t('admin.reports.skip_to_actions')
  26. %p
  27. = t 'admin.reports.statuses_description_html'
  28. = 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'
  29. = form_for(@form, url: batch_admin_account_statuses_path(@report.target_account_id, report_id: @report.id)) do |f|
  30. .batch-table
  31. .batch-table__toolbar
  32. %label.batch-table__toolbar__select.batch-checkbox-all
  33. = check_box_tag :batch_checkbox_all, nil, false
  34. .batch-table__toolbar__actions
  35. - if !@statuses.empty? && @report.unresolved?
  36. = f.button safe_join([fa_icon('times'), t('admin.statuses.batch.remove_from_report')]), name: :remove_from_report, class: 'table-action-link', type: :submit
  37. .batch-table__body
  38. - if @statuses.empty?
  39. = nothing_here 'nothing-here--under-tabs'
  40. - else
  41. = render partial: 'admin/reports/status', collection: @statuses, locals: { f: f }
  42. - if @report.unresolved?
  43. %hr.spacer/
  44. %p#actions= t(@report.target_account.local? ? 'admin.reports.actions_description_html' : 'admin.reports.actions_description_remote_html')
  45. = render partial: 'admin/reports/actions', locals: { report: @report, statuses: @statuses }
  46. - unless @action_logs.empty?
  47. %hr.spacer/
  48. %h3= t 'admin.reports.action_log'
  49. .report-notes
  50. = render @action_logs
  51. %hr.spacer/
  52. %h3= t 'admin.reports.notes.title'
  53. %p= t 'admin.reports.notes_description_html'
  54. .report-notes
  55. = render @report_notes
  56. = simple_form_for @report_note, url: admin_report_notes_path do |f|
  57. = f.input :report_id, as: :hidden
  58. .field-group
  59. = f.input :content, placeholder: t('admin.reports.notes.placeholder'), rows: 6
  60. .actions
  61. - if @report.unresolved?
  62. = f.button :button, t('admin.reports.notes.create_and_resolve'), name: :create_and_resolve, type: :submit
  63. - else
  64. = f.button :button, t('admin.reports.notes.create_and_unresolve'), name: :create_and_unresolve, type: :submit
  65. = f.button :button, t('admin.reports.notes.create'), type: :submit