aboutsummaryrefslogtreecommitdiffstats
path: root/app/views/blog
diff options
context:
space:
mode:
authorSimon Hambly <simon.hambly@unclouded.co.uk>2011-02-20 22:11:45 +0000
committerSimon Hambly <simon.hambly@unclouded.co.uk>2011-02-20 22:11:45 +0000
commit8c01bcece45b0c132c595e5940ebcacc52fafaad (patch)
tree3db9555942e26328a0724503878ae6644401beff /app/views/blog
parent6fda9d4fa747310b9b6037987ec27f46c438fb10 (diff)
downloadrefinerycms-blog-8c01bcece45b0c132c595e5940ebcacc52fafaad.tar.gz
refinerycms-blog-8c01bcece45b0c132c595e5940ebcacc52fafaad.tar.bz2
refinerycms-blog-8c01bcece45b0c132c595e5940ebcacc52fafaad.zip
tidy up views, removing reference to comments when comments disable
Diffstat (limited to 'app/views/blog')
-rw-r--r--app/views/blog/posts/show.html.erb1
-rw-r--r--app/views/blog/shared/_post.html.erb10
2 files changed, 6 insertions, 5 deletions
diff --git a/app/views/blog/posts/show.html.erb b/app/views/blog/posts/show.html.erb
index 5ac4c76..48ca0b8 100644
--- a/app/views/blog/posts/show.html.erb
+++ b/app/views/blog/posts/show.html.erb
@@ -6,7 +6,6 @@
<% if BlogPost.comments_allowed? %>
<aside id="comments">
<h2><%= t('.comments.title') %></h2>
-
<% if (comments = @blog_post.comments.approved).any? %>
<%= render :partial => "comment", :collection => comments %>
<% else %>
diff --git a/app/views/blog/shared/_post.html.erb b/app/views/blog/shared/_post.html.erb
index 16483a5..2bc71e0 100644
--- a/app/views/blog/shared/_post.html.erb
+++ b/app/views/blog/shared/_post.html.erb
@@ -26,10 +26,12 @@
<%= link_to t('blog.shared.posts.read_more'), blog_post_url(post) %>
<aside class='comment_count'>
- <% if post.comments.any? %>
- (<%= pluralize(post.comments.approved.count, t('blog.shared.comments.singular')) %>)
- <% else %>
- (<%= t('blog.shared.comments.none') %>)
+ <% if BlogPost.comments_allowed? %>
+ <% if post.comments.any? %>
+ (<%= pluralize(post.comments.approved.count, t('blog.shared.comments.singular')) %>)
+ <% else %>
+ (<%= t('blog.shared.comments.none') %>)
+ <% end %>
<% end %>
</aside>
</p>