Add a "Due Time" column. Useful for items that circulate only for hours at a time.
authordbs <dbs@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Sat, 6 Jun 2009 01:53:45 +0000 (01:53 +0000)
committerdbs <dbs@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Sat, 6 Jun 2009 01:53:45 +0000 (01:53 +0000)
Warning: This is a gross hack, doesn't support localized displays, etc.

git-svn-id: svn://svn.open-ils.org/ILS/trunk@13336 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/server/circ/util.js
Open-ILS/xul/staff_client/server/locale/en-US/circ.properties

index 5e753f7..967ec6f 100644 (file)
@@ -191,7 +191,16 @@ circ.util.offline_checkout_columns = function(modify,params) {
                        'primary' : false,
                        'hidden' : false,
                        'render' : function(my) { return my.due_date; }
+               },
+               {
+                       'id' : 'due_time',
+                       'label' : document.getElementById('commonStrings').getString('staff.circ_label_due_time'),
+                       'flex' : 1,
+                       'primary' : false,
+                       'hidden' : false,
+                       'render' : function(my) { return my.due_time; }
                }
+
        ];
        if (modify) for (var i = 0; i < c.length; i++) {
                if (modify[ c[i].id ]) {
@@ -341,6 +350,14 @@ circ.util.offline_renew_columns = function(modify,params) {
                        'primary' : false,
                        'hidden' : false,
                        'render' : function(my) { return my.due_date; }
+               },
+               {
+                       'id' : 'due_time',
+                       'label' : document.getElementById('commonStrings').getString('staff.circ_label_due_time'),
+                       'flex' : 1,
+                       'primary' : false,
+                       'hidden' : false,
+                       'render' : function(my) { return my.due_time; }
                }
        ];
        if (modify) for (var i = 0; i < c.length; i++) {
@@ -891,6 +908,25 @@ circ.util.columns = function(modify,params) {
                },
                {
                        'persist' : 'hidden width ordinal',
+                       'id' : 'due_time',
+                       'label' : document.getElementById('commonStrings').getString('staff.circ_label_due_time'),
+                       'flex' : 1,
+                       'primary' : false,
+                       'hidden' : true,
+                       'render' : function(my) {
+                               if (my.circ) {
+                                       return my.circ.due_date().substr(11,8);
+                               } else {
+                                       if (my.acp.circulations()) {
+                                               return my.acp.circulations()[0].due_date().substr(11,8);
+                                       } else {
+                                               return "";
+                                       }
+                               }
+                       }
+               },
+               {
+                       'persist' : 'hidden width ordinal',
                        'id' : 'create_date',
                        'label' : document.getElementById('circStrings').getString('staff.circ.utils.create_date'),
                        'flex' : 1,
index 7a5fb33..8db6b1a 100644 (file)
@@ -200,6 +200,7 @@ staff.circ.utils.offline.count=Count
 staff.circ.utils.offline.patron_barcode=Patron Barcode
 staff.circ.utils.offline.item_barcode=Item Barcode
 staff.circ.utils.offline.due_date=Due Date
+staff.circ.utils.offline.due_time=Due Time
 staff.circ.utils.offline.backdate=Back Date
 staff.circ.utils.offline.use_time=Use Time
 staff.circ.utils.not_cataloged=Not Cataloged