LP#1537223 Shared bucket barcode links; last name
authorBill Erickson <berickxx@gmail.com>
Mon, 27 Feb 2017 16:37:11 +0000 (11:37 -0500)
committerKathy Lussier <klussier@masslnc.org>
Fri, 3 Mar 2017 14:27:24 +0000 (09:27 -0500)
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 <berickxx@gmail.com>
Signed-off-by: Dawn Dale <ddale@georgialibraries.org>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Open-ILS/src/templates/staff/cat/bucket/share/t_bucket_info.tt2
Open-ILS/web/js/ui/default/staff/cat/bucket/copy/app.js
Open-ILS/web/js/ui/default/staff/cat/bucket/record/app.js

index 70c8882..9862c33 100644 (file)
@@ -7,7 +7,13 @@
     </ng-pluralize>
   </span>
   <span> / [% l('Created {{bucket().create_time() | date}}') %]</span>
-  <span ng-show="bucket()._owner_name"> / {{bucket()._owner_name}} @ {{bucket()._owner_ou}}</span>
+  <span ng-show="bucket()._owner_name"> / 
+    {{bucket()._owner_name}} 
+    <a target="_self" href="./circ/patron/{{bucket().owner()}}/checkout">
+      ({{bucket()._owner_ident}})
+    </a>
+    @ {{bucket()._owner_ou}}
+  </span>
   <span ng-show="bucket().description()"> / {{bucket().description()}}</span>
 </div>
 
index efd8ab1..fc78a77 100644 (file)
@@ -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();
             });
 
index a1d63ee..10b2610 100644 (file)
@@ -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);
         });