webstaff: Add actions for editing just copy attributes or vol/copy details
authorMike Rylander <mrylander@gmail.com>
Fri, 21 Aug 2015 17:30:06 +0000 (13:30 -0400)
committerJason Stephenson <jstephenson@mvlc.org>
Mon, 14 Sep 2015 19:44:16 +0000 (15:44 -0400)
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Open-ILS/src/templates/staff/cat/catalog/t_holdings.tt2
Open-ILS/web/js/ui/default/staff/cat/catalog/app.js

index 4220630..8cf4396 100644 (file)
       label="[% l('Item as Damaged') %]"></eg-grid-action>
     <eg-grid-action handler="selectedHoldingsMissing" group="[% l('Mark') %]"
       label="[% l('Item as Missing') %]"></eg-grid-action>
       label="[% l('Item as Damaged') %]"></eg-grid-action>
     <eg-grid-action handler="selectedHoldingsMissing" group="[% l('Mark') %]"
       label="[% l('Item as Missing') %]"></eg-grid-action>
+    <eg-grid-action handler="selectedHoldingsVolEdit" group="[% l('Edit') %]"
+      label="[% l('Selected Volumes') %]"></eg-grid-action>
+    <eg-grid-action handler="selectedHoldingsCopyEdit" group="[% l('Edit') %]"
+      label="[% l('Selected Copies') %]"></eg-grid-action>
     <eg-grid-action handler="selectedHoldingsVolCopyEdit" group="[% l('Edit') %]"
     <eg-grid-action handler="selectedHoldingsVolCopyEdit" group="[% l('Edit') %]"
-      label="[% l('Selected Vols/Copies') %]"></eg-grid-action>
+      label="[% l('Selected Volumes and Copies') %]"></eg-grid-action>
 
     <eg-grid-field label="[% l('Owning Library') %]"  path="owner_label" flex="4" align="right" visible></eg-grid-field>
     <eg-grid-field label="[% l('Call Number') %]"     path="call_number.label" visible></eg-grid-field>
 
     <eg-grid-field label="[% l('Owning Library') %]"  path="owner_label" flex="4" align="right" visible></eg-grid-field>
     <eg-grid-field label="[% l('Call Number') %]"     path="call_number.label" visible></eg-grid-field>
index 604a955..358e97e 100644 (file)
@@ -312,11 +312,16 @@ function($scope , $routeParams , $location , $window , $q , egCore , egHolds , e
         return cp_id_list;
     }
 
         return cp_id_list;
     }
 
-    $scope.selectedHoldingsVolCopyEdit = function (){
+    spawnHoldingsEdit = function (hide_vols,hide_copies){
         egCore.net.request(
             'open-ils.actor',
             'open-ils.actor.anon_cache.set_value',
         egCore.net.request(
             'open-ils.actor',
             'open-ils.actor.anon_cache.set_value',
-            null, 'edit-these-copies', {record_id: $scope.record_id, copies: gatherSelectedHoldingsIds() }
+            null, 'edit-these-copies', {
+                record_id: $scope.record_id,
+                copies: gatherSelectedHoldingsIds(),
+                hide_vols : hide_vols,
+                hide_copies : hide_copies
+            }
         ).then(function(key) {
             if (key) {
                 var url = egCore.env.basePath + 'cat/volcopy/' + key;
         ).then(function(key) {
             if (key) {
                 var url = egCore.env.basePath + 'cat/volcopy/' + key;
@@ -326,6 +331,9 @@ function($scope , $routeParams , $location , $window , $q , egCore , egHolds , e
             }
         });
     }
             }
         });
     }
+    $scope.selectedHoldingsVolCopyEdit = function () { spawnHoldingsEdit(false,false) }
+    $scope.selectedHoldingsVolEdit = function () { spawnHoldingsEdit(false,true) }
+    $scope.selectedHoldingsCopyEdit = function () { spawnHoldingsEdit(true,false) }
 
     $scope.selectedHoldingsItemStatus = function (){
         var url = egCore.env.basePath + 'cat/item/search/' + gatherSelectedHoldingsIds().join(',')
 
     $scope.selectedHoldingsItemStatus = function (){
         var url = egCore.env.basePath + 'cat/item/search/' + gatherSelectedHoldingsIds().join(',')