From ff8c9540828fbf847ef22dee9ff0c147d2f0187e Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Sat, 25 Jul 2015 14:10:37 -0400 Subject: [PATCH] webstaff: browser client local admin re-org; adding new links Signed-off-by: Bill Erickson Signed-off-by: Galen Charlton Signed-off-by: Kathy Lussier --- Open-ILS/src/templates/staff/admin/actor/index.tt2 | 14 ---- .../staff/admin/actor/t_address_alert.tt2 | 1 - Open-ILS/src/templates/staff/admin/circ/index.tt2 | 15 ---- .../templates/staff/admin/circ/t_age_to_lost.tt2 | 80 -------------------- Open-ILS/src/templates/staff/admin/local_admin.tt2 | 43 ----------- Open-ILS/src/templates/staff/navbar.tt2 | 2 +- .../web/js/ui/default/staff/admin/actor/app.js | 2 - Open-ILS/web/js/ui/default/staff/admin/circ/app.js | 86 ---------------------- Open-ILS/web/js/ui/default/staff/services/ui.js | 26 +++++-- 9 files changed, 19 insertions(+), 250 deletions(-) delete mode 100644 Open-ILS/src/templates/staff/admin/actor/index.tt2 delete mode 100644 Open-ILS/src/templates/staff/admin/actor/t_address_alert.tt2 delete mode 100644 Open-ILS/src/templates/staff/admin/circ/index.tt2 delete mode 100644 Open-ILS/src/templates/staff/admin/circ/t_age_to_lost.tt2 delete mode 100644 Open-ILS/src/templates/staff/admin/local_admin.tt2 delete mode 100644 Open-ILS/web/js/ui/default/staff/admin/circ/app.js diff --git a/Open-ILS/src/templates/staff/admin/actor/index.tt2 b/Open-ILS/src/templates/staff/admin/actor/index.tt2 deleted file mode 100644 index 5a3ba07458..0000000000 --- a/Open-ILS/src/templates/staff/admin/actor/index.tt2 +++ /dev/null @@ -1,14 +0,0 @@ -[% - WRAPPER "staff/base.tt2"; - ctx.page_title = l("Evergreen Configuration"); - ctx.page_app = "egAdminActor"; -%] - -[% BLOCK APP_JS %] - - -[% END %] - -
- -[% END %] diff --git a/Open-ILS/src/templates/staff/admin/actor/t_address_alert.tt2 b/Open-ILS/src/templates/staff/admin/actor/t_address_alert.tt2 deleted file mode 100644 index c84c9e24aa..0000000000 --- a/Open-ILS/src/templates/staff/admin/actor/t_address_alert.tt2 +++ /dev/null @@ -1 +0,0 @@ - diff --git a/Open-ILS/src/templates/staff/admin/circ/index.tt2 b/Open-ILS/src/templates/staff/admin/circ/index.tt2 deleted file mode 100644 index 50c52b824f..0000000000 --- a/Open-ILS/src/templates/staff/admin/circ/index.tt2 +++ /dev/null @@ -1,15 +0,0 @@ -[% - WRAPPER "staff/base.tt2"; - ctx.page_title = l("Evergreen Configuration"); - ctx.page_app = "egAdminCirc"; -%] - -[% BLOCK APP_JS %] - - - -[% END %] - -
- -[% END %] diff --git a/Open-ILS/src/templates/staff/admin/circ/t_age_to_lost.tt2 b/Open-ILS/src/templates/staff/admin/circ/t_age_to_lost.tt2 deleted file mode 100644 index c1e28dda69..0000000000 --- a/Open-ILS/src/templates/staff/admin/circ/t_age_to_lost.tt2 +++ /dev/null @@ -1,80 +0,0 @@ -
-
- [% l('Age Circulations to Lost') %] -
-
- - -[% | l %] -Choose the user profile and circulation library for the overdue circulations -you wish to age to a Lost status. Note the descendants of these values -(sub-groups, sub-libraries) will also be affected. -[% END %] - - -
-
-
- -
- - -
-
-
- - -
-
- - -
-
-
- -
-
- -
-
-
-
- [% l('Processing...') %] -
-
-
- -
-
-
- [% l('Chunks Processed: [_1]', '{{chunks_processed}}') %]
-
- [% l('Events Created: [_1]', '{{events_created}}') %]
-
- - -
-
-
- -
-
- - - - - - diff --git a/Open-ILS/src/templates/staff/admin/local_admin.tt2 b/Open-ILS/src/templates/staff/admin/local_admin.tt2 deleted file mode 100644 index ed0590eba0..0000000000 --- a/Open-ILS/src/templates/staff/admin/local_admin.tt2 +++ /dev/null @@ -1,43 +0,0 @@ -[% - WRAPPER "staff/base.tt2"; - ctx.page_title = l("Local Administration"); - ctx.page_app = "egLocalAdmin"; -%] - -[% BLOCK APP_JS %] - - -[% END %] - -
-
- [% l('Local Administration') %] -
-
- - - - -[% END %] diff --git a/Open-ILS/src/templates/staff/navbar.tt2 b/Open-ILS/src/templates/staff/navbar.tt2 index afe2c9cc6b..28d8fd9a67 100644 --- a/Open-ILS/src/templates/staff/navbar.tt2 +++ b/Open-ILS/src/templates/staff/navbar.tt2 @@ -282,7 +282,7 @@
  • - + [% l('Local Administration') %] diff --git a/Open-ILS/web/js/ui/default/staff/admin/actor/app.js b/Open-ILS/web/js/ui/default/staff/admin/actor/app.js index 94ac8e5114..8fc04d14ae 100644 --- a/Open-ILS/web/js/ui/default/staff/admin/actor/app.js +++ b/Open-ILS/web/js/ui/default/staff/admin/actor/app.js @@ -34,8 +34,6 @@ angular.module('egAdminActor', ['$scope','$routeParams','$window','$location','egCore', function($scope , $routeParams , $window , $location , egCore) { - console.log('addr alert'); - $scope.funcs = { ses : egCore.auth.token(), } diff --git a/Open-ILS/web/js/ui/default/staff/admin/circ/app.js b/Open-ILS/web/js/ui/default/staff/admin/circ/app.js deleted file mode 100644 index 24d3aadaa4..0000000000 --- a/Open-ILS/web/js/ui/default/staff/admin/circ/app.js +++ /dev/null @@ -1,86 +0,0 @@ -/** - * App to drive the base page. - * Login Form - * Splash Page - */ - -angular.module('egAdminCirc', - ['ngRoute', 'ui.bootstrap', 'egCoreMod','egUiMod']) - -.config(['$routeProvider','$locationProvider','$compileProvider', - function($routeProvider , $locationProvider , $compileProvider) { - - $locationProvider.html5Mode(true); - $compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|blob):/); - var resolver = {delay : function(egStartup) {return egStartup.go()}}; - - $routeProvider.when('/admin/circ/age_to_lost', { - templateUrl: './admin/circ/t_age_to_lost', - controller: 'AgeToLostCtl', - resolve : resolver - }); - - // default page - /* - $routeProvider.otherwise({ - templateUrl : 'user-perms-template', - controller: 'UserPermsCtrl', - resolve : resolver - }); - */ -}]) - -.controller('AgeToLostCtl', - ['$scope','egCore', -function($scope , egCore) { - $scope.i_am_sure = false; - $scope.chunks_processed = 0; - $scope.events_created = 0; - - egCore.pcrud.search('pgt', {parent : null}, - {flesh : -1, flesh_fields : {pgt : ['children']}} - ).then( - function(tree) { - egCore.env.absorbTree(tree, 'pgt') - $scope.profiles = egCore.env.pgt.list; - $scope.selected_profile = tree; - } - ); - - $scope.set_profile = function(g) {$scope.selected_profile = g} - - // determine the tree depth of the profile group - $scope.pgt_depth = function(grp) { - var d = 0; - while (grp = egCore.env.pgt.map[grp.parent()]) d++; - return d; - } - - $scope.age_to_lost = function() { - $scope.in_progress = true; - $scope.i_am_sure = false; // reset - $scope.all_done = false; - - egCore.net.request( - 'open-ils.circ', - 'open-ils.circ.circulation.age_to_lost', - egCore.auth.token(), { - user_profile : $scope.selected_profile.id(), - circ_lib : $scope.context_org.id() - } - ).then( - function() { - $scope.in_progress = false; - $scope.all_done = true; - }, - null, // on-error - function(response) { - if (!response) return; - if (response.progress) - $scope.chunks_processed = response.progress; - if (response.created) - $scope.events_created = response.created; - } - ); - } -}]) diff --git a/Open-ILS/web/js/ui/default/staff/services/ui.js b/Open-ILS/web/js/ui/default/staff/services/ui.js index d52382cfb6..f5ce418224 100644 --- a/Open-ILS/web/js/ui/default/staff/services/ui.js +++ b/Open-ILS/web/js/ui/default/staff/services/ui.js @@ -314,8 +314,8 @@ function($modal, $interpolate) { + '' + '', - controller : ['$scope','$timeout','egOrg','egAuth','egCore', - function($scope , $timeout , egOrg , egAuth , egCore) { + controller : ['$scope','$timeout','egOrg','egAuth','egCore','egStartup', + function($scope , $timeout , egOrg , egAuth , egCore , egStartup) { if ($scope.alldisabled) { $scope.disable_button = $scope.alldisabled == 'true' ? true : false; @@ -329,12 +329,22 @@ function($modal, $interpolate) { // avoid linking the full fleshed tree to the scope by // tossing in a flattened list. - $scope.orgList = egOrg.list().map(function(org) { - return { - id : org.id(), - shortname : org.shortname(), - depth : org.ou_type().depth() - } + // -- + // Run-time code referencing post-start data should be run + // from within a startup block, otherwise accessing this + // module before startup completes will lead to failure. + egStartup.go().then(function() { + + $scope.orgList = egOrg.list().map(function(org) { + return { + id : org.id(), + shortname : org.shortname(), + depth : org.ou_type().depth() + } + }); + + if (!$scope.selected) + $scope.selected = egOrg.get(egAuth.user().ws_ou()); }); $scope.getSelectedName = function() { -- 2.11.0