From ce9c66363123a5353580113145e6372433feaa25 Mon Sep 17 00:00:00 2001 From: Philip Arndt Date: Mon, 21 Feb 2011 13:24:31 +1300 Subject: Only show these sections when there is relevant information to show. --- app/views/blog/shared/_categories.html.erb | 18 ++++++++++-------- app/views/blog/shared/_posts.html.erb | 18 ++++++++++-------- 2 files changed, 20 insertions(+), 16 deletions(-) (limited to 'app') 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 @@ -

<%= t('.title') %>

- +<% if @blog_categories.any? %> +

<%= t('.title') %>

+ +<% end %> \ No newline at end of file diff --git a/app/views/blog/shared/_posts.html.erb b/app/views/blog/shared/_posts.html.erb index cbf865f..24a8199 100644 --- a/app/views/blog/shared/_posts.html.erb +++ b/app/views/blog/shared/_posts.html.erb @@ -1,8 +1,10 @@ -

<%= t('.other') %>

- +<% if @blog_posts.many? %> +

<%= t('.other') %>

+ +<% end %> \ No newline at end of file -- cgit v1.2.3