show.html.haml 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. - content_for :page_title do
  2. = t('statuses.title', name: display_name(@account), quote: truncate(@status.spoiler_text.presence || @status.text, length: 50, omission: '…', escape: false))
  3. - content_for :heading_actions do
  4. = link_to t('admin.statuses.open'), ActivityPub::TagManager.instance.url_for(@status), class: 'button', target: '_blank', rel: 'noopener noreferrer'
  5. %h3= t('admin.statuses.metadata')
  6. .table-wrapper
  7. %table.table.horizontal-table
  8. %tbody
  9. %tr
  10. %th= t('admin.statuses.account')
  11. %td= admin_account_link_to @status.account
  12. - if @status.reply?
  13. %tr
  14. %th= t('admin.statuses.in_reply_to')
  15. %td= admin_account_link_to @status.in_reply_to_account, path: admin_account_status_path(@status.thread.account_id, @status.in_reply_to_id)
  16. %tr
  17. %th= t('admin.statuses.application')
  18. %td= @status.application&.name
  19. %tr
  20. %th= t('admin.statuses.language')
  21. %td= standard_locale_name(@status.language)
  22. %tr
  23. %th= t('admin.statuses.visibility')
  24. %td= t("statuses.visibilities.#{@status.visibility}")
  25. - if @status.trend
  26. %tr
  27. %th= t('admin.statuses.trending')
  28. %td
  29. - if @status.trend.allowed?
  30. %abbr{ title: t('admin.trends.tags.current_score', score: @status.trend.score) }= t('admin.trends.tags.trending_rank', rank: @status.trend.rank)
  31. - elsif @status.requires_review?
  32. = t('admin.trends.pending_review')
  33. - else
  34. = t('admin.trends.not_allowed_to_trend')
  35. %tr
  36. %th= t('admin.statuses.reblogs')
  37. %td= friendly_number_to_human @status.reblogs_count
  38. %tr
  39. %th= t('admin.statuses.favourites')
  40. %td= friendly_number_to_human @status.favourites_count
  41. %hr.spacer/
  42. %h3= t('admin.statuses.history')
  43. %ol.history
  44. - batched_ordered_status_edits.with_index do |status_edit, i|
  45. %li
  46. .history__entry
  47. %h5
  48. - if i.zero?
  49. = t('admin.statuses.original_status')
  50. - else
  51. = t('admin.statuses.status_changed')
  52. ·
  53. %time.formatted{ datetime: status_edit.created_at.iso8601, title: l(status_edit.created_at) }= l(status_edit.created_at)
  54. = render status_edit