Skip to content

Commit

Permalink
Fix notes
Browse files Browse the repository at this point in the history
  • Loading branch information
stitching-coder committed Nov 27, 2023
1 parent 4dc8c02 commit b63bada
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions public/app/views/shared/_result_record_summary.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,13 @@
<% unless result.highlights.empty? %>
<div class="highlights">
<% unless result.highlights.reject{ |k,v| k.include?('title') || k.include?('notes') || k.include?('types') || v.join(' ').split("\/").count > 2 }.count == 0 %>
<% unless result.highlights.reject{ |k,v| k.include?('title') || k =~ (/^notes$/) || k.include?('types') || v.join(' ').split("\/").count > 2 }.count == 0 %>
<br/>
<span class='inline-label'>Search Terms in Context</span>
<br/>
<% end %>
<% result.highlights.each do |k,v| %>
<% unless k.include?('title') || k.include?('notes') || k.include?('types') || v.join(' ').split("\/").count > 2 %>
<% unless k.include?('title') || k =~ (/^notes$/) || k.include?('types') || v.join(' ').split("\/").count > 2 %>
<span class='inline-label'><%= t("#{k.split('_')[0]}:") %></span>
<% if result[k].length > v.join(" ").length %>
<% v << ' ...' %>
Expand Down
4 changes: 2 additions & 2 deletions public/app/views/shared/_single_note.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<% rr.each do |k| %>
<% highlights(k, subnote['_text']) %>
<% end %>
<% elsif !@search[:q].empty? %>
<% elsif !@search.nil? && !@search[:q].empty? %>
<% @search[:q].each do |q| %>
<% q.split(' ').each do |k| %>
<% highlights(k, subnote['_text']) %>
Expand Down Expand Up @@ -44,7 +44,7 @@
<% rr.each do |k| %>
<% highlights(k, note_struct['note_text']) %>
<% end %>
<% elsif !@search[:q].empty? %>
<% elsif !@search.nil? && !@search[:q].empty? %>
<% @search[:q].each do |q| %>
<% q.split(' ').each do |k| %>
<% highlights(k, note_struct['note_text']) %>
Expand Down

0 comments on commit b63bada

Please sign in to comment.