From 7da21ab480a310b5f6ebd5557b6c28a71b1cb287 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?U=C4=A3is=20Ozols?= Date: Fri, 3 Dec 2010 08:38:30 +0200 Subject: Moved 'no blog posts' text to locale file. --- app/views/blog/posts/index.html.erb | 12 +++++++----- config/locales/en.yml | 2 ++ 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] %> -
- <%= render :partial => "/blog/shared/post", :collection => @blog_posts %> -
- <%= "

There are no blog articles posted yet. Stay tuned.

".html_safe unless @blog_posts.any? %> - <%# TODO: Add locale logic here - hubble is a n00b at that %> + <% if @blog_posts.any? %> +
+ <%= render :partial => "/blog/shared/post", :collection => @blog_posts %> +
+ <% else %> +

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

+ <% 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 -- cgit v1.2.3