From 09c5791309f24f21b1ebe98fd692e865ecc680e3 Mon Sep 17 00:00:00 2001 From: albert Date: Sat, 23 Feb 2013 12:55:10 -0500 Subject: [PATCH] fixes #551 --- app/assets/stylesheets/specific/posts.css.scss | 4 ++++ app/views/comments/partials/index/_header.html.erb | 7 ------- app/views/comments/partials/index/_list.html.erb | 8 ++++++++ app/views/posts/show.html.erb | 2 +- 4 files changed, 13 insertions(+), 8 deletions(-) diff --git a/app/assets/stylesheets/specific/posts.css.scss b/app/assets/stylesheets/specific/posts.css.scss index fa1e38c74..0359af93f 100644 --- a/app/assets/stylesheets/specific/posts.css.scss +++ b/app/assets/stylesheets/specific/posts.css.scss @@ -193,6 +193,10 @@ div#c-posts { } } + div.notices { + margin: 1em 0; + } + section { margin-top: 1em; } diff --git a/app/views/comments/partials/index/_header.html.erb b/app/views/comments/partials/index/_header.html.erb index f099de942..47c6b8e43 100644 --- a/app/views/comments/partials/index/_header.html.erb +++ b/app/views/comments/partials/index/_header.html.erb @@ -30,12 +30,5 @@ <% end %> -
- <% if post.comments.hidden(CurrentUser.user).count > 0 || post.comments.count > 6 %> - - <%= link_to "Show all comments", comments_path(:post_id => post.id, :include_below_threshold => true), :remote => true %> - - <% end %> -
diff --git a/app/views/comments/partials/index/_list.html.erb b/app/views/comments/partials/index/_list.html.erb index 6cf5d0a19..172c0e1d7 100644 --- a/app/views/comments/partials/index/_list.html.erb +++ b/app/views/comments/partials/index/_list.html.erb @@ -3,6 +3,14 @@ <%= render "comments/partials/index/header", :post => post %> <% end %> +
+ <% if post.comments.hidden(CurrentUser.user).count > 0 || post.comments.count > 6 %> + + <%= link_to "Show all comments", comments_path(:post_id => post.id, :include_below_threshold => true), :remote => true %> + + <% end %> +
+
<% if comments.empty? %>

There are no comments.

diff --git a/app/views/posts/show.html.erb b/app/views/posts/show.html.erb index 7b53e6085..23364fc5b 100644 --- a/app/views/posts/show.html.erb +++ b/app/views/posts/show.html.erb @@ -53,7 +53,7 @@
- <%= 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 %>