aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoe Sak <joe@joesak.com>2010-11-20 15:42:26 -0600
committerJoe Sak <joe@joesak.com>2010-11-20 15:42:26 -0600
commitef60c3df70f20c6c806daff39a7bb15026bf80ef (patch)
treeb570a7812a67ae1e7c39d4879db671e78711af0e
parentcd28dbf187ec5722bc937eadab95e107a1c49036 (diff)
downloadrefinerycms-blog-ef60c3df70f20c6c806daff39a7bb15026bf80ef.tar.gz
refinerycms-blog-ef60c3df70f20c6c806daff39a7bb15026bf80ef.tar.bz2
refinerycms-blog-ef60c3df70f20c6c806daff39a7bb15026bf80ef.zip
continued refactor
-rw-r--r--app/views/blog/posts/_nav.html.erb16
1 files changed, 10 insertions, 6 deletions
diff --git a/app/views/blog/posts/_nav.html.erb b/app/views/blog/posts/_nav.html.erb
index 3f9f80b..309cd64 100644
--- a/app/views/blog/posts/_nav.html.erb
+++ b/app/views/blog/posts/_nav.html.erb
@@ -1,9 +1,13 @@
-<% if @blog_post.next.present? -%>
- <%= link_to raw(truncate(@blog_post.next.title) + "&nbsp;&#187;"), @blog_post.next, :class => 'next', :"data-nav-url" => update_blog_nav_path(@blog_post.next) %>
-<% end -%>
+<% if next_or_previous?(@blog_post) -%>
+ <nav id="next_prev_article">
+ <% if @blog_post.next.present? -%>
+ <%= link_to raw(truncate(@blog_post.next.title) + "&nbsp;&#187;"), @blog_post.next, :class => 'next', :"data-nav-url" => update_blog_nav_path(@blog_post.next) %>
+ <% end -%>
-<%= link_to 'Blog Home', blog_root_path, :class => 'home' %>
+ <%= link_to 'Blog Home', blog_root_path, :class => 'home' %>
-<% if @blog_post.prev.present? -%>
- <%= link_to "&#171;&nbsp;".html_safe + truncate(@blog_post.prev.title), @blog_post.prev, :class => 'prev', :"data-nav-url" => update_blog_nav_path(@blog_post.prev) %>
+ <% if @blog_post.prev.present? -%>
+ <%= link_to "&#171;&nbsp;".html_safe + truncate(@blog_post.prev.title), @blog_post.prev, :class => 'prev', :"data-nav-url" => update_blog_nav_path(@blog_post.prev) %>
+ <% end -%>
+ </nav><!-- /next_prev_article -->
<% end -%> \ No newline at end of file