aboutsummaryrefslogtreecommitdiffstats
path: root/app/views/admin/blog/_submenu.html.erb
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/admin/blog/_submenu.html.erb
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/admin/blog/_submenu.html.erb')
-rw-r--r--app/views/admin/blog/_submenu.html.erb49
1 files changed, 25 insertions, 24 deletions
diff --git a/app/views/admin/blog/_submenu.html.erb b/app/views/admin/blog/_submenu.html.erb
index e5343e1..f7b95dd 100644
--- a/app/views/admin/blog/_submenu.html.erb
+++ b/app/views/admin/blog/_submenu.html.erb
@@ -26,30 +26,31 @@
:class => 'page_add_icon' %>
</li>
</ul>
-
- <ul class='collapsible_menu'>
- <li>
- <% if BlogComment.unmoderated.any? %>
- <% title = t('.comments.title_with_count', :new_count => BlogComment.unmoderated.size) %>
- <% else %>
- <% title = t('.comments.title') %>
- <% end %>
- <%= link_to title, '#',
- :class => 'comments_icon' %>
- </li>
- <li>
- <%= link_to t('.comments.new'), admin_blog_comments_path,
- :class => 'comment_icon' %>
- </li>
- <li>
- <%= link_to t('.comments.approved'), approved_admin_blog_comments_path,
- :class => 'comment_tick_icon' %>
- </li>
- <li>
- <%= link_to t('.comments.rejected'), rejected_admin_blog_comments_path,
- :class => 'comment_cross_icon' %>
- </li>
- </ul>
+ <% if BlogPost.comments_allowed? %>
+ <ul class='collapsible_menu'>
+ <li>
+ <% if BlogComment.unmoderated.any? %>
+ <% title = t('.comments.title_with_count', :new_count => BlogComment.unmoderated.size) %>
+ <% else %>
+ <% title = t('.comments.title') %>
+ <% end %>
+ <%= link_to title, '#',
+ :class => 'comments_icon' %>
+ </li>
+ <li>
+ <%= link_to t('.comments.new'), admin_blog_comments_path,
+ :class => 'comment_icon' %>
+ </li>
+ <li>
+ <%= link_to t('.comments.approved'), approved_admin_blog_comments_path,
+ :class => 'comment_tick_icon' %>
+ </li>
+ <li>
+ <%= link_to t('.comments.rejected'), rejected_admin_blog_comments_path,
+ :class => 'comment_cross_icon' %>
+ </li>
+ </ul>
+ <% end %>
<ul class='collapsible_menu'>
<li>