mirror of
https://github.com/lunaisnotaboy/mastodon.git
synced 2024-11-16 03:43:08 +00:00
a22e6a3683
Conflicts: - `app/controllers/statuses_controller.rb`: Upstream disabled the embed controller for reblogs. Not a real conflict, but glitch-soc has an extra line to deal with its theming system. Ported upstream changes. - `app/javascript/packs/public.js`: Upstream made changes to get rid of most inline CSS, this changes javascript for public pages, which in glitch are split between different files. Ported those changes. - `app/models/status.rb`: Upstream changed the block check in `Status#permitted_for` to include domain-block checks. Not a real conflict with glitch-soc, but our scope is slightly different, as our scope for unauthenticated access do not include instance-local toots. Ported upstream changes. - `app/serializers/rest/instance_serializer.rb`: Not a real conflict, upstream added a new field to the instance serializer, the conflict is one line above since we added more of that. Ported upstream changes. - `app/views/settings/profiles/show.html.haml`: Upstream got rid of most inline CSS and moved hidden elements to data attributes in the process, in fields were we have different values. Ported upstream changes while keeping our glitch-specific values. - `app/views/statuses/_simple_status.html.haml`: Upstream got rid of inline CSS on an HAML line we treat differently, stripping empty text nodes. Ported upstream changes to the style attribute, keeping the empty text node stripping behavior.
127 lines
6 KiB
Plaintext
127 lines
6 KiB
Plaintext
- content_for :page_title do
|
|
= t('admin.reports.report', id: @report.id)
|
|
|
|
- content_for :heading_actions do
|
|
- if @report.unresolved?
|
|
= link_to t('admin.reports.mark_as_resolved'), resolve_admin_report_path(@report), method: :post, class: 'button'
|
|
- else
|
|
= link_to t('admin.reports.mark_as_unresolved'), reopen_admin_report_path(@report), method: :post, class: 'button'
|
|
|
|
.table-wrapper
|
|
%table.table.inline-table
|
|
%tbody
|
|
%tr
|
|
%th= t('admin.reports.reported_account')
|
|
%td= admin_account_link_to @report.target_account
|
|
%td= table_link_to 'flag', t('admin.reports.account.reports', count: @report.target_account.targeted_reports.count), admin_reports_path(target_account_id: @report.target_account.id)
|
|
%td= table_link_to 'file', t('admin.reports.account.notes', count: @report.target_account.targeted_moderation_notes.count), admin_reports_path(target_account_id: @report.target_account.id)
|
|
%tr
|
|
%th= t('admin.reports.reported_by')
|
|
- if @report.account.instance_actor?
|
|
%td{ colspan: 3 }= site_hostname
|
|
- elsif @report.account.local?
|
|
%td= admin_account_link_to @report.account
|
|
%td= table_link_to 'flag', t('admin.reports.account.reports', count: @report.account.targeted_reports.count), admin_reports_path(target_account_id: @report.account.id)
|
|
%td= table_link_to 'file', t('admin.reports.account.notes', count: @report.account.targeted_moderation_notes.count), admin_reports_path(target_account_id: @report.account.id)
|
|
- else
|
|
%td{ colspan: 3 }= @report.account.domain
|
|
%tr
|
|
%th= t('admin.reports.created_at')
|
|
%td{ colspan: 3 }
|
|
%time.formatted{ datetime: @report.created_at.iso8601 }
|
|
%tr
|
|
%th= t('admin.reports.updated_at')
|
|
%td{ colspan: 3 }
|
|
%time.formatted{ datetime: @report.updated_at.iso8601 }
|
|
%tr
|
|
%th= t('admin.reports.status')
|
|
%td
|
|
- if @report.action_taken?
|
|
= t('admin.reports.resolved')
|
|
- else
|
|
= t('admin.reports.unresolved')
|
|
%td{ colspan: 2 }
|
|
- 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?
|
|
%tr
|
|
%th= t('admin.reports.action_taken_by')
|
|
%td{ colspan: 3 }
|
|
= admin_account_link_to @report.action_taken_by_account
|
|
- else
|
|
%tr
|
|
%th= t('admin.reports.assigned')
|
|
%td
|
|
- if @report.assigned_account.nil?
|
|
\-
|
|
- else
|
|
= admin_account_link_to @report.assigned_account
|
|
%td
|
|
- if @report.assigned_account != current_user.account
|
|
= table_link_to 'user', t('admin.reports.assign_to_self'), assign_to_self_admin_report_path(@report), method: :post
|
|
%td
|
|
- if !@report.assigned_account.nil?
|
|
= table_link_to 'trash', t('admin.reports.unassign'), unassign_admin_report_path(@report), method: :post
|
|
|
|
%hr.spacer
|
|
|
|
%div.action-buttons
|
|
%div
|
|
|
|
- if @report.unresolved?
|
|
%div
|
|
- if @report.target_account.local?
|
|
= link_to t('admin.accounts.warn'), new_admin_account_action_path(@report.target_account_id, type: 'none', report_id: @report.id), class: 'button'
|
|
= link_to t('admin.accounts.disable'), new_admin_account_action_path(@report.target_account_id, type: 'disable', report_id: @report.id), class: 'button button--destructive'
|
|
= link_to t('admin.accounts.silence'), new_admin_account_action_path(@report.target_account_id, type: 'silence', report_id: @report.id), class: 'button button--destructive'
|
|
= link_to t('admin.accounts.perform_full_suspension'), new_admin_account_action_path(@report.target_account_id, type: 'suspend', report_id: @report.id), class: 'button button--destructive'
|
|
|
|
%hr.spacer
|
|
|
|
.speech-bubble
|
|
.speech-bubble__bubble= simple_format(@report.comment.presence || t('admin.reports.comment.none'))
|
|
.speech-bubble__owner
|
|
- if @report.account.local?
|
|
= admin_account_link_to @report.account
|
|
- else
|
|
= @report.account.domain
|
|
%br/
|
|
%time.formatted{ datetime: @report.created_at.iso8601 }
|
|
|
|
- unless @report.statuses.empty?
|
|
%hr.spacer/
|
|
|
|
= form_for(@form, url: admin_report_reported_statuses_path(@report.id)) do |f|
|
|
.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 }
|
|
|
|
%hr.spacer/
|
|
|
|
- @report_notes.each do |item|
|
|
- if item.is_a?(Admin::ActionLog)
|
|
= render partial: 'action_log', locals: { action_log: item }
|
|
- else
|
|
= render item
|
|
|
|
= simple_form_for @report_note, url: admin_report_notes_path do |f|
|
|
= render 'shared/error_messages', object: @report_note
|
|
= f.input :report_id, as: :hidden
|
|
|
|
.field-group
|
|
= f.input :content, placeholder: t('admin.reports.notes.placeholder'), rows: 6
|
|
|
|
.actions
|
|
- if @report.unresolved?
|
|
= f.button :button, t('admin.reports.notes.create_and_resolve'), name: :create_and_resolve, type: :submit
|
|
- else
|
|
= 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
|