]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/src/templates/opac/parts/anon_list.tt2
LP#1681943: show all list fields in mobile view
[working/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('Temporary List') %]</p>
4         <div class="sort">
5             <form method="get">
6                 <label for="anonsort">[% l("Sort list 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="get">
16         <div class="bbag-action" style="clear:both;">
17             <select name="action">
18                 <option>[% l('-- Actions for these items --') %]</option>
19                 <option value="place_hold">[% l('Place hold') %]</option>
20                 <option value="delete">[% l('Remove from list') %]</option>
21                 [% IF ctx.user AND ctx.bookbags.size %]
22                     <optgroup label="[% l('Move selected items to list:') %]">
23                     [% FOR bbag IN ctx.bookbags %]]
24                         <option value="[% bbag.id %]" class="selector_actions_for_list_inner_option">[% bbag.name | html %]</option>
25                     [% END %]
26                     </optgroup>
27                 [% END %]
28             </select>
29             [%- INCLUDE "opac/parts/preserve_params.tt2"; %]
30             <input class="opac-button" type="submit" value="[% l('Go') %]" />
31         </div>
32         <div class="bbag-content">
33             <table class="bookbag-specific table_no_cell_pad table_no_border_space table_no_border">
34                 <thead id="acct_list_header_anon">
35                     <tr>
36                         <td class='list_checkbox'>
37                             <input type="checkbox" onclick="
38                                 var inputs=document.getElementsByTagName('input'); 
39                                 for (i = 0; i < inputs.length; i++) { 
40                                     if (inputs[i].name == 'record' && !inputs[i].disabled) inputs[i].checked = this.checked;}"/>
41                         </td>
42                         <td><a href="[% mkurl('', {anonsort=>(CGI.param('anonsort') == 'titlesort' ? 'titlesort.descending' : 'titlesort')}) %]">[% l('Title') %]</a></td>
43                         <td><a href="[% mkurl('', {anonsort=>(CGI.param('anonsort') == 'authorsort' ? 'authorsort.descending' : 'authorsort')}) %]">[% l('Author(s)') %]</a></td>
44                         <td>[% l('Local Call Number') %]</td>
45                     </tr>
46                 </thead>
47                 <tbody>
48                     [% FOR item IN ctx.mylist;
49                         attrs = {marc_xml => ctx.mylist_marc_xml.$item};
50                         PROCESS get_marc_attrs args=attrs %]
51                     <tr>
52                         <td class="list_checkbox">
53                             <input type="checkbox" name="record" value="[% item %]" />
54                         </td>
55                         <td class="list_entry" data-label="[% l('Title') %]"><a href="[% mkurl(ctx.opac_root _ '/record/' _ item, {}, ['edit_notes', 'id']) %]">[% attrs.title | html %]</a></td>
56                         <td class="list_entry" data-label="[% l('Author(s)') %]"><a href="[%-
57                             authorquery = attrs.author | replace('[,\.:;]', '');
58                             mkurl(
59                                 ctx.opac_root _ '/results',
60                                 {qtype => 'author', query => authorquery},
61                                 ['page', 'id', 'edit_notes']
62                             )
63                         -%]">[% attrs.author | html %]</a></td>
64                         <td class="list_entry" data-label="[% l('Local Call Number') %]">
65                         [% 
66                             copy = attrs.holdings.0;
67                             IF copy;
68                                 copy_org = ctx.get_aou_by_shortname(copy.owner);
69                                 FOR ctx_org IN [ctx.pref_ou, ctx.search_ou, ctx.home_ou, ctx.physical_loc];
70                                     NEXT UNLESS ctx_org;
71                                     ctx_org = ctx.get_aou(ctx_org);
72                                     IF ctx.org_within_scope(ctx_org, copy_org, ctx_org.ou_type.depth);
73                                         l('[_1] ([_2])', copy.label, copy_org.name) | html;
74                                         LAST;
75                                     END;
76                                 END;
77                             END;
78                         %]
79                         </td>
80                     </tr>
81                     [% END %]
82                 </tbody>
83             </table>
84             <br /><br />
85         </div>
86         </form>
87         </div>
88         [% END %]