]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/src/templates/opac/myopac/hold_history.tt2
9905e6c60f40d1f3d982cc3b6a6b2ab0ad779999
[working/Evergreen.git] / Open-ILS / src / templates / opac / myopac / hold_history.tt2
1 [%  PROCESS "opac/parts/header.tt2";
2     PROCESS "opac/parts/misc_util.tt2";
3     PROCESS "opac/parts/hold_status.tt2";
4     WRAPPER "opac/parts/myopac/base.tt2";
5     myopac_page = "holds";
6     limit = ctx.hold_history_limit;
7     offset = ctx.hold_history_offset;
8     count = ctx.hold_history_ids.size;
9 %]
10
11 <h3 class="sr-only">[% l('Holds History') %]</h3>
12 <div id='myopac_holds_div'>
13
14     <div id="acct_holds_tabs">
15         <div class="align">
16             <a href='[% mkurl('holds',{},['limit','offset']) %]'>[% l("Items on Hold") %]</a>
17         </div>
18         <div class="align selected">
19             <a href="#">[% l("Holds History") %]</a>
20         </div>
21     </div>
22
23     <div class="header_middle">
24         <span style="float:left;">[% l("Previously Held Items") %]</span>
25         <span class='float-left' style='padding-left: 10px;'>
26             <a href='[% mkurl('hold_history', {limit => limit,offset => (offset - limit)}) %]'
27                 [% IF offset == 0 %] class='invisible' [% END %]><span class="nav_arrow_fix">&#9668;</span>[% l('Previous') %]</a>
28             [% IF offset > 0 || count > limit;
29                 curpage = 0;
30                 WHILE curpage * limit < count;
31                     IF curpage * limit == offset;
32             %]
33             [% curpage + 1 %]
34                     [%- ELSE %]
35             <a href='[% mkurl('hold_history', {limit => limit, offset => (curpage * limit)}) %]'>[% curpage + 1 %]</a>
36                     [%- END;
37                     curpage = curpage + 1;
38                 END;
39             END %]
40             <a href='[% mkurl('hold_history', {limit => limit, offset => (offset + limit)}) %]'
41                [% IF count <= limit + offset %] class='invisible' [% END %] >[% l('Next') %]<span class="nav_arrow_fix">&#9658;</span></a>
42         </span>
43         <span style="float:right;">
44             <a class="hide_me" href="#">[% l('Export List') %]</a>
45         </span>
46     </div>
47     <div class="clear-both"></div>
48
49     <div id='holds_main'>
50         [% IF ctx.holds.size && ctx.holds.size < 1 %]
51         <div class="warning_box">
52             <big><strong>[% l('No holds found.') %]</strong></big>
53         </div>
54         [% ELSE %]
55         <table id='acct_holds_hist_header' class='table_no_border_space table_no_cell_pad' title="[% l('History of items on hold') %]">
56             <thead>
57                 <tr>
58                     <td><span>[% l('Title') %]</span></td>
59                     <td><span>[% l('Author') %]</span></td>
60                     <td> <span>[% l('Format') %]</span></td>
61                     <td><span>[% l('Pickup Location') %]</span> </td>
62                     <td><span>[% l('Status') %]</span></td>
63                 </tr>
64             </thead>
65             <tbody id='holds_temp_parent'>
66                 [% FOR hold IN ctx.holds;
67                     attrs = {marc_xml => hold.marc_xml};
68                     PROCESS get_marc_attrs args=attrs;
69                     ahr = hold.hold.hold %]
70
71                 <tr name="acct_holds_temp" class="acct_holds_temp">
72
73                     <td>
74                         <div>
75                             <a href="[% mkurl(ctx.opac_root _ '/record/' _ hold.hold.bre_id) %]">[% attrs.title | html %]</a>
76                         </div>
77                     </td>
78                     <td>
79                         <div>
80                             <a href="[% mkurl(ctx.opac_root _ '/results',
81                                 {qtype => author, query => attrs.author.replace('[,\.:;]', '')}
82                             ) %]">[% attrs.author | html %]</a>
83                         </div>
84                     </td>
85                     <td>
86                         <div class='format_icon'>
87                             [% IF attrs.format_icon %]
88                             <img title="[% attrs.format_label | html %]" alt="[% attrs.format_label | html %]" src="[% attrs.format_icon %]" />
89                             [% END %]
90                         </div>
91                     </td>
92                     <td>
93                         [% ctx.get_aou(ahr.pickup_lib).name | html %]
94                     </td>
95                     <td>
96                         <div name="acct_holds_status">
97                             [% PROCESS get_hold_status hold=hold; %]
98                         </div>
99                     </td>
100                 </tr>
101                 [% END %]
102             </tbody>
103         </table>
104         [% END %]
105     </div>
106 </div>
107 [% END %]