_counters.html.haml 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. .dashboard__counters.admin-account-counters
  2. %div
  3. = link_to admin_account_statuses_path(account.id) do
  4. .dashboard__counters__num= number_with_delimiter account.statuses_count
  5. .dashboard__counters__label= t 'admin.accounts.statuses'
  6. %div
  7. = link_to admin_account_statuses_path(account.id, { media: true }) do
  8. .dashboard__counters__num= number_to_human_size account.media_attachments.sum('file_file_size')
  9. .dashboard__counters__label= t 'admin.accounts.media_attachments'
  10. %div
  11. = link_to admin_account_relationships_path(account.id, location: account.local? ? nil : 'local', relationship: 'followed_by') do
  12. .dashboard__counters__num= number_with_delimiter account.local_followers_count
  13. .dashboard__counters__label= t 'admin.accounts.followers'
  14. %div
  15. = link_to admin_reports_path(account_id: account.id) do
  16. .dashboard__counters__num= number_with_delimiter account.reports.count
  17. .dashboard__counters__label= t 'admin.accounts.show.created_reports'
  18. %div
  19. = link_to admin_reports_path(target_account_id: account.id) do
  20. .dashboard__counters__num= number_with_delimiter account.targeted_reports.count
  21. .dashboard__counters__label= t 'admin.accounts.show.targeted_reports'
  22. %div
  23. = link_to admin_action_logs_path(target_account_id: account.id) do
  24. .dashboard__counters__text
  25. - if account.local? && account.user.nil?
  26. = t('admin.accounts.deleted')
  27. - elsif account.memorial?
  28. = t('admin.accounts.memorialized')
  29. - elsif account.suspended?
  30. = t('admin.accounts.suspended')
  31. - elsif account.silenced?
  32. = t('admin.accounts.silenced')
  33. - elsif account.local? && account.user&.disabled?
  34. = t('admin.accounts.disabled')
  35. - elsif account.local? && !account.user&.confirmed?
  36. = t('admin.accounts.confirming')
  37. - elsif account.local? && !account.user_approved?
  38. = t('admin.accounts.pending')
  39. - elsif account.sensitized?
  40. = t('admin.accounts.sensitive')
  41. - else
  42. = t('admin.accounts.no_limits_imposed')
  43. .dashboard__counters__label= t 'admin.accounts.login_status'