闭社主体 forked from https://github.com/tootsuite/mastodon
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

52 lines
2.1 KiB

  1. - content_for :page_title do
  2. = t('admin.reports.title')
  3. .filters
  4. .filter-subset
  5. %strong= t('admin.reports.status')
  6. %ul
  7. %li= filter_link_to t('admin.reports.unresolved'), resolved: nil
  8. %li= filter_link_to t('admin.reports.resolved'), resolved: '1'
  9. - @reports.group_by(&:target_account_id).each do |target_account_id, reports|
  10. - target_account = reports.first.target_account
  11. .report-card
  12. .report-card__profile
  13. = account_link_to target_account, '', size: 36, path: admin_account_path(target_account.id)
  14. .report-card__profile__stats
  15. = link_to pluralize(target_account.targeted_moderation_notes.count, t('admin.reports.account.note')), admin_account_path(target_account.id)
  16. %br/
  17. - if target_account.suspended?
  18. %span.red= t('admin.accounts.suspended')
  19. - elsif target_account.silenced?
  20. %span.red= t('admin.accounts.silenced')
  21. - elsif target_account.user&.disabled?
  22. %span.red= t('admin.accounts.disabled')
  23. - else
  24. %span.neutral= t('admin.accounts.no_limits_imposed')
  25. .report-card__summary
  26. - reports.each do |report|
  27. .report-card__summary__item
  28. .report-card__summary__item__reported-by
  29. - if report.account.local?
  30. = admin_account_link_to report.account
  31. - else
  32. = report.account.domain
  33. .report-card__summary__item__content
  34. = link_to admin_report_path(report) do
  35. .one-line= report.comment.presence || t('admin.reports.comment.none')
  36. %span.report-card__summary__item__content__icon{ title: t('admin.accounts.statuses') }
  37. = fa_icon('comment')
  38. = report.statuses.count
  39. %span.report-card__summary__item__content__icon{ title: t('admin.accounts.media_attachments') }
  40. = fa_icon('camera')
  41. = report.media_attachments.count
  42. .report-card__summary__item__assigned
  43. - if report.assigned_account.present?
  44. = admin_account_link_to report.assigned_account
  45. - else
  46. \-
  47. = paginate @reports