Added hold_status to git. Updated DATE_FORMAT to DATETIME_FORMAT for hold expiration...
authorGarry Collum <gcollum@gmail.com>
Thu, 2 Jun 2016 17:25:17 +0000 (13:25 -0400)
committerGalen Charlton <gmc@esilibrary.com>
Wed, 10 Aug 2016 16:21:06 +0000 (12:21 -0400)
Open-ILS/src/kcpl_templates/opac/parts/hold_status.tt2 [new file with mode: 0644]

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 (file)
index 0000000..ce50c9f
--- /dev/null
@@ -0,0 +1,29 @@
+[% BLOCK get_hold_status %]
+    <div>
+    [% 
+        IF hold.hold.status == 4;
+            l("Available") | html;
+            IF ahr.shelf_expire_time;
+                '<br/>';
+                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 
+    %]
+    </div>
+    <div>
+        [% l('[_1] hold on [quant,_2, copy, copies]', 
+            hold.hold.queue_position, hold.hold.potential_copies) | html %]
+    </div>
+[% END %]