aboutsummaryrefslogtreecommitdiffstats
path: root/app/views/blog
diff options
context:
space:
mode:
authorJoe Sak <joe@joesak.com>2010-11-20 11:35:08 -0600
committerJoe Sak <joe@joesak.com>2010-11-20 11:35:08 -0600
commita214b9e7168890ce52c3336350663669cb938ce5 (patch)
treec815cd3f8feef60163d8ae1381550ea217d81ccd /app/views/blog
parent43d8c3a7ff35b4ec79767a204c14b33d90f7f1ab (diff)
downloadrefinerycms-blog-a214b9e7168890ce52c3336350663669cb938ce5.tar.gz
refinerycms-blog-a214b9e7168890ce52c3336350663669cb938ce5.tar.bz2
refinerycms-blog-a214b9e7168890ce52c3336350663669cb938ce5.zip
Added Next, Previous Article & Home navigation
Diffstat (limited to 'app/views/blog')
-rw-r--r--app/views/blog/posts/show.html.erb7
1 files changed, 7 insertions, 0 deletions
diff --git a/app/views/blog/posts/show.html.erb b/app/views/blog/posts/show.html.erb
index f8d4b35..6d11197 100644
--- a/app/views/blog/posts/show.html.erb
+++ b/app/views/blog/posts/show.html.erb
@@ -31,6 +31,13 @@
<span class="st_sharethis" displayText="ShareThis"></span>
<% end %>
</article>
+ <% if next_or_previous?(@blog_post) -%>
+ <nav id="next_prev_article">
+ <%= link_to raw(truncate(@blog_post.next.title) + "&nbsp;&#187;"), @blog_post.next, :class => 'next' if @blog_post.next.present? %>
+ <%= link_to 'Blog Home', blog_root_path, :class => 'home' %>
+ <%= link_to "&#171;&nbsp;".html_safe + truncate(@blog_post.prev.title), @blog_post.prev, :class => 'prev' if @blog_post.prev.present? %>
+ </nav><!-- /next_prev_article -->
+ <% end -%>
<% if BlogPost.comments_allowed? %>
<aside id="comments">
<h2><%= t('.comments.title') %></h2>