From af284fcc7c545c5076d02a32f9aab9479f17b3ed Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Tue, 19 Sep 2017 16:20:05 -0400 Subject: [PATCH] LP#1718036 Webstaff about page Adds a simple About page showing the EG server version number, accessed from the "hamburger" (log out) menu. Signed-off-by: Bill Erickson Signed-off-by: Kathy Lussier --- Open-ILS/src/templates/staff/navbar.tt2 | 6 ++++++ Open-ILS/src/templates/staff/t_about.tt2 | 26 ++++++++++++++++++++++++ Open-ILS/web/js/ui/default/staff/app.js | 25 ++++++++++++++++++++++- 3 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 Open-ILS/src/templates/staff/t_about.tt2 diff --git a/Open-ILS/src/templates/staff/navbar.tt2 b/Open-ILS/src/templates/staff/navbar.tt2 index 0482d991fb..a6a65ad58c 100644 --- a/Open-ILS/src/templates/staff/navbar.tt2 +++ b/Open-ILS/src/templates/staff/navbar.tt2 @@ -557,6 +557,12 @@ [% l('Log Out') %] +
  • + + + [% l('About') %] + +
  • diff --git a/Open-ILS/src/templates/staff/t_about.tt2 b/Open-ILS/src/templates/staff/t_about.tt2 new file mode 100644 index 0000000000..8fe52a5edc --- /dev/null +++ b/Open-ILS/src/templates/staff/t_about.tt2 @@ -0,0 +1,26 @@ +
    +
    + [% l('About Evergreen') %] +
    +
    + +
    +
    +
    +
    [% l('Server Details') %]
    +
    + +
    +
    [% l('Hostname') %]
    +
    {{context.server}}
    +
    +
    +
    +
    +
    + + + diff --git a/Open-ILS/web/js/ui/default/staff/app.js b/Open-ILS/web/js/ui/default/staff/app.js index f76c2786fd..167e238287 100644 --- a/Open-ILS/web/js/ui/default/staff/app.js +++ b/Open-ILS/web/js/ui/default/staff/app.js @@ -24,6 +24,12 @@ function($routeProvider , $locationProvider) { resolve : resolver }); + $routeProvider.when('/about', { + templateUrl: './t_about', + controller: 'AboutCtrl', + resolve : resolver + }); + // default page $routeProvider.otherwise({ templateUrl : './t_splash', @@ -155,5 +161,22 @@ function($routeProvider , $locationProvider) { '/eg/staff/cat/catalog/results?query=' + encodeURIComponent($scope.cat_query); } -}]); +}]) + +.controller('AboutCtrl', [ + '$scope','$location','egCore', + function($scope , $location , egCore) { + + $scope.context = { + server : $location.host() + }; + + egCore.net.request( + 'open-ils.actor','opensrf.open-ils.system.ils_version') + .then(function(version) { + $scope.context.version = version; + } + ); + +}]) -- 2.43.2