- Posts and topics have an added moderation_reports function -- This is so all moderation reports can be loaded in a single query - Those moderation reports are passed into the render functions separately -- This is so the individual comments/posts don't have to be queried
6 lines
523 B
Plaintext
6 lines
523 B
Plaintext
$("#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(partial: 'comments/partials/show/comment', collection: @comments, locals: { context: :index_for_post, dtext_data: DText.preprocess(@comments.map(&:body)), moderation_reports: (CurrentUser.is_moderator? ? @post.moderation_reports : []) })) %>");
|
|
$(window).trigger("danbooru:index_for_post", [<%= @post.id %>]);
|