From: Galen Charlton Date: Tue, 20 Oct 2015 20:08:44 +0000 (+0000) Subject: webstaff: add another option for choosing volume transfer library X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=4a27bdb57e442368c12b795bfdc7b2afda1663b0;p=evergreen%2Fmasslnc.git webstaff: add another option for choosing volume transfer library The actions menu on the holdings view now has two ways of specifying a library to transfer volumes to: * Library as Volume Transfer Destination Pops up a modal with a library selector. * Library from Selection as Volume Transfer Destination Uses the currently selected volume's owning library to specify the target library. Signed-off-by: Galen Charlton Signed-off-by: Kathy Lussier --- diff --git a/Open-ILS/src/templates/staff/cat/catalog/t_choose_vol_target_lib.tt2 b/Open-ILS/src/templates/staff/cat/catalog/t_choose_vol_target_lib.tt2 new file mode 100644 index 0000000000..74e02c0bf4 --- /dev/null +++ b/Open-ILS/src/templates/staff/cat/catalog/t_choose_vol_target_lib.tt2 @@ -0,0 +1,25 @@ +
+ + + +
diff --git a/Open-ILS/src/templates/staff/cat/catalog/t_holdings.tt2 b/Open-ILS/src/templates/staff/cat/catalog/t_holdings.tt2 index e1eaa084f2..85d212d910 100644 --- a/Open-ILS/src/templates/staff/cat/catalog/t_holdings.tt2 +++ b/Open-ILS/src/templates/staff/cat/catalog/t_holdings.tt2 @@ -55,6 +55,8 @@ label="[% l('Item as Missing') %]"> + diff --git a/Open-ILS/web/js/ui/default/staff/cat/catalog/app.js b/Open-ILS/web/js/ui/default/staff/cat/catalog/app.js index 36e8a8b754..bb3abda481 100644 --- a/Open-ILS/web/js/ui/default/staff/cat/catalog/app.js +++ b/Open-ILS/web/js/ui/default/staff/cat/catalog/app.js @@ -978,6 +978,31 @@ function($scope , $routeParams , $location , $window , $q , egCore , egHolds , e } $scope.markLibAsVolTarget = function() { + return $modal.open({ + templateUrl: './cat/catalog/t_choose_vol_target_lib', + animation: true, + controller: + ['$scope','$modalInstance', + function($scope , $modalInstance) { + + var orgId = egCore.hatch.getLocalItem('eg.cat.volume_transfer_target') || 1; + $scope.org = egCore.org.get(orgId); + $scope.cant_have_vols = function (id) { return !egCore.org.CanHaveVolumes(id); }; + $scope.ok = function(org) { + egCore.hatch.setLocalItem( + 'eg.cat.volume_transfer_target', + org.id() + ); + $modalInstance.close(); + } + $scope.cancel = function($event) { + $modalInstance.dismiss(); + $event.preventDefault(); + } + }] + }); + } + $scope.markLibFromSelectedAsVolTarget = function() { egCore.hatch.setLocalItem( 'eg.cat.volume_transfer_target', $scope.holdingsGridControls.selectedItems()[0].owner_id