From befdbad1cb34391e0e53dfe86dcd39395656e5ce Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Mon, 27 Feb 2017 11:37:11 -0500 Subject: [PATCH] LP#1537223 Shared bucket barcode links; last name Display the owner barcode and last name in the shared bucket info display. Display the barcode as a link to the owning user. Signed-off-by: Bill Erickson Signed-off-by: Dawn Dale Signed-off-by: Kathy Lussier --- .../src/templates/staff/cat/bucket/share/t_bucket_info.tt2 | 8 +++++++- Open-ILS/web/js/ui/default/staff/cat/bucket/copy/app.js | 9 +++++++-- Open-ILS/web/js/ui/default/staff/cat/bucket/record/app.js | 10 ++++++++-- 3 files changed, 22 insertions(+), 5 deletions(-) diff --git a/Open-ILS/src/templates/staff/cat/bucket/share/t_bucket_info.tt2 b/Open-ILS/src/templates/staff/cat/bucket/share/t_bucket_info.tt2 index 70c8882806..9862c3341b 100644 --- a/Open-ILS/src/templates/staff/cat/bucket/share/t_bucket_info.tt2 +++ b/Open-ILS/src/templates/staff/cat/bucket/share/t_bucket_info.tt2 @@ -7,7 +7,13 @@ / [% l('Created {{bucket().create_time() | date}}') %] - / {{bucket()._owner_name}} @ {{bucket()._owner_ou}} + / + {{bucket()._owner_name}} + + ({{bucket()._owner_ident}}) + + @ {{bucket()._owner_ou}} + / {{bucket().description()}} diff --git a/Open-ILS/web/js/ui/default/staff/cat/bucket/copy/app.js b/Open-ILS/web/js/ui/default/staff/cat/bucket/copy/app.js index efd8ab141d..fc78a77fe6 100644 --- a/Open-ILS/web/js/ui/default/staff/cat/bucket/copy/app.js +++ b/Open-ILS/web/js/ui/default/staff/cat/bucket/copy/app.js @@ -154,9 +154,14 @@ angular.module('egCatCopyBuckets', return; } egCore.pcrud.retrieve( - 'au', bucket.owner() + 'au', bucket.owner(), + {flesh : 1, flesh_fields : {au : ["card"]}} ).then(function(patron) { - bucket._owner_name = patron.usrname(); + // On the off chance no barcode is present (it's not + // required) use the patron username as the identifier. + bucket._owner_ident = patron.card() ? + patron.card().barcode() : patron.usrname(); + bucket._owner_name = patron.family_name(); bucket._owner_ou = egCore.org.get(patron.home_ou()).shortname(); }); diff --git a/Open-ILS/web/js/ui/default/staff/cat/bucket/record/app.js b/Open-ILS/web/js/ui/default/staff/cat/bucket/record/app.js index a1d63ee473..10b26104ff 100644 --- a/Open-ILS/web/js/ui/default/staff/cat/bucket/record/app.js +++ b/Open-ILS/web/js/ui/default/staff/cat/bucket/record/app.js @@ -167,11 +167,17 @@ angular.module('egCatRecordBuckets', return; } egCore.pcrud.retrieve( - 'au', bucket.owner() + 'au', bucket.owner(), + {flesh : 1, flesh_fields : {au : ["card"]}} ).then(function(patron) { - bucket._owner_name = patron.usrname(); + // On the off chance no barcode is present (it's not + // required) use the patron username as the identifier. + bucket._owner_ident = patron.card() ? + patron.card().barcode() : patron.usrname(); + bucket._owner_name = patron.family_name(); bucket._owner_ou = egCore.org.get(patron.home_ou()).shortname(); }); + service.currentBucket = bucket; deferred.resolve(bucket); }); -- 2.11.0