Files
danbooru/app/views/comments/_index_by_comment.html.erb
evazion d8a55bd62b comments: fix video duration not being shown on thumbnails
Fix the video duration not being shown on thumbnails on the
https://danbooru.donmai.us/comments page.

BUG: this introduces duplicate HTML ids on the comments page. Post
thumbnails and post comment containers both have the same html ID.
2021-11-02 03:46:48 -05:00

18 lines
679 B
Plaintext

<div id="p-index-by-comment" class="comments-for-post">
<div class="list-of-comments list-of-messages">
<% dtext_data = DText.preprocess(@comments.map(&:body)) %>
<% @comments.each do |comment| %>
<%= tag.div id: "post_#{comment.post.id}", **PostPreviewComponent.new(post: comment.post).article_attrs("post space-x-4") do %>
<% if policy(comment.post).visible? %>
<%= post_preview(comment.post, show_deleted: true) %>
<% end %>
<%= render_comment(comment, dtext_data: dtext_data, context: :index_by_comment, current_user: CurrentUser.user) %>
<% end %>
<% end %>
</div>
</div>
<%= numbered_paginator(@comments) %>