14806654da9b5aeffd8882fe4543e2fc7c8ae878
[Evergreen.git] / Open-ILS / src / templates / opac / parts / hold_status.tt2
1 [% BLOCK get_hold_status %]
2     <div>
3     [% 
4         IF hold.hold.status == 4;
5             l("Available") | html;
6             IF ahr.shelf_expire_time;
7                 '<br/>';
8                 l('Expires [_1]', 
9                     date.format(ctx.parse_datetime(ahr.shelf_expire_time), DATE_FORMAT)) | html;
10             END;
11
12         ELSIF hold.hold.estimated_wait AND hold.hold.estimated_wait > 0;
13             # estimated wait is delivered as seconds.
14             SET hwait = POSIX.ceil(hold.hold.estimated_wait / 86400);
15             l("Estimated wait: [quant,_1,day,days]", hwait) | html;
16
17         ELSIF hold.hold.status == 3;
18             l("In Transit") | html;
19
20         ELSIF hold.hold.status < 3;
21             l("Waiting for copy") | html;
22         END 
23     %]
24     </div>
25     <div>
26         [% l('[_1] hold on [quant,_2,circulating copy,circulating copies]', 
27             hold.hold.queue_position, hold.hold.potential_copies) | html %]
28     </div>
29 [% END %]