diff options
author | Matt Jankowski <matt@jankowski.online> | 2024-03-19 12:11:10 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-19 16:11:10 +0000 |
commit | 4c84891453378ca9db03657ec42f96684223e85c (patch) | |
tree | e228c4a41e1e238e5619367291088d1c09037b2e | |
parent | ffc5be4820ed7bad4656489f096230dd7965140b (diff) |
Pull out full `li` element into admin/status_edits/status_edit partial (#29499)
-rw-r--r-- | app/views/admin/status_edits/_status_edit.html.haml | 44 | ||||
-rw-r--r-- | app/views/admin/statuses/show.html.haml | 13 |
2 files changed, 28 insertions, 29 deletions
diff --git a/app/views/admin/status_edits/_status_edit.html.haml b/app/views/admin/status_edits/_status_edit.html.haml index 19a0e063dab..72547772132 100644 --- a/app/views/admin/status_edits/_status_edit.html.haml +++ b/app/views/admin/status_edits/_status_edit.html.haml @@ -1,20 +1,30 @@ -.status - .status__content>< - - if status_edit.spoiler_text.blank? - = prerender_custom_emojis(status_content_format(status_edit), status_edit.emojis) - - else - %details< - %summary>< - %strong> Content warning: #{prerender_custom_emojis(h(status_edit.spoiler_text), status_edit.emojis)} - = prerender_custom_emojis(status_content_format(status_edit), status_edit.emojis) +%li + .history__entry + %h5 + - if status_edit_iteration.first? + = t('admin.statuses.original_status') + - else + = t('admin.statuses.status_changed') + · + %time.formatted{ datetime: status_edit.created_at.iso8601, title: l(status_edit.created_at) }= l(status_edit.created_at) - - unless status_edit.ordered_media_attachments.empty? - = render partial: 'admin/reports/media_attachments', locals: { status: status_edit } + .status + .status__content>< + - if status_edit.spoiler_text.blank? + = prerender_custom_emojis(status_content_format(status_edit), status_edit.emojis) + - else + %details< + %summary>< + %strong> Content warning: #{prerender_custom_emojis(h(status_edit.spoiler_text), status_edit.emojis)} + = prerender_custom_emojis(status_content_format(status_edit), status_edit.emojis) - .detailed-status__meta - %time.formatted{ datetime: status_edit.created_at.iso8601, title: l(status_edit.created_at) }= l(status_edit.created_at) + - unless status_edit.ordered_media_attachments.empty? + = render partial: 'admin/reports/media_attachments', locals: { status: status_edit } - - if status_edit.sensitive? - · - = fa_icon('eye-slash fw') - = t('stream_entries.sensitive_content') + .detailed-status__meta + %time.formatted{ datetime: status_edit.created_at.iso8601, title: l(status_edit.created_at) }= l(status_edit.created_at) + + - if status_edit.sensitive? + · + = fa_icon('eye-slash fw') + = t('stream_entries.sensitive_content') diff --git a/app/views/admin/statuses/show.html.haml b/app/views/admin/statuses/show.html.haml index 0e88624def4..9cadde2870c 100644 --- a/app/views/admin/statuses/show.html.haml +++ b/app/views/admin/statuses/show.html.haml @@ -47,15 +47,4 @@ %h3= t('admin.statuses.history') %ol.history - - batched_ordered_status_edits.with_index do |status_edit, i| - %li - .history__entry - %h5 - - if i.zero? - = t('admin.statuses.original_status') - - else - = t('admin.statuses.status_changed') - · - %time.formatted{ datetime: status_edit.created_at.iso8601, title: l(status_edit.created_at) }= l(status_edit.created_at) - - = render status_edit + = render partial: 'admin/status_edits/status_edit', collection: batched_ordered_status_edits |