Skip to content

Commit

Permalink
Remove source from requests urls
Browse files Browse the repository at this point in the history
  • Loading branch information
carolyncole committed Sep 10, 2021
1 parent a7a071d commit f628871
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions app/services/physical_holdings_markup_builder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -268,26 +268,26 @@ def self.request_placeholder(adapter, holding_id, location_rules, holding)
link = if !location_rules.nil? && /^scsb.+/ =~ location_rules['code']
if scsb_supervised_items?(holding)
link_to('Reading Room Request',
"/requests/#{doc_id}?source=pulsearch",
"/requests/#{doc_id}",
title: 'Request to view in Reading Room',
class: 'request btn btn-xs btn-primary',
data: { toggle: 'tooltip' })
else
link_to(request_label(location_rules),
"/requests/#{doc_id}?source=pulsearch",
"/requests/#{doc_id}",
title: request_tooltip(location_rules),
class: 'request btn btn-xs btn-primary',
data: { toggle: 'tooltip' })
end
elsif !adapter.voyager_holding?(holding_id)
link_to('Reading Room Request',
"/requests/#{doc_id}?mfhd=#{holding_id}&source=pulsearch",
"/requests/#{doc_id}?mfhd=#{holding_id}",
title: 'Request to view in Reading Room',
class: 'request btn btn-xs btn-primary',
data: { toggle: 'tooltip' })
else
link_to(request_label(location_rules),
"/requests/#{doc_id}?mfhd=#{holding_id}&source=pulsearch",
"/requests/#{doc_id}?mfhd=#{holding_id}",
title: request_tooltip(location_rules),
class: 'request btn btn-xs btn-primary',
data: { toggle: 'tooltip' })
Expand Down
6 changes: 3 additions & 3 deletions spec/javascript/orangelight/availability.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ describe('AvailabilityUpdater', function() {
' <span class="availability-icon badge badge-secondary" title=""></span>' +
' </td>' +
' <td class="location-services service-conditional" data-open="false" data-requestable="true" data-aeon="false" data-holding-id="22555592710006421">' +
' <a title="View Options to Request copies from this Location" class="request btn btn-xs btn-primary" data-toggle="tooltip" href="/requests/99101378413506421?mfhd=22555592710006421&amp;source=pulsearch">Request</a>' +
' <a title="View Options to Request copies from this Location" class="request btn btn-xs btn-primary" data-toggle="tooltip" href="/requests/99101378413506421?mfhd=22555592710006421">Request</a>' +
' </td>' +
' <td class="holding-details">' +
' <ul class="item-status" data-record-id="99101378413506421" data-holding-id="22555592710006421"></ul>' +
Expand Down Expand Up @@ -595,7 +595,7 @@ describe('AvailabilityUpdater', function() {
' <td class="location-services service-conditional" data-open="true" data-requestable="true" data-aeon="false"' +
' data-holding-id="22614245530006421"><a title="View Options to Request copies from this Location"' +
' class="request btn btn-xs btn-primary" data-toggle="tooltip"' +
' href="/requests/99115992283506421?mfhd=22614245530006421&amp;source=pulsearch">Request</a></td>' +
' href="/requests/99115992283506421?mfhd=22614245530006421">Request</a></td>' +
' <td class="holding-details">' +
' <ul class="item-status" data-record-id="99115992283506421" data-holding-id="22614245530006421"></ul>' +
' </td>' +
Expand All @@ -613,7 +613,7 @@ describe('AvailabilityUpdater', function() {
' data-aeon="false" data-holding-id="22614245510006421"><a' +
' title="View Options to Request copies from this Location" class="request btn btn-xs btn-primary"' +
' data-toggle="tooltip"' +
' href="/requests/99115992283506421?mfhd=22614245510006421&amp;source=pulsearch">Request</a></td>' +
' href="/requests/99115992283506421?mfhd=22614245510006421">Request</a></td>' +
' <td class="holding-details">' +
' <ul class="item-status" data-record-id="99115992283506421" data-holding-id="22614245510006421"></ul>' +
' </td>' +
Expand Down
2 changes: 1 addition & 1 deletion spec/services/physical_holdings_markup_builder_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@
expect(request_placeholder_markup).to include 'data-aeon="false"'
expect(request_placeholder_markup).to include 'data-holding-id="3668455"'
expect(request_placeholder_markup).to include '<a title="View Options to Request copies from this Location"'
expect(request_placeholder_markup).to include 'href="/requests/123456?mfhd=3668455&amp;source=pulsearch"'
expect(request_placeholder_markup).to include 'href="/requests/123456?mfhd=3668455"'
end
end

Expand Down

0 comments on commit f628871

Please sign in to comment.