]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/src/templates-bootstrap/opac/parts/anon_list.tt2
LP1863252 Geosort - add dropped END tag
[Evergreen.git] / Open-ILS / src / templates-bootstrap / opac / parts / anon_list.tt2
1         [% IF ctx.mylist.size %]
2         <div>
3         <hr>
4         <h3>[% l('Basket') %]</h3>
5
6         <form action="[% mkurl(ctx.opac_root _ '/mylist/move') %]" method="post">
7         <input type="hidden" name="anonsort" value="[% CGI.param('anonsort') %]" />
8         <input type="hidden" name="orig_referrer" value="[% CGI.referer | html %]" />
9         <input type="hidden" name="redirect_to" value="[% mkurl('', {}, ['list_none_selected', 'cart_none_selected']) %]" />
10         <div class="bbag-action" style="clear:both;">
11         <div class="input-group my-3">
12
13             <button class="btn btn-success m-1" name="action" value="place_hold" id="place_hold" type="submit"><i class="fas fa-book" aria-hidden="true"></i> Place Hold</button>
14             <button class="btn btn-danger m-1" name="action" value="delete" id="delete" type="submit"><i class="fas fa-trash" aria-hidden="true"></i> Delete</button>
15             <button class="btn btn-action m-1" name="action" value="print" id="print" type="submit"><i class="fas fa-print" aria-hidden="true"></i> Print Details</button>
16             <button class="btn btn-action m-1" name="action" value="email" id="email" type="submit"><i class="fas fa-envelope-open-text" aria-hidden="true"></i> Email Details</button>
17
18             <button class="btn btn-action m-1" name="action" value="new_list" id="new_list" type="submit"><i class="fas fa-plus" aria-hidden="true"></i> Add to New List</button>
19             <div class="dropdown show m-1">
20                 [% IF ctx.user AND ctx.bookbags.size %]
21                  <a class="btn btn-action dropdown-toggle" href="#" role="button" id="dropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
22                    <i class="fas fa-truck-moving" aria-hidden="true"></i> [% l('Move selected items to list:') %]
23                  </a>
24
25                 <div class="dropdown-menu" aria-labelledby="dropdownMenuLink">
26                     [% FOR bbag IN ctx.bookbags %]
27                          <button name="action" class="dropdown-item" href="#" type="submit" value="[% bbag.id %]"> [% bbag.name | html %]</button>
28                     [% END %]
29                 [% END %]
30                 </div>
31             </div>
32         </div>
33            <div class="form-check m-2">
34                 <input class="form-check-input" type="checkbox" value="" id="clear_cart">
35                 <label class="form-check-label" for="clear_cart">
36                    [% l('Clear entire basket when the above action is complete.') %]
37                 </label>
38             </div>
39 </div>
40
41
42
43
44             [% IF CGI.param('cart_none_selected') %]
45                 <span class="error">[% l('No items were selected') %]</span>
46             [% END %]
47         </div>
48         <div class="bbag-content">
49
50
51             <div class="d-block d-md-none">
52                 <input id="all_check" checked="checked"
53                 type="checkbox" onclick="var inputs=document.getElementsByTagName('input');
54                                 for (i = 0; i < inputs.length; i++) {
55                                     if (inputs[i].name == 'record' && !inputs[i].disabled) inputs[i].checked = this.checked;}"
56                 aria-label="[% l('Check/Uncheck All') %]" />
57                 <label for="all_check">[% l('Check/Uncheck All') %]</label>
58             </div>
59             <table class="container-fluid table table-hover table-bordered mt-4 miniTable bucketTable">
60                 <thead id="acct_list_header_anon">
61                     <tr>
62                         <th class='list_checkbox'>
63                             <input type="checkbox" checked="checked"
64                             aria-label="[% l('Select all records') %]" onclick="
65                                 var inputs=document.getElementsByTagName('input');
66                                 for (i = 0; i < inputs.length; i++) {
67                                     if (inputs[i].name == 'record' && !inputs[i].disabled) inputs[i].checked = this.checked;}"/>
68                         </th>
69                         <th><a href="[% mkurl('', {anonsort=>(CGI.param('anonsort') == 'titlesort' ? 'titlesort.descending' : 'titlesort')}) %]">[% l('Title') %]</a></th>
70                         <th><a href="[% mkurl('', {anonsort=>(CGI.param('anonsort') == 'authorsort' ? 'authorsort.descending' : 'authorsort')}) %]">[% l('Author(s)') %]</a></th>
71                         <th>[% l('Local Call Number') %]</th>
72                     </tr>
73                 </thead>
74                 <tbody>
75                     [% FOR item IN ctx.mylist;
76                         attrs = {marc_xml => ctx.mylist_marc_xml.$item};
77                         PROCESS get_marc_attrs args=attrs %]
78                     <tr>
79                         <td class="list_checkbox">
80                             <input type="checkbox" checked="checked" name="record" value="[% item %]" aria-label="[% l('Select record') %]" />
81                         </td>
82                         <td class="list_entry" data-label="[% l('Title') %]"><a href="[% mkurl(ctx.opac_root _ '/record/' _ item, {}, ['edit_notes', 'id']) %]">[% attrs.title | html %]</a></td>
83                         <td class="list_entry" data-label="[% l('Author(s)') %]"><a href="[%-
84                             authorquery = attrs.author | replace('[,\.:;]', '');
85                             mkurl(
86                                 ctx.opac_root _ '/results',
87                                 {qtype => 'author', query => authorquery},
88                                 ['page', 'id', 'edit_notes']
89                             )
90                         -%]">[% attrs.author | html %]</a></td>
91                         <td class="list_entry" data-label="[% l('Local Call Number') %]">
92                         [%
93                             copy = attrs.holdings.0;
94                             IF copy;
95                                 copy_org = ctx.get_aou_by_shortname(copy.owner);
96                                 FOR ctx_org IN [ctx.pref_ou, ctx.search_ou, ctx.home_ou, ctx.physical_loc];
97                                     NEXT UNLESS ctx_org;
98                                     ctx_org = ctx.get_aou(ctx_org);
99                                     IF ctx.org_within_scope(ctx_org, copy_org, ctx_org.ou_type.depth);
100                                         l('[_1] ([_2])', copy.label, copy_org.name) | html;
101                                         LAST;
102                                     END;
103                                 END;
104                             END;
105                         %]
106                         </td>
107                     </tr>
108                     [% END %]
109                 </tbody>
110             </table>
111
112
113
114
115             <br /><br />
116         </div>
117         </form>
118         </div>
119         [% END %]