Merge pull request #3238 from evazion/fix-1156

Fix #1156: Allow sequential search navigator to work without a search.
This commit is contained in:
Albert Yi
2017-07-26 17:08:29 -07:00
committed by GitHub
4 changed files with 18 additions and 19 deletions

View File

@@ -1,6 +1,6 @@
<% if (position == "bottom" && CurrentUser.user.new_post_navigation_layout) || (position == "top" && !CurrentUser.user.new_post_navigation_layout) %>
<div id="nav-links" class="ui-corner-all nav-notice">
<% if CurrentUser.user.enable_sequential_post_navigation && params[:tags].present? && params[:tags] !~ /(?:^|\s)(?:order|ordfav|ordpool):/ %>
<% if post.presenter.has_sequential_navigation?(self) %>
<%= render "posts/partials/show/search_seq", :post => post %>
<% end %>

View File

@@ -2,7 +2,7 @@
<ul>
<li class="active">
<%= link_to "&lsaquo;&thinsp;prev".html_safe, show_seq_post_path(post, :tags => params[:tags], :seq => "prev"), :rel => "prev nofollow", :class => "prev" %>
<span class="search-name">Search: <%= params[:tags] %></span>
<span class="search-name">Search: <%= params[:tags].presence || "status:any" %></span>
<%= link_to "next&thinsp;&rsaquo;".html_safe, show_seq_post_path(post, :tags => params[:tags], :seq => "next"), :rel => "next nofollow", :class => "next" %>
</li>
</ul>