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