fixed comment hiding
This commit is contained in:
@@ -1 +1,11 @@
|
||||
$("div.comments-for-post[data-post-id=<%= @post.id %>] div.notices").hide();
|
||||
$("#hidden-comments-notice-for-<%= @post.id %>").hide();
|
||||
|
||||
$("div.comments-for-post[data-post-id=<%= @post.id %>] div.list-of-comments").html("<%= j(render(:partial => 'comments/partials/show/comment', :collection => @comments))%>");
|
||||
|
||||
<% if params[:include_below_threshold] %>
|
||||
$("#threshold-comments-notice-for-<%= @post.id %>").hide();
|
||||
Danbooru.Comment.highlight_threshold_comments(<%= @post.id %>);
|
||||
<% else %>
|
||||
Danbooru.Comment.hide_threshold_comments(<%= @post.id %>);
|
||||
<% end %>
|
||||
|
||||
|
||||
@@ -33,12 +33,12 @@
|
||||
<div class="row notices">
|
||||
<% if post.comments.count > 6 %>
|
||||
<span class="info" id="hidden-comments-notice-for-<%= post.id %>"%>
|
||||
<%= link_to "#{pluralize(post.comments.size, 'comment')} hidden", comments_path(:post_id => post.id), :remote => true %>.
|
||||
<%= link_to "#{pluralize(post.comments.size, 'comment')} hidden", comments_path(:post_id => post.id), :remote => true %>
|
||||
</span>
|
||||
<% end %>
|
||||
<% if post.comments.hidden(CurrentUser.user).count > 0 %>
|
||||
<span class="info" id="threshold-comments-notice-for-<%= post.id %>"%>
|
||||
<%= link_to "#{pluralize(post.comments.hidden(CurrentUser.user).count, 'comment')} below threshold", comments_path(:post_id => post.id, :include_hidden => true), :remote => true %>.
|
||||
<%= link_to "#{pluralize(post.comments.hidden(CurrentUser.user).count, 'comment')} below threshold", comments_path(:post_id => post.id, :include_below_threshold => true), :remote => true %>
|
||||
</span>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<article data-comment-id="<%= comment.id %>">
|
||||
<article class="comment" data-post-id="<%= comment.post_id %>" data-comment-id="<%= comment.id %>" data-score="<%= comment.score %>">
|
||||
<div class="author">
|
||||
<h1><%= link_to comment.creator_name, user_path(comment.creator_id) %></h1>
|
||||
<p>
|
||||
|
||||
Reference in New Issue
Block a user