Add previous page link for crawlers

This commit is contained in:
Neil Lalonde
2014-02-25 12:15:20 -05:00
parent 9ebcdfba1f
commit 7288bf1f31
4 changed files with 35 additions and 11 deletions

View File

@@ -4,9 +4,15 @@
<% end %>
</div>
<% if @list.topics.length > 0 %>
<p><a href="<%= @list.more_topics_url.sub('.json?','?') %>" rel="next"><%= t 'next_page'%></a></p>
<% end %>
<p>
<% if params[:page].to_i > 1 %>
<a href="<%= @list.prev_topics_url.sub('.json?','?') %>" rel="prev" style="margin-right: 30px;"><%= t 'prev_page'%></a>
<% end %>
<% if @list.topics.length > 0 %>
<a href="<%= @list.more_topics_url.sub('.json?','?') %>" rel="next"><%= t 'next_page'%></a>
<% end %>
</p>
<p><%= t 'powered_by_html' %></p>