]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/web/templates/default/opac/myopac/hold_history.tt2
Merge branch 'opac-tt-poc' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen...
[working/Evergreen.git] / Open-ILS / web / templates / default / opac / myopac / hold_history.tt2
1 [%  PROCESS "default/opac/parts/header.tt2";
2     PROCESS "default/opac/parts/marc_misc.tt2";
3     WRAPPER "default/opac/parts/myopac/base.tt2";
4     myopac_page = "holds"  
5     limit = CGI.param('limit') || 25;
6     offset = CGI.param('offset') || 0;
7 %]
8
9 <div id='myopac_holds_div'>
10
11     <div id="acct_holds_tabs" style="padding-bottom: 12px;color:#666;">
12         <div class="align selected">
13             <a href='holds'><img src="[% ctx.media_prefix %]/images/sub_holds_off.jpg"/></a>
14         </div>
15         <div class="align">
16             <img src="[% ctx.media_prefix %]/images/sub_holds_hist_on.jpg"/>
17         </div>
18         <div class="clear-both"></div>
19     </div>
20
21     <div class="header_middle">
22         <span id="acct_holds_header" style="float:left;">
23             [% l("Previously Held Items") %]
24         </span>
25         <span style="float:right;">
26             <a class="hide_me" href="#">Export List</a>
27         </span>
28     </div>
29     <div class="clear-both"></div>
30
31     <div id='holds_main'>
32         [% IF ctx.holds.size < 1 %]
33         <div class="opac-auto-079">
34             <big><strong>[% l('No holds found.') %]</strong></big>
35         </div>
36         [% ELSE %]
37         <table style='border-collapse:collapse; width: 100%;'>
38             <thead id='acct_holds_main_header'>
39                 <tr>
40                     <td width="138"><span>[% l('Title') %]</span></td>
41                     <td width="123"><span>[% l('Author') %]</span></td>
42                     <td width="64"> <span>[% l('Format') %]</span></td>
43                     <td width="136"><span>[% l('Pickup Location') %]</span> </td>
44                     <td width="104">[% l('Active On') %]</td>
45                     <td width="95">[% l('Active') %]</td>
46                     <td width="106">[% l('Date Fulfilled') %]</td>
47                     <td width="172"><span>[% l('Status') %]</span></td>
48                 </tr>
49             </thead>
50             <tbody>
51                 [% FOR hold IN ctx.holds;
52                     attrs = {marc_xml => hold.marc_xml};
53                     PROCESS get_marc_attrs args=attrs;
54                     ahr = hold.hold.hold %]
55
56                 <tr id="acct_holds_temp" name="acct_holds_temp" class="acct_holds_temp">
57
58                     <td width="138">
59                         <div style="margin-top:10px;margin-bottom:10px;">
60                             <a href="[% ctx.opac_root %]/record/[% hold.hold.bre.id %]">[% attrs.title | html %]</a>
61                         </div>
62                     </td>
63                     <td width="123">
64                         <div style="margin-top:10px;margin-bottom:10px;">
65                             <a href="[% ctx.opac_root %]/results?qtype=author&query=[% attrs.author | replace('[,\.:;]', '') | url %]">[% attrs.author | html %]</a>
66                         </div>
67                     </td>
68                     <td width="64">
69                         <div style="width:26px;height:23px;margin-top:6px;margin-bottom:6px;">
70                             [% IF attrs.format_icon %]
71                             <img src="[% ctx.media_prefix %]/images/[% attrs.form_icon %]"
72                                 title="[% attrs.format %]" alt="[% attrs.format %]" />
73                             [% ELSE;
74                                 attrs.format;
75                                END %]
76                         </div>
77                     </td>
78                     <td width="136">
79                         [% ctx.find_aou(ahr.pickup_lib).name %]
80                     </td>
81                     <td width="104">
82                         [% IF ahr.frozen == 't' AND ahr.thaw_date;
83                             date.format(ctx.parse_datetime(ahr.thaw_date), DATE_FORMAT);
84                         END %]
85                     </td>
86                     <td width="95">
87                         [% l(ahr.frozen == 'f' ? 'Active' : 'Suspended') %]
88                     </td>
89                     <td width="106">
90                         [% IF ahr.fulfillment_time;
91                             date.format(ctx.parse_datetime(ahr.fulfillment_time), DATE_FORMAT);
92                         END %]
93                     </td>
94                     <td width="110">
95                         <div name="acct_holds_status"
96                             style="margin-top:10px;margin-bottom:10px;">
97                             [%
98                                 IF hold.hold.status == 4;
99                                     l("Available");
100                                     IF ahr.shelf_expire_time;
101                                         l('<br/>Expires [_1]', 
102                                             date.format(ctx.parse_datetime(ahr.shelf_expire_time), DATE_FORMAT));
103                                     END;
104                                 ELSIF hold.hold.estimated_wait AND hold.hold.estimated_wait > 0;
105                                     # estimated wait is delivered as seconds.
106                                     SET hwait = POSIX.ceil(hold.hold.estimated_wait / 86400);
107                                     l("Estimated wait: [quant,_1,day,days]", hwait);
108                                 ELSIF hold.hold.status == 3;
109                                     l("In Transit");
110                                 ELSIF hold.hold.status < 3;
111                                     l("Waiting for copy");
112                                 END;
113                             %]
114                         </div>
115                     </td>
116                 </tr>
117                 [% END %]
118             </tbody>
119         </table>
120         [% END %]
121     </div>
122 [% END %]