From: Garry Collum Date: Thu, 2 Jun 2016 17:25:17 +0000 (-0400) Subject: Added hold_status to git. Updated DATE_FORMAT to DATETIME_FORMAT for hold expiration... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=03eb95f7070467af8842683ecb80ca9e517f4639;p=evergreen%2Fequinox.git Added hold_status to git. Updated DATE_FORMAT to DATETIME_FORMAT for hold expiration time. --- diff --git a/Open-ILS/src/kcpl_templates/opac/parts/hold_status.tt2 b/Open-ILS/src/kcpl_templates/opac/parts/hold_status.tt2 new file mode 100644 index 0000000000..ce50c9f3a2 --- /dev/null +++ b/Open-ILS/src/kcpl_templates/opac/parts/hold_status.tt2 @@ -0,0 +1,29 @@ +[% BLOCK get_hold_status %] +
+ [% + IF hold.hold.status == 4; + l("Available") | html; + IF ahr.shelf_expire_time; + '
'; + l('Expires [_1]', + date.format(ctx.parse_datetime(ahr.shelf_expire_time), DATETIME_FORMAT)) | html; + END; + + ELSIF hold.hold.estimated_wait AND hold.hold.estimated_wait > 0; + # estimated wait is delivered as seconds. + SET hwait = POSIX.ceil(hold.hold.estimated_wait / 86400); + l("Estimated wait: [quant,_1,day,days]", hwait) | html; + + ELSIF hold.hold.status == 3 OR hold.hold.status == 8; + l("In Transit") | html; + + ELSIF hold.hold.status < 3; + l("Waiting for copy") | html; + END + %] +
+
+ [% l('[_1] hold on [quant,_2, copy, copies]', + hold.hold.queue_position, hold.hold.potential_copies) | html %] +
+[% END %]