]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/src/templates-bootstrap/opac/parts/anon_list.tt2
LP#1778972: (follow-up) use OILSWebTemplatePath to enable/disable the bootstrap OPAC
[Evergreen.git] / Open-ILS / src / templates-bootstrap / opac / parts / anon_list.tt2
1         [% IF ctx.mylist.size %]
2         <div>
3         <p class="big-strong">[% l('Basket') %]</p>
4         <div class="sort my-3">
5             <form method="get">
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') %]" />
14             </div>
15             </form>
16         </div>
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>
33                     [% END %]
34                     </optgroup>
35                 [% END %]
36             </select>
37             [%- INCLUDE "opac/parts/preserve_params.tt2"; %]
38             <input class="btn btn-confirm btn-sm" type="submit" value="[% l('Go') %]" />
39         </div>
40
41
42         
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>
45         </div>
46             [% IF CGI.param('cart_none_selected') %]
47                 <span class="error">[% l('No items were selected') %]</span>
48             [% END %]
49         </div>
50         <div class="bbag-content">
51
52
53
54             <table class="container-fluid table table-hover mt-4 miniTable bucketTable">
55                 <thead id="acct_list_header_anon">
56                     <tr>
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;}"/>
63                         </th>
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>
67                     </tr>
68                 </thead>
69                 <tbody>
70                     [% FOR item IN ctx.mylist;
71                         attrs = {marc_xml => ctx.mylist_marc_xml.$item};
72                         PROCESS get_marc_attrs args=attrs %]
73                     <tr>
74                         <td class="list_checkbox">
75                             <input type="checkbox" checked="checked" name="record" value="[% item %]" aria-label="[% l('Select record') %]" />
76                         </td>
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('[,\.:;]', '');
80                             mkurl(
81                                 ctx.opac_root _ '/results',
82                                 {qtype => 'author', query => authorquery},
83                                 ['page', 'id', 'edit_notes']
84                             )
85                         -%]">[% attrs.author | html %]</a></td>
86                         <td class="list_entry" data-label="[% l('Local Call Number') %]">
87                         [% 
88                             copy = attrs.holdings.0;
89                             IF copy;
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];
92                                     NEXT UNLESS ctx_org;
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;
96                                         LAST;
97                                     END;
98                                 END;
99                             END;
100                         %]
101                         </td>
102                     </tr>
103                     [% END %]
104                 </tbody>
105             </table>
106
107
108
109
110             <br /><br />
111         </div>
112         </form>
113         </div>
114         [% END %]