Skip to content

Commit

Permalink
No results message
Browse files Browse the repository at this point in the history
  • Loading branch information
brittnylapierre committed Dec 1, 2023
1 parent f0895b4 commit 14194cc
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions app/components/legacy_ocr_search_component.html.erb
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
<% if @term.length != 0 && @term != "*:*" %>
<span term="<%= @term %>">
<%= I18n.t('L_MATCHING_PAGES_PRE')%> '<%= @term %>' <%= I18n.t('L_MATCHING_PAGES_SUF')%>:
</span>
<%= content %>

<% if @legacy_ocr_search_results %>
<% @legacy_ocr_search_results.each do |legacy_ocr_search_result| %>
<a href="/catalog/<%= @documentId %>?pageNum=<%= legacy_ocr_search_result %>&q=<%= @term %>"><%= legacy_ocr_search_result %></a><% if legacy_ocr_search_result != @legacy_ocr_search_results.last %>, <% end %>
<% if @legacy_ocr_search_results.length %>
<span term="<%= @term %>">
<%= I18n.t('L_MATCHING_PAGES_PRE')%> '<%= @term %>' <%= I18n.t('L_MATCHING_PAGES_SUF')%>:
</span>
<%= content %>
<% @legacy_ocr_search_results.each do |legacy_ocr_search_result| %>
<a href="/catalog/<%= @documentId %>?pageNum=<%= legacy_ocr_search_result %>&q=<%= @term %>"><%= legacy_ocr_search_result %></a><% if legacy_ocr_search_result != @legacy_ocr_search_results.last %>, <% end %>
<% end %>
<% else %>
<span term="<%= @term %>">
No results for '<%= @term %>' in this item %>:
</span>
<% end %>
<% end %>
<% end %>
<% end %>

0 comments on commit 14194cc

Please sign in to comment.