--- /dev/null
+<form ng-submit="ok(org)" role="form">
+ <div class="modal-header">
+ <button type="button" class="close" ng-click="cancel()"
+ aria-hidden="true">×</button>
+ <h4 class="modal-title">[% l('Choose volume transfer target') %]</h4>
+ </div>
+ <div class="modal-body">
+ <div class="row">
+ <div class="col-md-6">
+ <b>[% l('Target library:') %]</b>
+ </div>
+ <div class="col-md-6">
+ <eg-org-selector selected="org" disable-test="cant_have_vols"></eg-org-selector>
+ </div>
+ </div>
+ </div>
+ <div class="modal-footer">
+ <div class="row">
+ <div class="col-md-12 pull-right">
+ <input type="submit" class="btn btn-primary" value="[% l('OK') %]"/>
+ <button class="btn btn-warning" ng-click="cancel($event)">[% l('Cancel') %]</button>
+ </div>
+ </div>
+ </div>
+</form>
label="[% l('Item as Missing') %]"></eg-grid-action>
<eg-grid-action handler="markLibAsVolTarget" group="[% l('Mark') %]"
label="[% l('Library as Volume Transfer Destination') %]"></eg-grid-action>
+ <eg-grid-action handler="markLibFromSelectedAsVolTarget" group="[% l('Mark') %]"
+ label="[% l('Library from Selection as Volume Transfer Destination') %]"></eg-grid-action>
<eg-grid-action handler="markVolAsItemTarget" group="[% l('Mark') %]" disabled="vols_not_shown"
label="[% l('Volume as Item Transfer Destination') %]"></eg-grid-action>
}
$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