]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/src/templates-bootstrap/opac/parts/hold_status.tt2
LP1868147-Titles in carousel run together in mobile display.
[Evergreen.git] / Open-ILS / src / templates-bootstrap / opac / parts / hold_status.tt2
1 [% BLOCK get_hold_status %]
2 <div>
3     [% IF hold.hold.status == 4 %]
4             <span class="myopac-hold-available">[% l("Available") %] </span>
5               [% IF ahr.shelf_expire_time %]
6                 <br/>
7                 [% l("Expires") %]
8                  <span class="myopac-shelf-expire">
9                      [% date.format(ctx.parse_datetime(ahr.shelf_expire_time), DATE_FORMAT) %]
10                  </span>
11               [% END %]
12
13
14      [% ELSIF hold.hold.status == 6 %]
15                <span class="myopac-hold-canceled"> [% l("Canceled") %] </span>
16                   <span class="myopac-cancel-time">
17                       [% date.format(ctx.parse_datetime(ahr.cancel_time), DATE_FORMAT) %]
18                   </span>
19
20      [%  ELSIF hold.hold.status == 7 %]
21                <span class="myopac-hold-suspended"> [% l("Suspended") %] </span>
22                  [% IF ahr.thaw_date %]
23                    <br/>
24                    [% l("Activate On") %]
25                       <span class="my-account-activate-time">
26                         [% date.format(ctx.parse_datetime(ahr.thaw_date), DATE_FORMAT) %]
27                       </span>
28                  [% END %]
29
30      [% ELSIF hold.hold.status == 9 %]
31                <span class="myopac-hold-fulfilled">[% l("Fulfilled") %]</span>
32                   <span class="myopac-fulfill-time">
33                      [% date.format(ctx.parse_datetime(ahr.fulfillment_time), DATE_FORMAT) %]
34                   </span>
35
36
37      [% ELSIF hold.hold.estimated_wait AND hold.hold.estimated_wait > 0;
38             # estimated wait is delivered as seconds.
39             SET hwait = POSIX.ceil(hold.hold.estimated_wait / 86400) %]
40               <span class="myopac-hold-wait"> [% l("Estimated wait:") %] </span>
41                 <span class="myopac-hold-wait-time">
42                   [% l("[quant,_1,day,days]", hwait) | html %]
43                 </span>
44
45      [% ELSIF hold.hold.status == 3 OR hold.hold.status == 8 %]
46             <span class="myopac-transit"> [% l("In Transit") %] </span>
47
48      [% ELSIF hold.hold.status < 3 %]
49             <span class="myopac-uncaptured-hold"> [% l("Waiting for copy") %] </span>
50      [% END %]
51    </div>
52     <div>
53         [% # Only show the count for holds that have not been captured
54            IF hold.hold.status < 3 OR hold.hold.status == 7 %]
55              <span class="myopac-hold-count">
56                 [% l('You are Hold #[_1] on [quant,_2, copy, copies]',
57                    hold.hold.queue_position, hold.hold.potential_copies) | html %]
58              </span>
59          [% END %]
60     </div>
61 [% END %]
62