index.html.haml 1.4 KB

123456789101112131415161718192021222324252627282930313233343536
  1. - content_for :page_title do
  2. = t('settings.severed_relationships')
  3. %p.muted-hint= t('severed_relationships.preamble')
  4. - unless @events.empty?
  5. .table-wrapper
  6. %table.table
  7. %thead
  8. %tr
  9. %th= t('exports.archive_takeout.date')
  10. %th= t('severed_relationships.type')
  11. %th= t('severed_relationships.lost_follows')
  12. %th= t('severed_relationships.lost_followers')
  13. %tbody
  14. - @events.each do |event|
  15. %tr
  16. %td
  17. %time.formatted{ datetime: event.created_at.iso8601, title: l(event.created_at) }
  18. = l(event.created_at)
  19. %td= t("severed_relationships.event_type.#{event.type}", target_name: event.target_name)
  20. - if event.purged?
  21. %td{ rowspan: 2 }= t('severed_relationships.purged')
  22. - else
  23. %td
  24. - count = event.following_count
  25. - if count.zero?
  26. = t('generic.none')
  27. - else
  28. = table_link_to 'download', t('severed_relationships.download', count: count), following_severed_relationship_path(event, format: :csv)
  29. %td
  30. - count = event.followers_count
  31. - if count.zero?
  32. = t('generic.none')
  33. - else
  34. = table_link_to 'download', t('severed_relationships.download', count: count), followers_severed_relationship_path(event, format: :csv)