-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added tags search to type-specific searches sidebar links (#8532)
* Added Home tooltip to Public Lab link in navbar * replaced .length and .count with .size * Added tags search to type-specific searches sidebar links * style typo fixed * Inserted a partial template to display topic cards on tags search results page
- Loading branch information
Showing
2 changed files
with
27 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,30 @@ | ||
<%= render :partial => "search/nav" , :locals => { :section => "search-tags" }%> | ||
<div class="col-md-2"> | ||
<%= render partial: "search/nav" , locals: { section: "search-tags" } %> | ||
</div> | ||
|
||
<div class="container"> | ||
<% if @tags.present? %> | ||
<div class="container"> | ||
<h2> Results for <%= @search_criteria.query %></h2> | ||
<p> <strong> Searched notes that contain the tag</strong></p> | ||
<hr> | ||
<div class="col-md-10"> | ||
<div class="container"> | ||
<% if @tags.present? %> | ||
<div class="container"> | ||
<h2> Results for <%= @search_criteria.query %></h2> | ||
<p> <strong> Searched notes that contain the tag</strong></p> | ||
<hr> | ||
|
||
<div class="row"> | ||
<% @tags.each do |tag| %> | ||
<p><a href=<%= "#{tag}" %>><%= tag %></a></p> | ||
<div class="row"> | ||
<%= render partial: "tag/topicCard" %> | ||
</div> | ||
</div> | ||
<div class="text-center"> | ||
<% if @pagy %> | ||
<%= raw pagy_bootstrap_nav @pagy %> | ||
<% else %> | ||
<%= will_paginate @tags, renderer: WillPaginate::ActionView::BootstrapLinkRenderer unless @unpaginated %></div> | ||
<% end %> | ||
</div> | ||
</div> | ||
<% else %> | ||
<h4> | ||
No results found for <%= params[:query] %> :-( | ||
<p> Searched notes that contain the tag</p> | ||
</br> | ||
Try searching <a href="/search">for another topic</a> or looking for our items tagged with <a href="/tag/<%= params[:query] %>"><%= params[:query] %></a> | ||
</h4> | ||
<% end %> | ||
<% else %> | ||
<p>No results found for "<b><%= params[:query] %></b>" :-(</p> | ||
<p>Try searching for another topic or looking for our items tagged with <a href="/tag/<%= params[:query] %>"><%= params[:query] %></a> | ||
<% end %> | ||
</div> | ||
</div> | ||
<div class="text-center"> | ||
<% if @pagy %> | ||
<%= raw pagy_bootstrap_nav @pagy %> | ||
<% else %> | ||
<%= will_paginate @tags, renderer: WillPaginate::ActionView::BootstrapLinkRenderer unless @unpaginated %></div> | ||
<% end %> | ||
|