From 204d30c967f02df8a3054ea852b320f692407d88 Mon Sep 17 00:00:00 2001 From: Michael Peters Date: Wed, 22 Jun 2011 10:14:55 -0400 Subject: [PATCH] LP#790639: Provide actual text, rather than id values in patron search results for various columns Cleaned up some tabs versus spaces and a needless trailing comma from original patch. Not porting to master, hoping to use collab/phasefx/fm_columns instead. Signed-off-by: Jason Etheridge Signed-off-by: Michael Peters --- .../server/locale/en-US/patron.properties | 2 ++ .../staff_client/server/patron/search_result.js | 30 +++++++++++++++++++++- 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/Open-ILS/xul/staff_client/server/locale/en-US/patron.properties b/Open-ILS/xul/staff_client/server/locale/en-US/patron.properties index ba789c859d..ada0d4ead7 100644 --- a/Open-ILS/xul/staff_client/server/locale/en-US/patron.properties +++ b/Open-ILS/xul/staff_client/server/locale/en-US/patron.properties @@ -343,6 +343,8 @@ staff.patron.search_result.init.search_clipboard=patron search clipboard staff.patron.search_result.init.search_saving_columns=patron search saving columns staff.patron.search_result.mailing_address_column_label_prefix=Mailing Addr: staff.patron.search_result.billing_address_column_label_prefix=Billing Addr: +staff.patron.search_result.ident_type_column_label_prefix=Ident Type: +staff.patron.search_result.ident_type2_column_label_prefix=Ident Type 2: staff.patron.summary.patron_bill.money=$ %1$s staff.patron.summary.retrieve.no_barcode=summary: No barcode or ID staff.patron.summary.patron_net_access=Internet diff --git a/Open-ILS/xul/staff_client/server/patron/search_result.js b/Open-ILS/xul/staff_client/server/patron/search_result.js index d313cbb617..1420763f82 100644 --- a/Open-ILS/xul/staff_client/server/patron/search_result.js +++ b/Open-ILS/xul/staff_client/server/patron/search_result.js @@ -36,13 +36,20 @@ patron.search_result.prototype = { 'au_family_name' : { 'hidden' : false }, 'au_first_given_name' : { 'hidden' : false }, 'au_second_given_name' : { 'hidden' : false }, - 'au_dob' : { 'hidden' : false } + 'au_dob' : { 'hidden' : false }, + 'au_profile' : { 'remove_me' : true }, + 'au_ident_type' : { 'remove_me' : true }, + 'au_ident_type2' : { 'remove_me' : true } }).concat( obj.list.fm_columns('ac',{ '*' : { 'remove_virtual' : true, 'expanded_label' : true, 'hidden' : true }, 'ac_barcode' : { 'hidden' : false } }) ).concat( + obj.list.fm_columns('pgt',{ + '*' : { 'remove_virtual' : true, 'expanded_label' : true, 'hidden' : true } + }) + ).concat( obj.list.fm_columns('aua',{ '*' : { 'dataobj' : 'billing_aua', @@ -60,6 +67,24 @@ patron.search_result.prototype = { 'hidden' : true } },'mailing_') + ).concat( + obj.list.fm_columns('cit',{ + '*' : { + 'dataobj' : 'ident_type', + 'remove_virtual' : true, + 'label_prefix' : $('patronStrings').getString('staff.patron.search_result.ident_type_column_label_prefix'), + 'hidden' : true + } + },'ident_type_') + ).concat( + obj.list.fm_columns('cit',{ + '*' : { + 'dataobj' : 'ident_type2', + 'remove_virtual' : true, + 'label_prefix' : $('patronStrings').getString('staff.patron.search_result.ident_type2_column_label_prefix'), + 'hidden' : true + } + },'ident_type2_') ); obj.list.init( @@ -80,6 +105,9 @@ patron.search_result.prototype = { row.my.ac = row.my.au.card(); row.my.billing_aua = row.my.au.billing_address(); row.my.mailing_aua = row.my.au.mailing_address(); + row.my.pgt = typeof row.my.au.profile() == 'object' ? row.my.au.profile() : obj.OpenILS.data.hash.pgt[ row.my.au.profile() ]; + row.my.ident_type = typeof row.my.au.ident_type() == 'object' ? row.my.au.ident_type() : obj.OpenILS.data.hash.cit[ row.my.au.ident_type() ]; + row.my.ident_type2 = typeof row.my.au.ident_type2() == 'object' ? row.my.au.ident_type2() : obj.OpenILS.data.hash.cit[ row.my.au.ident_type2() ]; if (typeof params.on_retrieve == 'function') { params.on_retrieve(row); } else { -- 2.11.0