_header_details.html.haml 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. .report-header__details
  2. .report-header__details__item
  3. .report-header__details__item__header
  4. %strong= t('admin.reports.created_at')
  5. .report-header__details__item__content
  6. %time.formatted{ datetime: report.created_at.iso8601 }
  7. .report-header__details__item
  8. .report-header__details__item__header
  9. %strong= t('admin.reports.reported_by')
  10. .report-header__details__item__content
  11. - if report.account.instance_actor?
  12. = site_hostname
  13. - elsif report.account.local?
  14. = admin_account_link_to report.account
  15. - else
  16. = report.account.domain
  17. .report-header__details__item
  18. .report-header__details__item__header
  19. %strong= t('admin.reports.status')
  20. .report-header__details__item__content
  21. - if report.action_taken?
  22. = t('admin.reports.resolved')
  23. - else
  24. = t('admin.reports.unresolved')
  25. - if report.account.local? && !report.target_account.local?
  26. .report-header__details__item
  27. .report-header__details__item__header
  28. %strong= t('admin.reports.forwarded')
  29. .report-header__details__item__content
  30. - if report.forwarded?
  31. = t('simple_form.yes')
  32. - else
  33. = t('simple_form.no')
  34. - if report.action_taken_by_account.present?
  35. .report-header__details__item
  36. .report-header__details__item__header
  37. %strong= t('admin.reports.action_taken_by')
  38. .report-header__details__item__content
  39. = admin_account_link_to report.action_taken_by_account
  40. - else
  41. .report-header__details__item
  42. .report-header__details__item__header
  43. %strong= t('admin.reports.assigned')
  44. .report-header__details__item__content
  45. - if report.assigned_account.nil?
  46. = t 'admin.reports.no_one_assigned'
  47. - else
  48. = admin_account_link_to report.assigned_account
  49. - if report.assigned_account != current_user.account
  50. = table_link_to 'user', t('admin.reports.assign_to_self'), assign_to_self_admin_report_path(report), method: :post
  51. - elsif !report.assigned_account.nil?
  52. = table_link_to 'trash', t('admin.reports.unassign'), unassign_admin_report_path(report), method: :post