]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/src/templates/opac/parts/anon_list.tt2
TPAC my-list call number includes child orgs
[working/Evergreen.git] / Open-ILS / src / templates / opac / parts / anon_list.tt2
1         [% IF ctx.mylist.size %]
2         <div class="bookbag-specific">
3             <form method="get">
4                 <label for="anonsort">[% l("Sort list items by: ") %]</label>
5                 [% INCLUDE "opac/parts/filtersort.tt2" mode='bookbag'
6                     id="anonsort" name="anonsort" value=CGI.param("anonsort") %]
7                 <input type="hidden" name="id"
8                     value="[% CGI.param('id') | html %]" />
9                 [%- INCLUDE "opac/parts/preserve_params.tt2"; %]
10                 <input type="submit" value="[% l('Sort') %]" />
11             </form>
12         </div>
13
14         <form action="[% mkurl(ctx.opac_root _ '/mylist/move') %]" method="get">
15         <div>
16             <p class="big-strong">[% l('Temporary List') %]</p>
17             <table cellpadding='0' cellspacing='0' border='0'>
18                 <thead id="acct_list_header_anon">
19                     <tr>
20                         <td width="1%" style="padding-left:10px;">
21                             <input type="checkbox" onclick="
22                                 var inputs=document.getElementsByTagName('input'); 
23                                 for (i = 0; i < inputs.length; i++) { 
24                                     if (inputs[i].name == 'record' && !inputs[i].disabled) inputs[i].checked = this.checked;}"/>
25                         </td>
26                         <td width="40%" class="opac-auto-108"><a href="[% mkurl('', {anonsort=>(CGI.param('anonsort') == 'titlesort' ? 'titlesort.descending' : 'titlesort')}) %]">[% l('Title') %]</a></td>
27                         <td width="40%" class="opac-auto-108"><a href="[% mkurl('', {anonsort=>(CGI.param('anonsort') == 'authorsort' ? 'authorsort.descending' : 'authorsort')}) %]">[% l('Author(s)') %]</a% l('Author(s)') %]</td>
28                         <td width='18%'>[% l('Local Call Number') %]</td>
29                         <td width="1%" class="nowrap">
30                             <select name="action">
31                                 <option>[% l('-- Actions for these items --') %]</option>
32                                 <option value="place_hold">[% l('Place hold') %]</option>
33                                 <option value="delete">[% l('Remove from list') %]</option>
34                                 [% IF ctx.user AND ctx.bookbags.size %]
35                                 <optgroup label="[% l('Move selected items to bookbag:') %]">
36                                     [% FOR bbag IN ctx.bookbags %]]
37                                     <option value="[% bbag.id %]" class="selector_actions_for_list_inner_option">[% bbag.name | html %]</option>
38                                     [% END %]
39                                 </optgroup>
40                                 [% END %]
41                             </select>
42                             [%- INCLUDE "opac/parts/preserve_params.tt2"; %]
43                             <input type="submit" value="[% l('Go') %]" />
44                         </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="item_list_padding" style="padding-left: 10px;">
53                             <input type="checkbox" name="record" value="[% item %]" />
54                         </td>
55                         <td class="item_list_padding" style="padding-left: 5px;"><a href="[% mkurl(ctx.opac_root _ '/record/' _ item, {}, ['edit_notes', 'id']) %]">[% attrs.title | html %]</a></td>
56                         <td class="item_list_padding" style="padding-left: 5px;"><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="item_list_padding" style="padding-left: 5px;">
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         [% END %]