]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/src/templates/opac/myopac/hold_history.tt2
a28b5b4f20a8b7bb054977073233e30e893a4709
[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('holds_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="#">Export List</a>
45         </span>
46     </div>
47     <div class="clear-both"></div>
48
49     <div id='holds_main'>
50         [% IF ctx.holds.size < 1 %]
51         <div class="warning_box">
52             <big><strong>[% l('No holds found.') %]</strong></big>
53         </div>
54         [% ELSE %]
55         <table style='border-collapse:collapse; width: 100%;'
56             title="[% l('History of items on hold') %]">
57             <thead id='acct_holds_main_header'>
58                 <tr>
59                     <td><span>[% l('Title') %]</span></td>
60                     <td><span>[% l('Author') %]</span></td>
61                     <td> <span>[% l('Format') %]</span></td>
62                     <td><span>[% l('Pickup Location') %]</span> </td>
63                     <td>[% l('Active On') %]</td>
64                     <td>[% l('Active') %]</td>
65                     <td>[% l('Date Fulfilled') %]</td>
66                     <td><span>[% l('Status') %]</span></td>
67                 </tr>
68             </thead>
69             <tbody>
70                 [% FOR hold IN ctx.holds;
71                     attrs = {marc_xml => hold.marc_xml};
72                     PROCESS get_marc_attrs args=attrs;
73                     ahr = hold.hold.hold %]
74
75                 <tr name="acct_holds_temp" class="acct_holds_temp">
76
77                     <td>
78                         <div style="margin-top:10px;margin-bottom:10px;">
79                             <a href="[% mkurl(ctx.opac_root _ '/record/' _ hold.hold.bre_id) %]">[% attrs.title | html %]</a>
80                         </div>
81                     </td>
82                     <td>
83                         <div style="margin-top:10px;margin-bottom:10px;">
84                             <a href="[% mkurl(ctx.opac_root _ '/results',
85                                 {qtype => author, query => attrs.author.replace('[,\.:;]', '')}
86                             ) %]">[% attrs.author | html %]</a>
87                         </div>
88                     </td>
89                     <td>
90                         <div style="width:26px;height:23px;margin-top:6px;margin-bottom:6px;">
91                             [% IF attrs.format_icon %]
92                             <img title="[% attrs.format_label | html %]" alt="[% attrs.format_label | html %]" src="[% attrs.format_icon %]" />
93                             [% END %]
94                         </div>
95                     </td>
96                     <td>
97                         [% ctx.get_aou(ahr.pickup_lib).name | html %]
98                     </td>
99                     <td>
100                         [% IF ahr.frozen == 't' AND ahr.thaw_date;
101                             date.format(ctx.parse_datetime(ahr.thaw_date), DATE_FORMAT);
102                         END %]
103                     </td>
104                     <td>
105                         [% l(ahr.frozen == 'f' ? 'Active' : 'Suspended') %]
106                     </td>
107                     <td>
108                         [% IF ahr.fulfillment_time;
109                             date.format(ctx.parse_datetime(ahr.fulfillment_time), DATE_FORMAT);
110                         END %]
111                     </td>
112                     <td>
113                         <div name="acct_holds_status"
114                             style="margin-top:10px;margin-bottom:10px;">
115                             [% PROCESS get_hold_status hold=hold; %]
116                         </div>
117                     </td>
118                 </tr>
119                 [% END %]
120             </tbody>
121         </table>
122         [% END %]
123     </div>
124 </div>
125 [% END %]