logo

mastofe

My custom branche(s) on git.pleroma.social/pleroma/mastofe git clone https://hacktivis.me/git/mastofe.git

show.html.haml (5737B)


  1. - content_for :header_tags do
  2. = javascript_pack_tag 'admin', integrity: true, async: true, crossorigin: 'anonymous'
  3. - content_for :page_title do
  4. = t('admin.reports.report', id: @report.id)
  5. %div{ style: 'overflow: hidden; margin-bottom: 20px' }
  6. - if @report.unresolved?
  7. %div{ style: 'float: right' }
  8. = link_to t('admin.reports.silence_account'), admin_report_path(@report, outcome: 'silence'), method: :put, class: 'button'
  9. = link_to t('admin.reports.suspend_account'), admin_report_path(@report, outcome: 'suspend'), method: :put, class: 'button'
  10. %div{ style: 'float: left' }
  11. = link_to t('admin.reports.mark_as_resolved'), admin_report_path(@report, outcome: 'resolve'), method: :put, class: 'button'
  12. - else
  13. = link_to t('admin.reports.mark_as_unresolved'), admin_report_path(@report, outcome: 'reopen'), method: :put, class: 'button'
  14. .table-wrapper
  15. %table.table.inline-table
  16. %tbody
  17. %tr
  18. %th= t('admin.reports.created_at')
  19. %td{colspan: 2}
  20. %time.formatted{ datetime: @report.created_at.iso8601 }
  21. %tr
  22. %th= t('admin.reports.updated_at')
  23. %td{colspan: 2}
  24. %time.formatted{ datetime: @report.updated_at.iso8601 }
  25. %tr
  26. %th= t('admin.reports.status')
  27. %td
  28. - if @report.action_taken?
  29. = t('admin.reports.resolved')
  30. - else
  31. = t('admin.reports.unresolved')
  32. %td{style: "text-align: right; overflow: hidden;"}
  33. - if @report.action_taken?
  34. = table_link_to 'envelope-open', t('admin.reports.reopen'), admin_report_path(@report, outcome: 'reopen'), method: :put
  35. - if !@report.action_taken_by_account.nil?
  36. %tr
  37. %th= t('admin.reports.action_taken_by')
  38. %td{colspan: 2}
  39. = @report.action_taken_by_account.acct
  40. - else
  41. %tr
  42. %th= t('admin.reports.assigned')
  43. %td
  44. - if @report.assigned_account.nil?
  45. \-
  46. - else
  47. = link_to @report.assigned_account.acct, admin_account_path(@report.assigned_account.id)
  48. %td{style: "text-align: right"}
  49. - if @report.assigned_account != current_user.account
  50. = table_link_to 'user', t('admin.reports.assign_to_self'), admin_report_path(@report, outcome: 'assign_to_self'), method: :put
  51. - if !@report.assigned_account.nil?
  52. = table_link_to 'trash', t('admin.reports.unassign'), admin_report_path(@report, outcome: 'unassign'), method: :put
  53. %hr{ class: "section-break"}/
  54. .report-accounts
  55. .report-accounts__item
  56. %h3= t('admin.reports.reported_account')
  57. = render 'authorize_follows/card', account: @report.target_account, admin: true
  58. = render 'admin/accounts/card', account: @report.target_account
  59. .report-accounts__item
  60. %h3= t('admin.reports.reported_by')
  61. = render 'authorize_follows/card', account: @report.account, admin: true
  62. = render 'admin/accounts/card', account: @report.account
  63. %h3= t('admin.reports.comment.label')
  64. = simple_format(@report.comment.presence || t('admin.reports.comment.none'))
  65. - unless @report.statuses.empty?
  66. %hr/
  67. %h3= t('admin.reports.statuses')
  68. = form_for(@form, url: admin_report_reported_statuses_path(@report.id)) do |f|
  69. .batch-form-box
  70. .batch-checkbox-all
  71. = check_box_tag :batch_checkbox_all, nil, false
  72. = f.select :action, Form::StatusBatch::ACTION_TYPE.map{|action| [t("admin.statuses.batch.#{action}"), action]}
  73. = f.submit t('admin.statuses.execute'), data: { confirm: t('admin.reports.are_you_sure') }, class: 'button'
  74. .media-spoiler-toggle-buttons
  75. .media-spoiler-show-button.button= t('admin.statuses.media.show')
  76. .media-spoiler-hide-button.button= t('admin.statuses.media.hide')
  77. - @report.statuses.each do |status|
  78. .report-status{ data: { id: status.id } }
  79. .batch-checkbox
  80. = f.check_box :status_ids, { multiple: true, include_hidden: false }, status.id
  81. .activity-stream.activity-stream-headless
  82. .entry= render 'stream_entries/simple_status', status: status
  83. .report-status__actions
  84. - unless status.media_attachments.empty?
  85. = link_to admin_report_reported_status_path(@report, status, status: { sensitive: !status.sensitive }), method: :put, class: 'icon-button nsfw-button', title: t("admin.reports.nsfw.#{!status.sensitive}") do
  86. = fa_icon status.sensitive? ? 'eye' : 'eye-slash'
  87. = 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
  88. = fa_icon 'trash'
  89. %hr{ class: "section-break"}/
  90. %h3= t('admin.reports.notes.label')
  91. - if @report_notes.length > 0
  92. %ul
  93. = render @report_notes
  94. %h4= t('admin.reports.notes.new_label')
  95. = form_for @report_note, url: admin_report_notes_path, html: { class: 'report-note__form' } do |f|
  96. = render 'shared/error_messages', object: @report_note
  97. = f.text_area :content, placeholder: t('admin.reports.notes.placeholder'), rows: 6, class: 'report-note__textarea'
  98. = f.hidden_field :report_id
  99. %div{ class: 'report-note__buttons' }
  100. - if @report.unresolved?
  101. = f.submit t('admin.reports.notes.create_and_resolve'), name: :create_and_resolve, class: 'button report-note__button'
  102. - else
  103. = f.submit t('admin.reports.notes.create_and_unresolve'), name: :create_and_unresolve, class: 'button report-note__button'
  104. = f.submit t('admin.reports.notes.create'), class: 'button report-note__button'
  105. - if @report_history.length > 0
  106. %h3= t('admin.reports.history')
  107. %ul
  108. = render @report_history