diff options
author | Uģis Ozols <ugis.ozolss@gmail.com> | 2010-12-03 09:48:47 +0200 |
---|---|---|
committer | Uģis Ozols <ugis.ozolss@gmail.com> | 2010-12-03 09:48:47 +0200 |
commit | 2db680dd9835bdfb01ebfff90398ae5a9d8b45da (patch) | |
tree | 741852432d0b4dc008e1e54debe1090fa8cb6aa6 /app | |
parent | a0ec0bce1469af3a5c41781344a7497f1870c3e6 (diff) | |
download | refinerycms-blog-2db680dd9835bdfb01ebfff90398ae5a9d8b45da.tar.gz refinerycms-blog-2db680dd9835bdfb01ebfff90398ae5a9d8b45da.tar.bz2 refinerycms-blog-2db680dd9835bdfb01ebfff90398ae5a9d8b45da.zip |
Refactored nav partial, added 'blog home' to locale and removed unneeded <nav></nav> tags.
Diffstat (limited to 'app')
-rw-r--r-- | app/views/blog/posts/_nav.html.erb | 20 | ||||
-rw-r--r-- | app/views/blog/posts/_post.html.erb | 4 |
2 files changed, 10 insertions, 14 deletions
diff --git a/app/views/blog/posts/_nav.html.erb b/app/views/blog/posts/_nav.html.erb index 50391ee..c73a294 100644 --- a/app/views/blog/posts/_nav.html.erb +++ b/app/views/blog/posts/_nav.html.erb @@ -1,13 +1,11 @@ -<% if next_or_previous?(@blog_post) -%> - <nav id="next_prev_article"> - <% if @blog_post.next.present? -%> - <%= link_to raw(truncate(@blog_post.next.title) + " »"), @blog_post.next, :class => 'next' %> - <% end -%> +<nav id="next_prev_article"> + <% if @blog_post.next.present? -%> + <%= link_to (truncate(@blog_post.next.title) + " »").html_safe, @blog_post.next, :class => 'next' %> + <% end -%> - <%= link_to 'Blog Home', blog_root_path, :class => 'home' %> + <%= link_to t('blog.posts.show.blog_home'), blog_root_path, :class => 'home' %> - <% if @blog_post.prev.present? -%> - <%= link_to "« ".html_safe + truncate(@blog_post.prev.title), @blog_post.prev, :class => 'prev' %> - <% end -%> - </nav><!-- /next_prev_article --> -<% end -%> + <% if @blog_post.prev.present? -%> + <%= link_to ("« " + truncate(@blog_post.prev.title)).html_safe, @blog_post.prev, :class => 'prev' %> + <% end -%> +</nav><!-- /next_prev_article --> diff --git a/app/views/blog/posts/_post.html.erb b/app/views/blog/posts/_post.html.erb index 6fb8e64..fc58af6 100644 --- a/app/views/blog/posts/_post.html.erb +++ b/app/views/blog/posts/_post.html.erb @@ -28,7 +28,5 @@ </article> <%= render :partial => '/shared/draft_page_message' unless @blog_post.nil? or @blog_post.live? -%> <% if next_or_previous?(@blog_post) -%> - <nav id="next_prev_article"> - <%= render 'nav' %> - </nav><!-- /next_prev_article --> + <%= render 'nav' %> <% end -%> |