Fix #4525: Show mod report notices next to reported content.
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
<%= link_to(image_tag(comment.post.preview_file_url), post_path(comment.post)) %>
|
||||
<% end %>
|
||||
</div>
|
||||
<%= render_comment(comment, dtext_data: dtext_data, context: :index_by_comment, show_deleted: params.dig(:search, :is_deleted).to_s.truthy?) %>
|
||||
<%= render_comment(comment, dtext_data: dtext_data, context: :index_by_comment, show_deleted: params.dig(:search, :is_deleted).to_s.truthy?, current_user: CurrentUser.user) %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
$("#threshold-comments-notice-for-<%= @post.id %>").hide();
|
||||
|
||||
var current_comment_section = $("div.comments-for-post[data-post-id=<%= @post.id %>] div.list-of-comments");
|
||||
current_comment_section.html("<%= j render_comment_list(@comments, context: :index_by_post, moderation_reports: @post.moderation_reports.visible(CurrentUser.user).recent) %>");
|
||||
current_comment_section.html("<%= j render_comment_list(@comments, context: :index_by_post) %>");
|
||||
$(window).trigger("danbooru:index_for_post", [<%= @post.id %>]);
|
||||
|
||||
@@ -3,13 +3,6 @@
|
||||
<%= render "comments/partials/index/header", :post => post %>
|
||||
<% end %>
|
||||
|
||||
<% if post.moderation_reports.visible(CurrentUser.user).recent.present? %>
|
||||
<div class="row moderation-comments-notice">
|
||||
<span class="info" id="moderation-comments-notice-for-<%= post.id %>">
|
||||
This post has comments reported for moderation! (<%= pluralize(post.moderation_reports.visible(CurrentUser.user).recent.length, "report") %>)
|
||||
</span>
|
||||
</div>
|
||||
<% end %>
|
||||
<% if post.comments.hidden(CurrentUser.user).any? || (page == :comments && post.comments.size > 6) %>
|
||||
<div class="row hidden-comments-notice">
|
||||
<span class="info" id="threshold-comments-notice-for-<%= post.id %>">
|
||||
@@ -20,7 +13,7 @@
|
||||
|
||||
<div class="list-of-comments list-of-messages">
|
||||
<% if comments.present? %>
|
||||
<%= render_comment_list(comments, context: :index_by_post, moderation_reports: post.moderation_reports.visible(CurrentUser.user).recent) %>
|
||||
<%= render_comment_list(comments, context: :index_by_post) %>
|
||||
<% elsif post.last_commented_at.present? %>
|
||||
<p>There are no visible comments.</p>
|
||||
<% else %>
|
||||
|
||||
Reference in New Issue
Block a user