From 26e03cab4fa76a5418cc31ef927327a5d2c853a9 Mon Sep 17 00:00:00 2001 From: phasefx Date: Tue, 27 Oct 2009 06:35:52 +0000 Subject: [PATCH] List columns for hold cancel reason, cancel note, and cancel time. Display them by default if either of the two org unit settings that control display of cancelled holds are set. git-svn-id: svn://svn.open-ils.org/ILS/trunk@14623 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/xul/staff_client/server/circ/util.js | 27 ++++++++++++++++++++++ .../server/locale/en-US/circ.properties | 6 +++++ Open-ILS/xul/staff_client/server/patron/holds.js | 5 +++- 3 files changed, 37 insertions(+), 1 deletion(-) diff --git a/Open-ILS/xul/staff_client/server/circ/util.js b/Open-ILS/xul/staff_client/server/circ/util.js index 32cbbce7de..3a83706984 100644 --- a/Open-ILS/xul/staff_client/server/circ/util.js +++ b/Open-ILS/xul/staff_client/server/circ/util.js @@ -1537,6 +1537,33 @@ circ.util.hold_columns = function(modify,params) { var c = [ { 'persist' : 'hidden width ordinal', + 'id' : 'cancel_time', + 'label' : document.getElementById('circStrings').getString('staff.circ.utils.hold_cancel_time'), + 'flex' : 1, + 'primary' : false, + 'hidden' : true, + 'editable' : false, 'render' : function(my) { return my.ahr.cancel_time(); } + }, + { + 'persist' : 'hidden width ordinal', + 'id' : 'cancel_cause', + 'label' : document.getElementById('circStrings').getString('staff.circ.utils.hold_cancel_cause'), + 'flex' : 1, + 'primary' : false, + 'hidden' : true, + 'editable' : false, 'render' : function(my) { return typeof my.ahr.cancel_cause == 'object' ? my.ahr.cancel_cause().label() : data.hash.ahrcc[ my.ahr.cancel_cause() ].label(); } + }, + { + 'persist' : 'hidden width ordinal', + 'id' : 'cancel_note', + 'label' : document.getElementById('circStrings').getString('staff.circ.utils.hold_cancel_note'), + 'flex' : 1, + 'primary' : false, + 'hidden' : true, + 'editable' : false, 'render' : function(my) { return my.ahr.cancel_note(); } + }, + { + 'persist' : 'hidden width ordinal', 'id' : 'request_lib', 'label' : document.getElementById('circStrings').getString('staff.circ.utils.request_lib'), 'flex' : 1, diff --git a/Open-ILS/xul/staff_client/server/locale/en-US/circ.properties b/Open-ILS/xul/staff_client/server/locale/en-US/circ.properties index 914e7b500d..bd77527bdb 100644 --- a/Open-ILS/xul/staff_client/server/locale/en-US/circ.properties +++ b/Open-ILS/xul/staff_client/server/locale/en-US/circ.properties @@ -284,6 +284,12 @@ staff.circ.utils.available_time=Available On staff.circ.utils.capture_timestamp=Capture Timestamp # Date the hold was captured staff.circ.utils.capture_time=Capture Date +# Date the hold was cancelled +staff.circ.utils.hold_cancel_time=Cancel Time +# Controlled entry for why the hold was cancelled +staff.circ.utils.hold_cancel_cause=Cancel Cause +# Freetext note pertaining to the cancelled hold +staff.circ.utils.hold_cancel_note=Cancel Note staff.circ.utils.hold_status.1=Waiting for copy staff.circ.utils.hold_status.2=Waiting for capture staff.circ.utils.hold_status.3=In-Transit diff --git a/Open-ILS/xul/staff_client/server/patron/holds.js b/Open-ILS/xul/staff_client/server/patron/holds.js index 7d8c1e02a6..50e829bf18 100644 --- a/Open-ILS/xul/staff_client/server/patron/holds.js +++ b/Open-ILS/xul/staff_client/server/patron/holds.js @@ -52,7 +52,10 @@ patron.holds.prototype = { 'current_copy' : { 'hidden' : false }, 'capture_time' : { 'hidden' : false }, 'notify_time' : { 'hidden' : false }, - 'notify_count' : { 'hidden' : false } + 'notify_count' : { 'hidden' : false }, + 'cancel_cause' : { 'hidden' : ! ( obj.data.hash.aous['circ.holds.canceled.display_count'] || obj.data.hash.aous['circ.holds.canceled.display_age'] ) }, + 'cancel_note' : { 'hidden' : ! ( obj.data.hash.aous['circ.holds.canceled.display_count'] || obj.data.hash.aous['circ.holds.canceled.display_age'] ) }, + 'cancel_time' : { 'hidden' : ! ( obj.data.hash.aous['circ.holds.canceled.display_count'] || obj.data.hash.aous['circ.holds.canceled.display_age'] ) } } ); -- 2.11.0