_report_note.html.haml 977 B

123456789101112131415161718192021
  1. .report-notes__item
  2. = image_tag report_note.account.avatar.url, class: 'report-notes__item__avatar'
  3. .report-notes__item__header
  4. %span.username
  5. = link_to report_note.account.username, admin_account_path(report_note.account_id)
  6. %time{ datetime: report_note.created_at.iso8601, title: l(report_note.created_at) }
  7. - if report_note.created_at.today?
  8. = t('admin.report_notes.today_at', time: l(report_note.created_at, format: :time))
  9. - else
  10. = l report_note.created_at.to_date
  11. .report-notes__item__content
  12. = simple_format(h(report_note.content))
  13. - if can?(:destroy, report_note)
  14. .report-notes__item__actions
  15. - if report_note.is_a?(AccountModerationNote)
  16. = table_link_to 'trash', t('admin.reports.notes.delete'), admin_account_moderation_note_path(report_note), method: :delete
  17. - else
  18. = table_link_to 'trash', t('admin.reports.notes.delete'), admin_report_note_path(report_note), method: :delete