mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 17:46:05 -05:00
rel="prev" and rel="next" for topic also
This commit is contained in:
parent
b05dd86e50
commit
66ae439ded
2 changed files with 12 additions and 8 deletions
|
@ -4,15 +4,15 @@
|
|||
<% end %>
|
||||
</div>
|
||||
|
||||
<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>
|
||||
<% if @list.topics.length > 0 %>
|
||||
<p>
|
||||
<% if params[:page].to_i > 1 %>
|
||||
<a href="<%= @list.prev_topics_url.sub('.json?','?') %>" rel="prev"><%= t 'prev_page'%></a>
|
||||
<% end %>
|
||||
</p>
|
||||
<b><a href="<%= @list.more_topics_url.sub('.json?','?') %>" rel="next"><%= t 'next_page'%></a></b>
|
||||
</p>
|
||||
<% end %>
|
||||
|
||||
<p><%= t 'powered_by_html' %></p>
|
||||
|
||||
|
|
|
@ -15,9 +15,13 @@
|
|||
<% end %>
|
||||
<% end %>
|
||||
|
||||
|
||||
<% if @topic_view.next_page %>
|
||||
<p>
|
||||
<b><%= link_to(t('next_page').html_safe, @topic_view.next_page_path ) %></b>
|
||||
<% if params[:page].to_i > 1 %>
|
||||
<a href="" rel="prev"><%= t 'prev_page'%></a>
|
||||
<% end %>
|
||||
<b><a href="<%= @topic_view.next_page_path %>" rel="next"><%= t 'next_page'%></a></b>
|
||||
</p>
|
||||
<% end %>
|
||||
|
||||
|
|
Loading…
Reference in a new issue