Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove source from requests urls #2716

Merged
merged 1 commit into from
Sep 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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