]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/src/templates/opac/parts/anon_list.tt2
LP#1749475: OPAC email/print record improvements
[Evergreen.git] / Open-ILS / src / templates / opac / parts / anon_list.tt2
1         [% IF ctx.mylist.size %]
2         <div class="bookbag-specific">
3         <p class="big-strong">[% l('Basket') %]</p>
4         <div class="sort">
5             <form method="get">
6                 <label for="anonsort">[% l("Sort basket items by: ") %]</label>
7                 [% INCLUDE "opac/parts/filtersort.tt2" mode='bookbag'
8                     id="anonsort" name="anonsort" value=CGI.param("anonsort") %]
9                 <input type="hidden" name="id"
10                     value="[% CGI.param('id') | html %]" />
11                 [%- INCLUDE "opac/parts/preserve_params.tt2"; %]
12                 <input class="opac-button" type="submit" value="[% l('Sort') %]" />
13             </form>
14         </div>
15         <form action="[% mkurl(ctx.opac_root _ '/mylist/move') %]" method="post">
16         <input type="hidden" name="anonsort" value="[% CGI.param('anonsort') %]" />
17         <input type="hidden" name="orig_referrer" value="[% CGI.referer | html %]" />
18         <input type="hidden" name="redirect_to" value="[% mkurl('', {}, ['list_none_selected', 'cart_none_selected']) %]" />
19         <div class="bbag-action" style="clear:both;">
20             <select name="action" aria-label="[% l('Actions for these items') %]">
21                 <option>[% l('-- Actions for these items --') %]</option>
22                 <option value="place_hold">[% l('Place hold') %]</option>
23                 <option value="print">[% l('Print title details') %]</option>
24                 <option value="email">[% l('Email title details') %]</option>
25                 <option value="delete">[% l('Remove from basket') %]</option>
26                 <option value="new_list">[% l('Add to new list') %]</option>
27                 [% IF ctx.user AND ctx.bookbags.size %]
28                     <optgroup label="[% l('Move selected items to list:') %]">
29                     [% FOR bbag IN ctx.bookbags %]]
30                         <option value="[% bbag.id %]" class="selector_actions_for_list_inner_option">[% bbag.name | html %]</option>
31                     [% END %]
32                     </optgroup>
33                 [% END %]
34             </select>
35             [%- INCLUDE "opac/parts/preserve_params.tt2"; %]
36             <input class="opac-button" type="submit" value="[% l('Go') %]" />
37             <input type="checkbox" name="clear_cart" id="clear_cart" /><label for="clear_cart">[% l('Clear entire basket when action complete') %]</label>
38             [% IF CGI.param('cart_none_selected') %]
39                 <span class="error">[% l('No items were selected') %]</span>
40             [% END %]
41         </div>
42         <div class="bbag-content">
43             <table class="bookbag-specific table_no_cell_pad table_no_border_space table_no_border">
44                 <thead id="acct_list_header_anon">
45                     <tr>
46                         <td class='list_checkbox'>
47                             <input type="checkbox" checked="checked"
48                                 aria-label="[% l('Select all records') %]" onclick="
49                                 var inputs=document.getElementsByTagName('input'); 
50                                 for (i = 0; i < inputs.length; i++) { 
51                                     if (inputs[i].name == 'record' && !inputs[i].disabled) inputs[i].checked = this.checked;}"/>
52                         </td>
53                         <td><a href="[% mkurl('', {anonsort=>(CGI.param('anonsort') == 'titlesort' ? 'titlesort.descending' : 'titlesort')}) %]">[% l('Title') %]</a></td>
54                         <td><a href="[% mkurl('', {anonsort=>(CGI.param('anonsort') == 'authorsort' ? 'authorsort.descending' : 'authorsort')}) %]">[% l('Author(s)') %]</a></td>
55                         <td>[% l('Local Call Number') %]</td>
56                     </tr>
57                 </thead>
58                 <tbody>
59                     [% FOR item IN ctx.mylist;
60                         attrs = {marc_xml => ctx.mylist_marc_xml.$item};
61                         PROCESS get_marc_attrs args=attrs %]
62                     <tr>
63                         <td class="list_checkbox">
64                             <input type="checkbox" checked="checked" name="record" value="[% item %]" aria-label="[% l('Select record') %]" />
65                         </td>
66                         <td class="list_entry" data-label="[% l('Title') %]"><a href="[% mkurl(ctx.opac_root _ '/record/' _ item, {}, ['edit_notes', 'id']) %]">[% attrs.title | html %]</a></td>
67                         <td class="list_entry" data-label="[% l('Author(s)') %]"><a href="[%-
68                             authorquery = attrs.author | replace('[,\.:;]', '');
69                             mkurl(
70                                 ctx.opac_root _ '/results',
71                                 {qtype => 'author', query => authorquery},
72                                 ['page', 'id', 'edit_notes']
73                             )
74                         -%]">[% attrs.author | html %]</a></td>
75                         <td class="list_entry" data-label="[% l('Local Call Number') %]">
76                         [% 
77                             copy = attrs.holdings.0;
78                             IF copy;
79                                 copy_org = ctx.get_aou_by_shortname(copy.owner);
80                                 FOR ctx_org IN [ctx.pref_ou, ctx.search_ou, ctx.home_ou, ctx.physical_loc];
81                                     NEXT UNLESS ctx_org;
82                                     ctx_org = ctx.get_aou(ctx_org);
83                                     IF ctx.org_within_scope(ctx_org, copy_org, ctx_org.ou_type.depth);
84                                         l('[_1] ([_2])', copy.label, copy_org.name) | html;
85                                         LAST;
86                                     END;
87                                 END;
88                             END;
89                         %]
90                         </td>
91                     </tr>
92                     [% END %]
93                 </tbody>
94             </table>
95             <br /><br />
96         </div>
97         </form>
98         </div>
99         [% END %]