about summary refs log tree commit diff
path: root/app/views/admin/reports/index.html.haml
blob: bfbd32108e468e725aa31fe052cb1248b51cce70 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
- content_for :page_title do
  = t('admin.reports.title')

.filters
  .filter-subset
    %strong= t('admin.reports.status')
    %ul
      %li= filter_link_to t('admin.reports.unresolved'), resolved: nil
      %li= filter_link_to t('admin.reports.resolved'), resolved: '1'

- @reports.group_by(&:target_account_id).each do |target_account_id, reports|
  - target_account = reports.first.target_account
  .report-card
    .report-card__profile
      = account_link_to target_account, '', size: 36, path: admin_account_path(target_account.id)
      .report-card__profile__stats
        = link_to pluralize(target_account.targeted_moderation_notes.count, t('admin.reports.account.note')), admin_account_path(target_account.id)
        %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
            - if report.account.instance_actor?
              = site_hostname
            - elsif report.account.local?
              = 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')

              %span.report-card__summary__item__content__icon{ title: t('admin.accounts.statuses') }
                = fa_icon('comment')
                = report.statuses.count

              %span.report-card__summary__item__content__icon{ title: t('admin.accounts.media_attachments') }
                = fa_icon('camera')
                = report.media_attachments.count

          .report-card__summary__item__assigned
            - if report.assigned_account.present?
              = admin_account_link_to report.assigned_account
            - else
              \-
= paginate @reports