aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUģis Ozols <ugis.ozolss@gmail.com>2010-12-03 08:38:30 +0200
committerUģis Ozols <ugis.ozolss@gmail.com>2010-12-03 08:38:30 +0200
commit7da21ab480a310b5f6ebd5557b6c28a71b1cb287 (patch)
tree879db3cb731a45862c97b954e17828e30023f449
parent75e9940a80602971f5448beb0da13f74ab6f2cb0 (diff)
downloadrefinerycms-blog-7da21ab480a310b5f6ebd5557b6c28a71b1cb287.tar.gz
refinerycms-blog-7da21ab480a310b5f6ebd5557b6c28a71b1cb287.tar.bz2
refinerycms-blog-7da21ab480a310b5f6ebd5557b6c28a71b1cb287.zip
Moved 'no blog posts' text to locale file.
-rw-r--r--app/views/blog/posts/index.html.erb12
-rw-r--r--config/locales/en.yml2
2 files changed, 9 insertions, 5 deletions
diff --git a/app/views/blog/posts/index.html.erb b/app/views/blog/posts/index.html.erb
index ab0abf0..20d8372 100644
--- a/app/views/blog/posts/index.html.erb
+++ b/app/views/blog/posts/index.html.erb
@@ -1,11 +1,13 @@
<% content_for :body_content_left do %>
<%= @page[Page.default_parts.first.to_sym] %>
- <section id="blog_posts">
- <%= render :partial => "/blog/shared/post", :collection => @blog_posts %>
- </section>
- <%= "<p>There are no blog articles posted yet. Stay tuned.</p>".html_safe unless @blog_posts.any? %>
- <%# TODO: Add locale logic here - hubble is a n00b at that %>
+ <% if @blog_posts.any? %>
+ <section id="blog_posts">
+ <%= render :partial => "/blog/shared/post", :collection => @blog_posts %>
+ </section>
+ <% else %>
+ <p><%= t('.no_blog_articles_yet') %></p>
+ <% end %>
<% end %>
<% content_for :body_content_right do %>
diff --git a/config/locales/en.yml b/config/locales/en.yml
index 930dfad..d4129c9 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -105,6 +105,8 @@ en:
time_ago: '%{time} ago'
thank_you: 'Thank you for commenting.'
thank_you_moderated: 'Thank you for commenting. Your message has been placed in the moderation queue and will appear shortly.'
+ index:
+ no_blog_articles_yet: There are no blog articles posted yet. Stay tuned.
show:
comments:
title: Comments