From 131e62b25f09e94851c77c18315aaee6f30d2adf Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Tue, 22 Jul 2014 14:51:55 -0400 Subject: [PATCH] patron / item triggered events Signed-off-by: Bill Erickson --- Open-ILS/src/templates/staff/cat/item/index.tt2 | 6 ++++-- .../staff/cat/item/t_triggered_events_pane.tt2 | 2 ++ Open-ILS/src/templates/staff/cat/item/t_view.tt2 | 3 +++ .../staff/cat/t_triggered_events_pane.tt2 | 2 ++ Open-ILS/src/templates/staff/circ/patron/index.tt2 | 5 +++++ .../src/templates/staff/circ/patron/t_summary.tt2 | 1 + .../staff/circ/patron/t_triggered_events.tt2 | 3 +++ Open-ILS/web/js/ui/default/staff/cat/item/app.js | 17 ++++++++++++++- .../web/js/ui/default/staff/circ/patron/app.js | 25 +++++++++++++++++----- 9 files changed, 56 insertions(+), 8 deletions(-) create mode 100644 Open-ILS/src/templates/staff/cat/item/t_triggered_events_pane.tt2 create mode 100644 Open-ILS/src/templates/staff/cat/t_triggered_events_pane.tt2 create mode 100644 Open-ILS/src/templates/staff/circ/patron/t_triggered_events.tt2 diff --git a/Open-ILS/src/templates/staff/cat/item/index.tt2 b/Open-ILS/src/templates/staff/cat/item/index.tt2 index 62664af4ee..2232a7d584 100644 --- a/Open-ILS/src/templates/staff/cat/item/index.tt2 +++ b/Open-ILS/src/templates/staff/cat/item/index.tt2 @@ -9,6 +9,7 @@ + @@ -54,14 +55,15 @@ [% l('List View') %] + + + --> diff --git a/Open-ILS/src/templates/staff/cat/item/t_triggered_events_pane.tt2 b/Open-ILS/src/templates/staff/cat/item/t_triggered_events_pane.tt2 new file mode 100644 index 0000000000..1e320739f8 --- /dev/null +++ b/Open-ILS/src/templates/staff/cat/item/t_triggered_events_pane.tt2 @@ -0,0 +1,2 @@ + + diff --git a/Open-ILS/src/templates/staff/cat/item/t_view.tt2 b/Open-ILS/src/templates/staff/cat/item/t_view.tt2 index bbe29939f0..82920b4324 100644 --- a/Open-ILS/src/templates/staff/cat/item/t_view.tt2 +++ b/Open-ILS/src/templates/staff/cat/item/t_view.tt2 @@ -20,6 +20,9 @@
  • [% l('Cataloging Info') %]
  • +
  • + [% l('Triggered Events') %] +
  • diff --git a/Open-ILS/src/templates/staff/cat/t_triggered_events_pane.tt2 b/Open-ILS/src/templates/staff/cat/t_triggered_events_pane.tt2 new file mode 100644 index 0000000000..1e320739f8 --- /dev/null +++ b/Open-ILS/src/templates/staff/cat/t_triggered_events_pane.tt2 @@ -0,0 +1,2 @@ + + diff --git a/Open-ILS/src/templates/staff/circ/patron/index.tt2 b/Open-ILS/src/templates/staff/circ/patron/index.tt2 index 257462f176..9f08139333 100644 --- a/Open-ILS/src/templates/staff/circ/patron/index.tt2 +++ b/Open-ILS/src/templates/staff/circ/patron/index.tt2 @@ -126,6 +126,11 @@ angular.module('egCoreMod').run(['egStrings', function(s) {
  • + + [% l('Triggered Events / Notifications') %] + +
  • +
  • [% l('Statistical Categories') %] diff --git a/Open-ILS/src/templates/staff/circ/patron/t_summary.tt2 b/Open-ILS/src/templates/staff/circ/patron/t_summary.tt2 index 85acb8f0ad..1f09c7704a 100644 --- a/Open-ILS/src/templates/staff/circ/patron/t_summary.tt2 +++ b/Open-ILS/src/templates/staff/circ/patron/t_summary.tt2 @@ -50,6 +50,7 @@
  • [% l('Group Fines') %]
    diff --git a/Open-ILS/src/templates/staff/circ/patron/t_triggered_events.tt2 b/Open-ILS/src/templates/staff/circ/patron/t_triggered_events.tt2 new file mode 100644 index 0000000000..fe5091fde6 --- /dev/null +++ b/Open-ILS/src/templates/staff/circ/patron/t_triggered_events.tt2 @@ -0,0 +1,3 @@ + + + diff --git a/Open-ILS/web/js/ui/default/staff/cat/item/app.js b/Open-ILS/web/js/ui/default/staff/cat/item/app.js index 71d45cd693..82ed92380d 100644 --- a/Open-ILS/web/js/ui/default/staff/cat/item/app.js +++ b/Open-ILS/web/js/ui/default/staff/cat/item/app.js @@ -198,6 +198,12 @@ function($scope , $q , $location , $timeout , egCore , egGridDataProvider , item $location.path('/cat/item/' + item.id); } + $scope.context.show_triggered_events = function() { + var item = copyGrid.selectedItems()[0]; + if (item) + $location.path('/cat/item/' + item.id + '/triggered_events'); + } + }]) /** @@ -508,6 +514,12 @@ function($scope , $q , $location , $routeParams , egCore , itemSvc , egBilling) loadHolds() loadTransits(); break; + + case 'triggered_events': + var url = $location.absUrl().replace(/\/staff.*/, '/actor/user/event_log'); + url += '?copy_id=' + encodeURIComponent(copyId); + $scope.triggered_events_url = url; + $scope.funcs = {}; } } @@ -520,6 +532,9 @@ function($scope , $q , $location , $routeParams , egCore , itemSvc , egBilling) loadCopy(args.barcode).then(loadTabData); } + $scope.context.show_triggered_events = function() { + $location.path('/cat/item/' + copyId + '/triggered_events'); + } + loadCopy().then(loadTabData); }]) - diff --git a/Open-ILS/web/js/ui/default/staff/circ/patron/app.js b/Open-ILS/web/js/ui/default/staff/circ/patron/app.js index 275ccfc880..2291c0c619 100644 --- a/Open-ILS/web/js/ui/default/staff/circ/patron/app.js +++ b/Open-ILS/web/js/ui/default/staff/circ/patron/app.js @@ -174,6 +174,12 @@ angular.module('egPatronApp', ['ngRoute', 'ui.bootstrap', resolve : resolver }); + $routeProvider.when('/circ/patron/:id/triggered_events', { + templateUrl: './circ/patron/t_triggered_events', + controller: 'PatronTriggeredEventsCtrl', + resolve : resolver + }); + $routeProvider.when('/circ/patron/:id/group', { templateUrl: './circ/patron/t_group', controller: 'PatronGroupCtrl', @@ -1123,10 +1129,7 @@ function($scope, $routeParams, $location , egCore , patronSvc) { $scope.initTab('edit', $routeParams.id); var url = $location.absUrl().replace(/\/staff.*/, '/actor/user/register'); - - // since we don't store auth cookies, pass the ses via URL - url += '?ses=' + egCore.auth.token(); - url += '&usr=' + encodeURIComponent($routeParams.id); + url += '?usr=' + encodeURIComponent($routeParams.id); $scope.funcs = { on_save : function() { @@ -1481,4 +1484,16 @@ function($scope , $location , egCore) { $scope.no_last = true; }]) - + +.controller('PatronTriggeredEventsCtrl', + ['$scope','$routeParams','$location','egCore','patronSvc', +function($scope, $routeParams, $location , egCore , patronSvc) { + $scope.initTab('other', $routeParams.id); + + var url = $location.absUrl().replace(/\/staff.*/, '/actor/user/event_log'); + url += '?patron_id=' + encodeURIComponent($routeParams.id); + + $scope.triggered_events_url = url; + $scope.funcs = {}; +}]) + -- 2.11.0