Merge pull request #339 from bitWolfy/post-navbar-link

[Posts] Make the search terms in the post navbar into a link
This commit is contained in:
Zwagoth 2021-10-26 01:42:47 -04:00 committed by GitHub
commit 4fea15eab4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,7 +2,13 @@
<ul>
<li class="active">
<%= link_to "&lsaquo;&thinsp;prev".html_safe, show_seq_post_path(post, :q => params[:q], :seq => "prev"), :rel => "prev nofollow", :class => "prev" %>
<span class="search-name">Search: <%= params[:q].presence || "(none)" %></span>
<span class="search-name">
<% if params[:q].nil? %>
Search: (none)
<% else %>
<%= link_to("Search: #{params[:q]}", posts_path(:tags => params[:q])) %>
<% end %>
</span>
<%= link_to "next&thinsp;&rsaquo;".html_safe, show_seq_post_path(post, :q => params[:q], :seq => "next"), :rel => "next nofollow", :class => "next" %>
</li>
</ul>