2017-02-16 10:28:10 +09:00
|
|
|
- content_for :page_title do
|
2017-04-14 04:49:07 +09:00
|
|
|
= t('admin.reports.title')
|
2017-02-16 10:28:10 +09:00
|
|
|
|
|
|
|
.filters
|
|
|
|
.filter-subset
|
2017-04-14 04:49:07 +09:00
|
|
|
%strong= t('admin.reports.status')
|
2017-02-16 10:28:10 +09:00
|
|
|
%ul
|
2017-04-14 18:10:28 +09:00
|
|
|
%li= filter_link_to t('admin.reports.unresolved'), resolved: nil
|
|
|
|
%li= filter_link_to t('admin.reports.resolved'), resolved: '1'
|
2021-07-11 18:01:38 +09:00
|
|
|
.filter-subset
|
|
|
|
%strong= t('admin.reports.target_origin')
|
|
|
|
%ul
|
|
|
|
%li= filter_link_to t('admin.accounts.location.all'), target_origin: nil
|
|
|
|
%li= filter_link_to t('admin.accounts.location.local'), target_origin: 'local'
|
|
|
|
%li= filter_link_to t('admin.accounts.location.remote'), target_origin: 'remote'
|
2017-02-16 10:28:10 +09:00
|
|
|
|
2019-12-01 03:53:58 +09:00
|
|
|
= form_tag admin_reports_url, method: 'GET', class: 'simple_form' do
|
|
|
|
.fields-group
|
2020-01-20 23:55:03 +09:00
|
|
|
- ReportFilter::KEYS.each do |key|
|
|
|
|
= hidden_field_tag key, params[key] if params[key].present?
|
2019-12-01 03:53:58 +09:00
|
|
|
|
|
|
|
- %i(by_target_domain).each do |key|
|
|
|
|
.input.string.optional
|
|
|
|
= text_field_tag key, params[key], class: 'string optional', placeholder: I18n.t("admin.reports.#{key}")
|
|
|
|
|
|
|
|
.actions
|
2020-06-26 07:36:30 +09:00
|
|
|
%button.button= t('admin.accounts.search')
|
2019-12-01 03:53:58 +09:00
|
|
|
= link_to t('admin.accounts.reset'), admin_reports_path, class: 'button negative'
|
|
|
|
|
2023-07-21 00:03:39 +09:00
|
|
|
- @reports.group_by(&:target_account_id).each do |_target_account_id, reports|
|
2018-09-13 10:44:08 +09:00
|
|
|
- target_account = reports.first.target_account
|
|
|
|
.report-card
|
|
|
|
.report-card__profile
|
2020-05-04 05:04:18 +09:00
|
|
|
= account_link_to target_account, '', path: admin_account_path(target_account.id)
|
2018-09-13 10:44:08 +09:00
|
|
|
.report-card__profile__stats
|
2019-12-13 03:50:23 +09:00
|
|
|
= link_to t('admin.reports.account.notes', count: target_account.targeted_moderation_notes.count), admin_account_path(target_account.id)
|
2018-09-13 10:44:08 +09:00
|
|
|
%br/
|
|
|
|
- if target_account.suspended?
|
|
|
|
%span.red= t('admin.accounts.suspended')
|
|
|
|
- elsif target_account.silenced?
|
|
|
|
%span.red= t('admin.accounts.silenced')
|
|
|
|
- elsif target_account.user&.disabled?
|
|
|
|
%span.red= t('admin.accounts.disabled')
|
|
|
|
- else
|
|
|
|
%span.neutral= t('admin.accounts.no_limits_imposed')
|
|
|
|
.report-card__summary
|
|
|
|
- reports.each do |report|
|
|
|
|
.report-card__summary__item
|
|
|
|
.report-card__summary__item__reported-by
|
2019-09-10 03:42:43 +09:00
|
|
|
- if report.account.instance_actor?
|
|
|
|
= site_hostname
|
|
|
|
- elsif report.account.local?
|
2018-09-13 10:44:08 +09:00
|
|
|
= admin_account_link_to report.account
|
|
|
|
- else
|
|
|
|
= report.account.domain
|
|
|
|
.report-card__summary__item__content
|
|
|
|
= link_to admin_report_path(report) do
|
|
|
|
.one-line= report.comment.presence || t('admin.reports.comment.none')
|
2017-04-04 02:17:56 +09:00
|
|
|
|
2018-09-13 10:44:08 +09:00
|
|
|
%span.report-card__summary__item__content__icon{ title: t('admin.accounts.statuses') }
|
|
|
|
= fa_icon('comment')
|
2022-03-09 17:06:17 +09:00
|
|
|
= report.status_ids.size
|
2018-09-13 10:44:08 +09:00
|
|
|
|
|
|
|
%span.report-card__summary__item__content__icon{ title: t('admin.accounts.media_attachments') }
|
|
|
|
= fa_icon('camera')
|
2022-03-09 17:06:17 +09:00
|
|
|
= report.media_attachments_count
|
2018-09-13 10:44:08 +09:00
|
|
|
|
2020-12-15 12:30:15 +09:00
|
|
|
- if report.forwarded?
|
|
|
|
·
|
|
|
|
= t('admin.reports.forwarded_to', domain: target_account.domain)
|
|
|
|
|
2018-09-13 10:44:08 +09:00
|
|
|
.report-card__summary__item__assigned
|
|
|
|
- if report.assigned_account.present?
|
|
|
|
= admin_account_link_to report.assigned_account
|
|
|
|
- else
|
|
|
|
\-
|
2017-04-11 08:11:41 +09:00
|
|
|
= paginate @reports
|