aboutsummaryrefslogtreecommitdiffstats
path: root/app/views/blog
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/blog')
-rw-r--r--app/views/blog/posts/_nav.html.erb3
-rw-r--r--app/views/blog/posts/show.html.erb7
2 files changed, 6 insertions, 4 deletions
diff --git a/app/views/blog/posts/_nav.html.erb b/app/views/blog/posts/_nav.html.erb
new file mode 100644
index 0000000..6a36a10
--- /dev/null
+++ b/app/views/blog/posts/_nav.html.erb
@@ -0,0 +1,3 @@
+<%= 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) 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', :"data-nav-url" => update_blog_nav_path(@blog_post.prev) if @blog_post.prev.present? %> \ No newline at end of file
diff --git a/app/views/blog/posts/show.html.erb b/app/views/blog/posts/show.html.erb
index 530bede..778b011 100644
--- a/app/views/blog/posts/show.html.erb
+++ b/app/views/blog/posts/show.html.erb
@@ -13,9 +13,7 @@
</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? %>
+ <%= render 'nav' %>
</nav><!-- /next_prev_article -->
<% end -%>
<% if BlogPost.comments_allowed? %>
@@ -79,4 +77,5 @@
<% end %>
<%= render :partial => "/shared/content_page", :locals => { :remove_automatic_sections => true } %>
-<% content_for :stylesheets, stylesheet_link_tag('refinerycms-blog') %> \ No newline at end of file
+<% content_for :stylesheets, stylesheet_link_tag('refinerycms-blog') %>
+<% content_for :javascripts, javascript_include_tag('jquery','refinerycms-blog') %> \ No newline at end of file