<div>
- <div class="btn-group">
+ <div ng-show="!only_vols" class="btn-group">
<label class="btn btn-default" ng-click="show_vols = !show_vols">
<span ng-show="show_vols" style="padding-right: 5px;">[% l('Hide Volume/Copy Details') %]</span>
<span ng-hide="show_vols" style="padding-right: 5px;">[% l('Show Volume/Copy Details') %]</span>
<div class="col-xs-1"><b>[% l('Prefix') %]</b></div>
<div class="col-xs-2"><b>[% l('Call Number') %]</b></div>
<div class="col-xs-1"><b>[% l('Suffix') %]</b></div>
- <div class="col-xs-1"><b>[% l('Copies') %]</b></div>
- <div class="col-xs-5">
+ <div class="col-xs-1" ng-hide="only_vols"><b>[% l('Copies') %]</b></div>
+ <div class="col-xs-5" ng-hide="only_vols">
<div class="row">
<div class="col-xs-5"><b>[% l('Barcode') %]</b></div>
<div class="col-xs-3"><b>[% l('Copy #') %]</b></div>
<div class="col-xs-4"><b>[% l('Part') %]</b></div>
</div>
</div>
+ <div class="col-xs-2" ng-show="only_vols">
+ <button class="btn btn-default center-block" ng-click="workingToComplete() && saveAndExit()" type="button">[% l('Save & Exit') %]</button>
+ </div>
</div>
</div>
</div> <!-- row -->
- <eg-vol-edit focus-next="focusNextFirst" ng-repeat="(lib,callnumbers) in data.tree | orderBy:lib track by lib" ng-init="ind = $index" record="record.id()" lib="{{lib}}" allcopies="data.copies" struct="data.tree[lib]"></eg-vol-edit>
+ <eg-vol-edit
+ focus-next="focusNextFirst"
+ ng-repeat="(lib,callnumbers) in data.tree | orderBy:lib track by lib"
+ ng-init="ind = $index"
+ record="record.id()"
+ only-vols="only_vols"
+ lib="{{lib}}"
+ allcopies="data.copies"
+ struct="data.tree[lib]">
+ </eg-vol-edit>
</div>
</div>
'<div class="col-xs-1">'+
'<select class="form-control" ng-model="suffix" ng-change="updateSuffix()" ng-options="s.label() for s in suffix_list track by idTracker(s)"/>'+
'</div>'+
- '<div class="col-xs-1"><input class="form-control" type="number" ng-model="copy_count" min="{{orig_copy_count}}" ng-change="changeCPCount()"></div>'+
- '<div class="col-xs-5">'+
+ '<div ng-hide="onlyVols" class="col-xs-1"><input class="form-control" type="number" ng-model="copy_count" min="{{orig_copy_count}}" ng-change="changeCPCount()"></div>'+
+ '<div ng-hide="onlyVols" class="col-xs-5">'+
'<eg-vol-copy-edit ng-repeat="cp in copies track by idTracker(cp)" focus-next="focusNextBarcode" copy="cp" call-number="callNumber"></eg-vol-copy-edit>'+
'</div>'+
'</div>',
- scope: {focusNext: "=", allcopies: "=", copies: "=" },
+ scope: {focusNext: "=", allcopies: "=", copies: "=", onlyVols: "=" },
controller : ['$scope','itemSvc','egCore',
function ( $scope , itemSvc , egCore ) {
$scope.callNumber = $scope.copies[0].call_number();
'<div class="col-xs-1"><eg-org-selector selected="owning_lib" disableTest="cant_have_vols"></eg-org-selector></div>'+
'<div class="col-xs-1"><input class="form-control" type="number" min="{{orig_cn_count}}" ng-model="cn_count" ng-change="changeCNCount()"/></div>'+
'<div class="col-xs-10">'+
- '<eg-vol-row '+
+ '<eg-vol-row only-vols="onlyVols"'+
'ng-repeat="(cn,copies) in struct | orderBy:cn track by cn" '+
'focus-next="focusNextFirst" copies="copies" allcopies="allcopies">'+
'</eg-vol-row>'+
'</div>'+
'</div>',
- scope: { focusNext: "=", allcopies: "=", struct: "=", lib: "@", record: "@" },
+ scope: { focusNext: "=", allcopies: "=", struct: "=", lib: "@", record: "@", onlyVols: "=" },
controller : ['$scope','itemSvc','egCore',
function ( $scope , itemSvc , egCore ) {
$scope.first_cn = Object.keys($scope.struct)[0];
}
);
+ $scope.only_vols = false;
$scope.show_vols = true;
$scope.show_copies = true;
$scope.completed_copies = $scope.completed_copies.concat(itemSvc.copies.splice(i,1));
});
});
+
+ return true;
}
$scope.completeToWorking = function () {
itemSvc.copies = itemSvc.copies.concat($scope.completed_copies.splice(i,1));
});
});
+
+ return true;
}
createSimpleUpdateWatcher = function (field) {
if (data) {
if (data.hide_vols && !$scope.defaults.always_vols) $scope.show_vols = false;
- if (data.hide_copies) $scope.show_copies = false;
+ if (data.hide_copies) {
+ $scope.show_copies = false;
+ $scope.only_vols = true;
+ }
$scope.record_id = data.record_id;