Skip to content

Commit

Permalink
Fix more about
Browse files Browse the repository at this point in the history
  • Loading branch information
stitching-coder committed Nov 26, 2023
1 parent dc4561c commit ef9a43e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
1 change: 0 additions & 1 deletion public/app/models/solr_results.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ def parse_record(result, full)
record.criteria = @search_opts
unless @raw['highlighting'][result['id']].nil?
record.highlights = @raw['highlighting'][result['id']]
record['title'][0..record.highlights["title"][0].length] = record.highlights["title"][0] unless record.highlights["title"].nil?
end
record
end
Expand Down
2 changes: 1 addition & 1 deletion public/app/views/agents/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

<% if show_agents_sidebar?(@result) %>
<div id="sidebar" class="col-sm-3 sidebar sidebar-container">
<h3><%= t('more_about') %> '<%= @result.display_string %>'</h3>
<h3><%= t('more_about') %> '<%= strip_tags(@result.display_string) %>'</h3>
<div class="acc_holder clear" >
<div class="panel-group" id="agent_accordion">

Expand Down
10 changes: 7 additions & 3 deletions public/app/views/shared/_idbadge.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,17 @@ end
<%= (props.fetch(:full,false)? '<h1>' : '<h3>').html_safe %>
<% if !props.fetch(:full,false) %>
<a class="record-title" href="<%= app_prefix(url) %>">
<% if !result.highlights.empty? && !result.highlights["title"].nil? %>
<%== result["title"].gsub(/<em>/, '<span class="searchterm">').gsub(/<\/em>/, '</span>') %>
<% elsif !rr.nil? %>
<% if !rr.nil? %>
<% rr.each do |k| %>
<% highlights(k, result["title"]) %>
<% end %>
<%= result["title"].html_safe %>
<% elsif !@search[:q].empty? %>
<% @search[:q].each do |q| %>
<% q.split(' ').each do |k| %>
<% highlights(k, result["title"]) %>
<% end %>
<% end %>
<% else %>
<%== props.fetch(:infinite_item, false) ? result.parse_full_title(true) : result.display_string %>
<% end %>
Expand Down

0 comments on commit ef9a43e

Please sign in to comment.