This commit is contained in:
albert
2013-02-23 12:55:10 -05:00
parent c62b8ee46e
commit 09c5791309
4 changed files with 13 additions and 8 deletions

View File

@@ -193,6 +193,10 @@ div#c-posts {
}
}
div.notices {
margin: 1em 0;
}
section {
margin-top: 1em;
}

View File

@@ -30,12 +30,5 @@
</span>
<% end %>
</div>
<div class="row notices">
<% if post.comments.hidden(CurrentUser.user).count > 0 || post.comments.count > 6 %>
<span class="info" id="threshold-comments-notice-for-<%= post.id %>"%>
<%= link_to "Show all comments", comments_path(:post_id => post.id, :include_below_threshold => true), :remote => true %>
</span>
<% end %>
</div>
</div>

View File

@@ -3,6 +3,14 @@
<%= render "comments/partials/index/header", :post => post %>
<% end %>
<div class="row notices">
<% if post.comments.hidden(CurrentUser.user).count > 0 || post.comments.count > 6 %>
<span class="info" id="threshold-comments-notice-for-<%= post.id %>"%>
<%= link_to "Show all comments", comments_path(:post_id => post.id, :include_below_threshold => true), :remote => true %>
</span>
<% end %>
</div>
<div class="list-of-comments">
<% if comments.empty? %>
<p>There are no comments.</p>

View File

@@ -53,7 +53,7 @@
</menu>
<section id="comments">
<%= render "comments/partials/index/list", :comments => @post.comments, :post => @post, :show_header => false %>
<%= render "comments/partials/index/list", :comments => @post.comments.visible(CurrentUser.user), :post => @post, :show_header => false %>
</section>
<section id="notes" style="display: none;">