From aa0e52b253d866e3b4400ba79eca64d1fc1403da Mon Sep 17 00:00:00 2001 From: Jason Etheridge Date: Mon, 9 Feb 2015 15:44:10 -0500 Subject: [PATCH] LP#1402797 add a Retrieve All These Patrons button in the Item Status -> Circ History List Signed-off-by: Jason Etheridge Signed-off-by: Bill Erickson --- .../staff/cat/item/t_circ_list_pane.tt2 | 10 ++++++++++ .../web/js/ui/default/staff/cat/item/app.js | 19 +++++++++++++++++-- 2 files changed, 27 insertions(+), 2 deletions(-) diff --git a/Open-ILS/src/templates/staff/cat/item/t_circ_list_pane.tt2 b/Open-ILS/src/templates/staff/cat/item/t_circ_list_pane.tt2 index 9f7bbb5934..05ee925df1 100644 --- a/Open-ILS/src/templates/staff/cat/item/t_circ_list_pane.tt2 +++ b/Open-ILS/src/templates/staff/cat/item/t_circ_list_pane.tt2 @@ -3,6 +3,16 @@ [% l('Item has not circulated.') %] +
+
+
+ +
+
+
+
diff --git a/Open-ILS/web/js/ui/default/staff/cat/item/app.js b/Open-ILS/web/js/ui/default/staff/cat/item/app.js index 82ed92380d..a7d08fb824 100644 --- a/Open-ILS/web/js/ui/default/staff/cat/item/app.js +++ b/Open-ILS/web/js/ui/default/staff/cat/item/app.js @@ -210,8 +210,8 @@ function($scope , $q , $location , $timeout , egCore , egGridDataProvider , item * Detail view -- shows one copy */ .controller('ViewCtrl', - ['$scope','$q','$location','$routeParams','egCore','itemSvc','egBilling', -function($scope , $q , $location , $routeParams , egCore , itemSvc , egBilling) { + ['$scope','$q','$location','$routeParams','$timeout','$window','egCore','itemSvc','egBilling', +function($scope , $q , $location , $routeParams , $timeout , $window , egCore , itemSvc , egBilling) { var copyId = $routeParams.id; $scope.tab = $routeParams.tab || 'summary'; $scope.context.page = 'detail'; @@ -366,6 +366,21 @@ function($scope , $q , $location , $routeParams , egCore , itemSvc , egBilling) }); } + $scope.retrieveAllPatrons = function() { + var users = new Set(); + angular.forEach($scope.circ_list.map(function(circ) { return circ.usr(); }),function(usr) { + users.add(usr); + }); + users.forEach(function(usr) { + $timeout(function() { + var url = $location.absUrl().replace( + /\/cat\/.*/, + '/circ/patron/' + usr.id() + '/checkout'); + $window.open(url, '_blank') + }); + }); + } + function loadCircHistory() { $scope.circ_list = []; -- 2.43.2