persist-key="{{grid_persist_key}}"
dateformat="{{$root.egDateAndTimeFormat}}">
- <eg-grid-action handler="add_copies_to_bucket"
- label="[% l('Add Items to Bucket') %]">
+ <eg-grid-action handler="add_copies_to_bucket" label="[% l('Add Items to Bucket') %]">
</eg-grid-action>
<eg-grid-action
handler="fetchLastCircPatron"
handler="abortTransit"
label="[% l('Cancel Transits') %]">
</eg-grid-action>
+ <!-- Show Group -->
+ <eg-grid-action handler="showBibHolds" group="[% l('Show') %]"
+ label="[% l('Record Holds') %]">
+ </eg-grid-action>
+ <eg-grid-action handler="showLastCircs" group="[% l('Show') %]"
+ label="[% l('Last Few Circs') %]">
+ </eg-grid-action>
+
+ <!-- Edit Group -->
+ <eg-grid-action handler="selectedHoldingsVolCopyEdit" group="[% l('Edit') %]"
+ label="[% l('Volumes and Items') %]">
+ </eg-grid-action>
<eg-grid-field label="[% l('Alert Msg') %]"
path="acp.alert_message"></eg-grid-field>
angular.module('egCheckinApp', ['ngRoute', 'ui.bootstrap',
- 'egCoreMod', 'egUiMod', 'egGridMod', 'egUserMod'])
+ 'egCoreMod', 'egUiMod', 'egGridMod', 'egUserMod', 'egItemStatus'])
.config(function($routeProvider, $locationProvider, $compileProvider) {
$locationProvider.html5Mode(true);
* Manages checkin
*/
.controller('CheckinCtrl',
- ['$scope','$q','$window','$location','egCore','checkinSvc','egGridDataProvider','egCirc', 'itemSvc',
-function($scope , $q , $window , $location , egCore , checkinSvc , egGridDataProvider , egCirc, itemSvc) {
+ ['$scope','$q','$window','$location', '$timeout','egCore','checkinSvc','egGridDataProvider','egCirc', 'itemSvc',
+function($scope , $q , $window , $location , $timeout , egCore , checkinSvc , egGridDataProvider , egCirc, itemSvc) {
$scope.focusMe = true;
$scope.checkins = checkinSvc.checkins;
itemSvc.add_copies_to_bucket(itemsIds);
}
+ $scope.showBibHolds = function(items){
+ var recordIds = [];
+ angular.forEach(items, function(i){
+ recordIds.push(i.acn.record());
+ });
+ angular.forEach(recordIds, function (r) {
+ var url = egCore.env.basePath + 'cat/catalog/record/' + r + '/holds';
+ $timeout(function() { $window.open(url, '_blank') });
+ });
+ }
+
+ $scope.showLastCircs = function(items){
+ var itemIds = [];
+ angular.forEach(items, function(cp){
+ itemIds.push(cp.acp.id());
+ });
+ angular.forEach(itemIds, function (id) {
+ var url = egCore.env.basePath + 'cat/item/' + id + '/circs';
+ $timeout(function() { $window.open(url, '_blank') });
+ });
+ }
+
+ $scope.selectedHoldingsVolCopyEdit = function (items) {
+ var itemObjs = [];
+ angular.forEach(items, function(i){
+ var h = egCore.idl.toHash(i);
+ h['call_number.record.id'] = h.record.doc_id;
+ itemObjs.push(h);
+ });
+ itemSvc.spawnHoldingsEdit(itemObjs,false,false);
+ }
}])