From: Bill Erickson Date: Mon, 4 Nov 2013 14:36:32 +0000 (-0500) Subject: side-porting web staff template/sidebar improvements X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=78f25b106fa490c8a0e87898745cd75851d7e8d0;p=evergreen%2Fequinox.git side-porting web staff template/sidebar improvements Signed-off-by: Bill Erickson --- diff --git a/Open-ILS/src/templates/staff/index.tt2 b/Open-ILS/src/templates/staff/index.tt2 index c13c0ced4c..e543d1addd 100644 --- a/Open-ILS/src/templates/staff/index.tt2 +++ b/Open-ILS/src/templates/staff/index.tt2 @@ -1,25 +1,14 @@ - - - - [% l('Evergreen Staff') %] - - - - - - - - [% - # load the navbar server-side to speed up initial page display - INCLUDE "staff/t_navbar.tt2"; - %] +[% + WRAPPER "staff/t_base.tt2"; + ctx.page_title = l("Home"); + ctx.page_app = "egHome"; +%] - -
- - [% INCLUDE "staff/t_base_js.tt2" %] +[% BLOCK APP_JS %] + +[% END %] + +
+ +[% END %] - - - - diff --git a/Open-ILS/src/templates/staff/t_base_js.tt2 b/Open-ILS/src/templates/staff/t_base_js.tt2 index 1080058fd3..09c129e220 100644 --- a/Open-ILS/src/templates/staff/t_base_js.tt2 +++ b/Open-ILS/src/templates/staff/t_base_js.tt2 @@ -30,3 +30,5 @@ + + diff --git a/Open-ILS/src/templates/staff/t_navbar.tt2 b/Open-ILS/src/templates/staff/t_navbar.tt2 index 7ef2aca06a..ccde98451d 100644 --- a/Open-ILS/src/templates/staff/t_navbar.tt2 +++ b/Open-ILS/src/templates/staff/t_navbar.tt2 @@ -1,39 +1,48 @@ + + diff --git a/Open-ILS/src/templates/staff/t_splash.tt2 b/Open-ILS/src/templates/staff/t_splash.tt2 index 113c55f7a1..b1e3e193a9 100644 --- a/Open-ILS/src/templates/staff/t_splash.tt2 +++ b/Open-ILS/src/templates/staff/t_splash.tt2 @@ -29,7 +29,7 @@ @@ -43,7 +43,7 @@ diff --git a/Open-ILS/web/js/ui/default/staff/navbar.js b/Open-ILS/web/js/ui/default/staff/navbar.js index 48de8f267e..09983ac024 100644 --- a/Open-ILS/web/js/ui/default/staff/navbar.js +++ b/Open-ILS/web/js/ui/default/staff/navbar.js @@ -1,7 +1,7 @@ /** * Free-floating controller which can be used by any app. */ -function NavCtrl($scope, egStartup, egAuth) { +function NavCtrl($scope, egStartup, egAuth, egEnv) { $scope.logout = function() { egAuth.logout(); @@ -30,10 +30,15 @@ function NavCtrl($scope, egStartup, egAuth) { if (!egAuth.user()) return; $scope.username = egAuth.user().usrname(); - // TODO: add workstation + + // TODO: move workstation into egAuth + if (egEnv.aws) { + $scope.workstation = + egEnv.aws.map[egAuth.user().wsid()].name(); + } } ); } // minify-safe dependency injection -NavCtrl.$inject = ['$scope', 'egStartup', 'egAuth']; +NavCtrl.$inject = ['$scope', 'egStartup', 'egAuth', 'egEnv'];