aboutsummaryrefslogtreecommitdiffstats
path: root/app/views/blog/shared/_categories.html.erb
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/blog/shared/_categories.html.erb')
-rw-r--r--app/views/blog/shared/_categories.html.erb18
1 files changed, 10 insertions, 8 deletions
diff --git a/app/views/blog/shared/_categories.html.erb b/app/views/blog/shared/_categories.html.erb
index 675271c..05cc53f 100644
--- a/app/views/blog/shared/_categories.html.erb
+++ b/app/views/blog/shared/_categories.html.erb
@@ -1,8 +1,10 @@
-<h2><%= t('.title') %></h2>
-<ul id='categories'>
- <% @blog_categories.each do |category| %>
- <li<%= " class='selected'" if @category.present? and @category.id == category.id %>>
- <%= link_to "#{category.title} (#{category.post_count})", blog_category_url(category) %>
- </li>
- <% end %>
-</ul>
+<% if @blog_categories.any? %>
+ <h2><%= t('.title') %></h2>
+ <ul id='categories'>
+ <% @blog_categories.each do |category| %>
+ <li<%= " class='selected'" if @category.present? and @category.id == category.id %>>
+ <%= link_to "#{category.title} (#{category.post_count})", blog_category_url(category) %>
+ </li>
+ <% end %>
+ </ul>
+<% end %> \ No newline at end of file