add add/acknowledge copy alert actions to holdings view menu
authorGalen Charlton <gmc@esilibrary.com>
Fri, 5 Aug 2016 18:16:03 +0000 (14:16 -0400)
committerMike Rylander <mrylander@gmail.com>
Thu, 31 Aug 2017 17:23:16 +0000 (13:23 -0400)
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Open-ILS/src/templates/staff/cat/catalog/t_holdings.tt2
Open-ILS/web/js/ui/default/staff/cat/catalog/app.js

index b506f3f..1e98580 100644 (file)
@@ -71,6 +71,8 @@
       label="[% l('Copies') %]"></eg-grid-action>
     <eg-grid-action handler="selectedHoldingsVolCopyAdd" group="[% l('Add') %]"
       label="[% l('Volumes and Copies') %]"></eg-grid-action>
+    <eg-grid-action handler="selectedHoldingsCopyAlertsAdd" group="[% l('Add') %]" disabled="vols_not_shown"
+      label="[% l('Copy Alerts') %]"></eg-grid-action>
 
     <eg-grid-action handler="selectedHoldingsVolEdit" group="[% l('Edit') %]"
       label="[% l('Volumes') %]"></eg-grid-action>
@@ -80,6 +82,8 @@
       label="[% l('Volumes and Copies') %]"></eg-grid-action>
     <eg-grid-action handler="replaceBarcodes" group="[% l('Edit') %]"
       label="[% l('Replace Barcodes') %]"></eg-grid-action>
+    <eg-grid-action handler="selectedHoldingsCopyAlertsManage" group="[% l('Edit') %]"
+      label="[% l('Acknowledge Copy Alerts') %]"></eg-grid-action>
 
     <eg-grid-action handler="selectedHoldingsEmptyVolCopyDelete" group="[% l('Delete') %]" disabled="vols_not_shown"
       label="[% l('Empty Volumes') %]"></eg-grid-action>
index 8b541f5..383f02e 100644 (file)
@@ -1491,6 +1491,17 @@ function($scope , $routeParams , $location , $window , $q , egCore , egHolds , e
         });
     }
 
+    $scope.selectedHoldingsCopyAlertsAdd = function() {
+        egCirc.add_copy_alerts(gatherSelectedHoldingsIds()).then(function() {
+            // no need to refresh grid
+        });
+    }
+    $scope.selectedHoldingsCopyAlertsManage = function() {
+        egCirc.manage_copy_alerts(gatherSelectedHoldingsIds()).then(function() {
+            // no need to refresh grid
+        });
+    }
+
     $scope.attach_to_peer_bib = function() {
         var copy_list = gatherSelectedHoldingsIds();
         if (copy_list.length == 0) return;