Skip to content

Commit

Permalink
Merge pull request #2197 from cul-it/DACCESS-415
Browse files Browse the repository at this point in the history
Bounds with items - temp. excluded from special requests
  • Loading branch information
sarah-cul authored Dec 6, 2024
2 parents c8aca50 + 77f1b92 commit 200b0fd
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 5 deletions.
14 changes: 9 additions & 5 deletions blacklight-cornell/app/views/aeon/_clearer.html.erb
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
<div class="control-group">
<input type="submit" class="btn" id="SubmitButton" name="SubmitButton" value="Submit Request">
<label class="control-label sr-only" for="clear">Clear</label>
or <input type="button" id="clear" name="clear" value="Reset">
<br/><br/>
<div class="control-group" >
<% holdings = JSON.parse(@document['holdings_json']) %>
<% bounds_with = holdings.any? { |_, holding| holding.key?('boundWith') && holding['boundWith'].any? } %>
<% unless bounds_with %>
<input type="submit" class="btn" id="SubmitButton" name="SubmitButton" value="Submit Request">
<label class="control-label sr-only" for="clear">Clear</label>
or <input type="button" id="clear" name="clear" value="Reset">
<br/><br/>
<% end %>
<p>Please email
<a href=mailto:[email protected]>[email protected]</a>, or
<a href=mailto:[email protected]>[email protected]</a> if you have any questions.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,15 @@
Restrictions: <%= @re506 %>
</p>
<% end %>
<% holdings = JSON.parse(@document['holdings_json']) %>
<% bounds_with = holdings.any? { |_, holding| holding.key?('boundWith') && holding['boundWith'].any? } %>
<% if bounds_with %>
<p>
<i class="fa fa-warning" aria-hidden="true"></i>
This item is bound with another item(s).
Please <a href="mailto:[email protected]" aria-label="email [email protected]">ask a librarian</a> for assistance to make this request.
</p>
<% end %>
</div>
<div id="shoppingcart">
<span id="numitems" tabindex="0">Number of items selected:</span>
Expand Down
9 changes: 9 additions & 0 deletions blacklight-cornell/app/views/aeon/scan_aeon.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,15 @@
Restrictions: <%= @re506 %>
</p>
<% end %>
<% holdings = JSON.parse(@document['holdings_json']) %>
<% bounds_with = holdings.any? { |_, holding| holding.key?('boundWith') && holding['boundWith'].any? } %>
<% if bounds_with %>
<p>
<i class="fa fa-warning" aria-hidden="true"></i>
This item is bound with another item(s).
Please <a href="mailto:[email protected]" aria-label="email [email protected]">ask a librarian</a> for assistance to make this request.
</p>
<% end %>
</div>

<div id="shoppingcart">
Expand Down

0 comments on commit 200b0fd

Please sign in to comment.