LP#1773434 missing option to "Show in Catalog"
authora. bellenir <ab@grpl.org>
Mon, 4 Jun 2018 23:41:55 +0000 (19:41 -0400)
committera. bellenir <ab@grpl.org>
Mon, 4 Jun 2018 23:41:55 +0000 (19:41 -0400)
Signed-off-by: a. bellenir <ab@grpl.org>
Open-ILS/src/templates/staff/cat/item/t_list.tt2
Open-ILS/web/js/ui/default/staff/cat/item/app.js
Open-ILS/web/js/ui/default/staff/circ/services/item.js

index a7de8ec..9984887 100644 (file)
@@ -10,6 +10,8 @@
 
   <eg-grid-action handler="add_copies_to_bucket"
     label="[% l('Add Items to Bucket') %]"></eg-grid-action>
+  <eg-grid-action handler="show_in_catalog"
+    label="[% l('Show in Catalog') %]"></eg-grid-action>
   <eg-grid-action handler="make_copies_bookable"
     label="[% l('Make Items Bookable') %]"></eg-grid-action>
   <eg-grid-action handler="book_copies_now"
index cededcd..9290197 100644 (file)
@@ -535,6 +535,10 @@ function($scope , $q , $routeParams , $location , $timeout , $window , egCore ,
         });
     }
 
+    $scope.show_in_catalog = function(){
+        itemSvc.show_in_catalog(copyGrid.selectedItems());
+    }
+
     if (copyId.length > 0) {
         itemSvc.fetch(null,copyId).then(
             function() {
index b1285af..ef80698 100644 (file)
@@ -950,5 +950,11 @@ function(egCore , egCirc , $uibModal , $q , $timeout , $window , egConfirmDialog
         });
     }
 
+    service.show_in_catalog = function(copy_list){
+        angular.forEach(copy_list, function(copy){
+            window.open('/eg/opac/record/'+copy['call_number.record.id'], '_blank')
+        });
+    }
+
     return service;
 }])