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