Skip to content

Commit

Permalink
Merged problem rpt btn manually
Browse files Browse the repository at this point in the history
  • Loading branch information
triplingual committed Jun 15, 2021
1 parent a1483a7 commit 53c10bb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions public/views/agents/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
<% end %>

<%= render partial: 'shared/display_notes' %>
<%= render partial: 'shared/report_problem' %>

<% if !@results.blank? && @results['total_hits'] > 0 %>
<h2><%= t('found', {:count => @results['total_hits'], :type => @results['total_hits'] == 1? t('coll_obj._singular') : t('coll_obj._plural')}) %>:</h2>
Expand Down
6 changes: 3 additions & 3 deletions public/views/shared/_report_problem.erb
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ adding "u" to the mix for URL encoding.
<%
base = "https://web.library.yale.edu/form/archivesspace-pui-suggest-correction"
context = request.original_url
title = ['digital_object', 'resource'].include?(@result['primary_type']) ? u(@result['json']['title'].to_s) : u(@result['json']['display_string'].to_s)
repo = u(@result['json']['repository']['_resolved']['name'].to_s)
callno = u(@result.identifier)
title = ['archival_object'].include?(@result['primary_type']) ? u(@result['json']['display_string'].to_s) : u(@result['json']['title'].to_s)
+repo = u(@result['json']['repository']['_resolved']['name'].to_s) if @result['json']['repository']
+callno = u(@result.identifier) if @result.identifier
@container = Array.new
@result.container_titles_and_uris.each do |item|
@container << u(item['title'])
Expand Down

0 comments on commit 53c10bb

Please sign in to comment.