1 [% IF ctx.mylist.size %]
3 <p class="big-strong">[% l('Basket') %]</p>
4 <div class="sort my-3">
6 <div class="input-group">
7 <label for="anonsort">[% l("Sort basket items by: ") %]</label>
8 [% INCLUDE "opac/parts/filtersort.tt2" mode='bookbag'
9 id="anonsort" name="anonsort" value=CGI.param("anonsort") class="form-control form-control-sm"%]
10 <input type="hidden" name="id"
11 value="[% CGI.param('id') | html %]" />
12 [%- INCLUDE "opac/parts/preserve_params.tt2"; %]
13 <input class="btn btn-confirm btn-sm" type="submit" value="[% l('Sort') %]" />
17 <form action="[% mkurl(ctx.opac_root _ '/mylist/move') %]" method="post">
18 <input type="hidden" name="orig_referrer" value="[% CGI.referer | html %]" />
19 <input type="hidden" name="redirect_to" value="[% mkurl('', {}, ['list_none_selected', 'cart_none_selected']) %]" />
20 <div class="bbag-action" style="clear:both;">
21 <div class="input-group my-3">
22 <select class="form-control form-control-sm" name="action" aria-label="[% l('Actions for these items') %]">
23 <option>[% l('-- Actions for these items --') %]</option>
24 <option value="place_hold">[% l('Place hold') %]</option>
25 <option value="print">[% l('Print title details') %]</option>
26 <option value="email">[% l('Email title details') %]</option>
27 <option value="delete">[% l('Remove from basket') %]</option>
28 <option value="new_list">[% l('Add to new list') %]</option>
29 [% IF ctx.user AND ctx.bookbags.size %]
30 <optgroup label="[% l('Move selected items to list:') %]">
31 [% FOR bbag IN ctx.bookbags %]]
32 <option value="[% bbag.id %]" class="selector_actions_for_list_inner_option">[% bbag.name | html %]</option>
37 [%- INCLUDE "opac/parts/preserve_params.tt2"; %]
38 <input class="btn btn-confirm btn-sm" type="submit" value="[% l('Go') %]" />
43 <div class="input-group">
44 <label for="clear_cart"><input class="form-control form-control-sm" type="checkbox" name="clear_cart" id="clear_cart" />[% l('Clear entire basket when action complete') %]</label>
46 [% IF CGI.param('cart_none_selected') %]
47 <span class="error">[% l('No items were selected') %]</span>
50 <div class="bbag-content">
54 <table class="container-fluid table table-hover mt-4 miniTable bucketTable">
55 <thead id="acct_list_header_anon">
57 <th class='list_checkbox'>
58 <input type="checkbox" checked="checked"
59 aria-label="[% l('Select all records') %]" onclick="
60 var inputs=document.getElementsByTagName('input');
61 for (i = 0; i < inputs.length; i++) {
62 if (inputs[i].name == 'record' && !inputs[i].disabled) inputs[i].checked = this.checked;}"/>
64 <th><a href="[% mkurl('', {anonsort=>(CGI.param('anonsort') == 'titlesort' ? 'titlesort.descending' : 'titlesort')}) %]">[% l('Title') %]</a></th>
65 <th><a href="[% mkurl('', {anonsort=>(CGI.param('anonsort') == 'authorsort' ? 'authorsort.descending' : 'authorsort')}) %]">[% l('Author(s)') %]</a></th>
66 <th>[% l('Local Call Number') %]</th>
70 [% FOR item IN ctx.mylist;
71 attrs = {marc_xml => ctx.mylist_marc_xml.$item};
72 PROCESS get_marc_attrs args=attrs %]
74 <td class="list_checkbox">
75 <input type="checkbox" checked="checked" name="record" value="[% item %]" aria-label="[% l('Select record') %]" />
77 <td class="list_entry" data-label="[% l('Title') %]"><a href="[% mkurl(ctx.opac_root _ '/record/' _ item, {}, ['edit_notes', 'id']) %]">[% attrs.title | html %]</a></td>
78 <td class="list_entry" data-label="[% l('Author(s)') %]"><a href="[%-
79 authorquery = attrs.author | replace('[,\.:;]', '');
81 ctx.opac_root _ '/results',
82 {qtype => 'author', query => authorquery},
83 ['page', 'id', 'edit_notes']
85 -%]">[% attrs.author | html %]</a></td>
86 <td class="list_entry" data-label="[% l('Local Call Number') %]">
88 copy = attrs.holdings.0;
90 copy_org = ctx.get_aou_by_shortname(copy.owner);
91 FOR ctx_org IN [ctx.pref_ou, ctx.search_ou, ctx.home_ou, ctx.physical_loc];
93 ctx_org = ctx.get_aou(ctx_org);
94 IF ctx.org_within_scope(ctx_org, copy_org, ctx_org.ou_type.depth);
95 l('[_1] ([_2])', copy.label, copy_org.name) | html;