webstaff: add prefix, suffix, and parts columns to holdings table
authorGalen Charlton <gmc@esilibrary.com>
Thu, 28 Jan 2016 23:06:19 +0000 (18:06 -0500)
committerKathy Lussier <klussier@masslnc.org>
Tue, 2 Feb 2016 19:58:55 +0000 (14:58 -0500)
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Open-ILS/src/templates/staff/cat/catalog/t_holdings.tt2
Open-ILS/web/js/ui/default/staff/cat/services/holdings.js

index 9764b9d..a875631 100644 (file)
@@ -99,6 +99,9 @@
     <eg-grid-field label="[% l('Barcode') %]"         path="barcode" visible></eg-grid-field>
     <eg-grid-field label="[% l('Status') %]"          path="status.name" flex="1" visible></eg-grid-field>
 
+    <eg-grid-field label="[% l('Prefix') %]"                 path="call_number.prefix.label"></eg-grid-field>
+    <eg-grid-field label="[% l('Suffix') %]"                 path="call_number.suffix.label"></eg-grid-field>
+    <eg-grid-field label="[% l('Parts') %]"                  path="monograph_parts"></eg-grid-field>
     <eg-grid-field label="[% l('Circulating Library') %]"    path="circ_lib.name"></eg-grid-field>
     <eg-grid-field label="[% l('Price') %]"                  path="price"></eg-grid-field>
     <eg-grid-field label="[% l('Circulation Modifier') %]"   path="circ_modifier"></eg-grid-field>
index bde91e2..f33fa65 100644 (file)
@@ -15,7 +15,7 @@ function(egCore , $q) {
     service.prototype.flesh = {   
         flesh : 2, 
         flesh_fields : {
-            acp : ['status','location','circ_lib'],
+            acp : ['status','location','circ_lib','parts'],
             acn : ['prefix','suffix','copies']
         }
     }
@@ -106,6 +106,14 @@ function(egCore , $q) {
                     }
                 );
 
+                // create virtual field for displaying active parts
+                angular.forEach(svc.copies, function (cp) {
+                    cp.monograph_parts = '';
+                    if (cp.parts && cp.parts.length > 0) {
+                        cp.monograph_parts = cp.parts.map(function(obj) { return obj.label; }).join();
+                    }
+                });
+
                 // create a label using just the unique part of the owner list
                 var index = 0;
                 var prev_owner_list;