<eg-grid-action handler="grid_actions.show_recent_circs"
label="[% l('Show Last Few Circulations') %]"></eg-grid-action>
+ <eg-grid-action handler="grid_actions.show_patrons"
+ label="[% l('Retrieve Patron') %]"></eg-grid-action>
<eg-grid-action divider="true"></eg-grid-action>
<eg-grid-action handler="grid_actions.set_copy_quality"
label="[% l('Set Desired Copy Quality') %]"></eg-grid-action>
<eg-grid-action handler="grid_actions.show_recent_circs"
label="[% l('Show Last Few Circulations') %]"></eg-grid-action>
+ <eg-grid-action handler="grid_actions.show_patrons"
+ label="[% l('Retrieve Patron') %]"></eg-grid-action>
<eg-grid-action divider="true"></eg-grid-action>
<eg-grid-action handler="grid_actions.set_copy_quality"
label="[% l('Set Desired Copy Quality') %]"></eg-grid-action>
<eg-grid-action handler="grid_actions.show_recent_circs"
label="[% l('Show Last Few Circulations') %]"></eg-grid-action>
+ <eg-grid-action handler="grid_actions.show_patrons"
+ label="[% l('Retrieve Patron') %]"></eg-grid-action>
<eg-grid-action divider="true"></eg-grid-action>
<eg-grid-action handler="grid_actions.set_copy_quality"
label="[% l('Set Desired Copy Quality') %]"></eg-grid-action>
<eg-grid-action handler="grid_actions.show_recent_circs"
label="[% l('Show Last Few Circulations') %]"></eg-grid-action>
+ <eg-grid-action handler="grid_actions.show_holds_for_title"
+ label="[% l('Show Holds for Title') %]"></eg-grid-action>
<eg-grid-action divider="true"></eg-grid-action>
<eg-grid-action handler="grid_actions.set_copy_quality"
label="[% l('Set Desired Copy Quality') %]"></eg-grid-action>
label="[% l('Check In') %]"></eg-grid-action>
<eg-grid-action handler="add_billing"
label="[% l('Add Billing') %]"></eg-grid-action>
+ <eg-grid-action handler="show_recent_circs"
+ label="[% l('Show Last Few Circulations') %]"></eg-grid-action>
+ <eg-grid-action handler="show_triggered_events"
+ label="[% l('Show Triggered Events') %]"></eg-grid-action>
<eg-grid-field label="[% l('Circ ID') %]" path='id'></eg-grid-field>
<eg-grid-field label="[% l('Barcode') %]" path='target_copy.barcode'>
angular.module('egPatronApp')
.controller('PatronItemsOutCtrl',
- ['$scope','$q','$routeParams','egCore','egUser','patronSvc',
- 'egGridDataProvider','$modal','egCirc','egConfirmDialog','egBilling',
-function($scope, $q, $routeParams, egCore , egUser, patronSvc ,
- egGridDataProvider , $modal , egCirc , egConfirmDialog , egBilling) {
+ ['$scope','$q','$routeParams','$timeout','egCore','egUser','patronSvc','$location',
+ 'egGridDataProvider','$modal','egCirc','egConfirmDialog','egBilling','$window',
+function($scope, $q, $routeParams, $timeout, egCore , egUser, patronSvc , $location,
+ egGridDataProvider , $modal , egCirc , egConfirmDialog , egBilling , $window) {
// list of noncatatloged circulations. Define before initTab to
// avoid any possibility of race condition, since they are loaded
batch_action_with_barcodes(items, egCirc.mark_claims_never_checked_out);
}
+ $scope.show_recent_circs = function(items) {
+ var focus = items.length == 1;
+ angular.forEach(items, function(item) {
+ var url = egCore.env.basePath +
+ '/cat/item/' +
+ item.target_copy().id() +
+ '/circ_list';
+ $timeout(function() { var x = $window.open(url, '_blank'); if (focus) x.focus() });
+ });
+ }
+
+ $scope.show_triggered_events = function(items) {
+ var focus = items.length == 1;
+ angular.forEach(items, function(item) {
+ var url = egCore.env.basePath +
+ '/cat/item/' +
+ item.target_copy().id() +
+ '/triggered_events';
+ $timeout(function() { var x = $window.open(url, '_blank'); if (focus) x.focus() });
+ });
+ }
+
$scope.renew = function(items, msg) {
if (!items.length) return;
var barcodes = items.map(function(circ)
* most actionis are performed.
*/
.factory('egHoldGridActions',
- ['$window','$location','egCore','egHolds','egCirc',
-function($window , $location , egCore , egHolds , egCirc) {
+ ['$window','$location','$timeout','egCore','egHolds','egCirc',
+function($window , $location , $timeout , egCore , egHolds , egCirc) {
var service = {};
// jump to circ list for either 1) the targeted copy or
// 2) the hold target copy for copy-level holds
service.show_recent_circs = function(items) {
- if (items.length && (copy = items[0].copy)) {
- var url = $location.path(
- '/cat/item/' + copy.id() + '/circ_list').absUrl();
- $window.open(url, '_blank').focus();
- }
+ var focus = items.length == 1;
+ angular.forEach(items, function(item) {
+ if (item.copy) {
+ var url = egCore.env.basePath +
+ '/cat/item/' +
+ item.copy.id() +
+ '/circ_list';
+ $timeout(function() { var x = $window.open(url, '_blank'); if (focus) x.focus() });
+ }
+ });
+ }
+
+ service.show_patrons = function(items) {
+ var focus = items.length == 1;
+ angular.forEach(items, function(item) {
+ var url = egCore.env.basePath +
+ 'circ/patron/' +
+ item.hold.usr().id() +
+ '/holds';
+ $timeout(function() { var x = $window.open(url, '_blank'); if (focus) x.focus() });
+ });
}
+ service.show_holds_for_title = function(items) {
+ var focus = items.length == 1;
+ angular.forEach(items, function(item) {
+ var url = egCore.env.basePath +
+ 'cat/catalog/record/' +
+ item.mvr.doc_id() +
+ '/holds';
+ $timeout(function() { var x = $window.open(url, '_blank'); if (focus) x.focus() });
+ });
+ }
+
+
function generic_update(items, action) {
if (!items.length) return $q.when();
var hold_ids = items.map(function(item) {return item.hold.id()});