Updated search page to consolidate results into one list

This commit is contained in:
2022-12-17 23:43:26 -05:00
parent 421539f38c
commit 5139d8b492
4 changed files with 15 additions and 17 deletions

View File

@ -1,25 +1,14 @@
<div class="row">
<div class="twelve columns">
<h4>Matching hardware:</h4>
<% if items.length > 0 %>
<h4>Matching inventory:</h4>
<% if results.length > 0 %>
<ul class="u-full-width">
<% items.each do |r| %>
<li><a href="/item/<%= r.id %>"><%= r.name %></a></li>
<% results.each do |r| %>
<li><a href="<%= r.getLink() %>"><%= r.name %></a></li>
<% end %>
</ul>
<% else %>
<p>Sorry, nothing in your hardware inventory matches that search term.</p>
<% end %>
<h4>Matching licenses:</h4>
<% if licenses.length > 0 %>
<ul class="u-full-width">
<% licenses.each do |r| %>
<li><a href="/item/<%= r.id %>"><%= r.name %></a></li>
<% end %>
</ul>
<% else %>
<p>Sorry, nothing in your license inventory matches that search term.</p>
<% end %>
</div>
</div>