LP#1718036 Webstaff about page
authorBill Erickson <berickxx@gmail.com>
Tue, 19 Sep 2017 20:20:05 +0000 (16:20 -0400)
committerBill Erickson <berickxx@gmail.com>
Wed, 27 Sep 2017 16:15:03 +0000 (12:15 -0400)
Adds a simple About page showing the EG server version number, accessed
from the "hamburger" (log out) menu.

Signed-off-by: Bill Erickson <berickxx@gmail.com>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Open-ILS/src/templates/staff/navbar.tt2
Open-ILS/src/templates/staff/t_about.tt2 [new file with mode: 0644]
Open-ILS/web/js/ui/default/staff/app.js

index 0482d99..a6a65ad 100644 (file)
               [% l('Log Out') %]
             </a>
           </li>
+          <li>
+            <a href="./about" target="_self">
+              <span class="glyphicon glyphicon-question-sign"></span>
+              [% l('About') %]
+            </a>
+          </li>
           <li class="divider"></li>
           <li class="disabled">
             <a href disabled="disabled">
diff --git a/Open-ILS/src/templates/staff/t_about.tt2 b/Open-ILS/src/templates/staff/t_about.tt2
new file mode 100644 (file)
index 0000000..8fe52a5
--- /dev/null
@@ -0,0 +1,26 @@
+<div class="container-fluid text-center">
+  <div class="alert alert-info alert-less-pad strong-text-2">
+    <span>[% l('About Evergreen') %]</span>
+  </div>
+</div>
+
+<div class="row">
+  <div class="col-md-4">
+    <div class="panel panel-default">
+      <div class="panel-heading">[% l('Server Details') %]</div>
+      <div class="panel-body">
+        <div class="row pad-vert nav-pills-like-tabs">
+          <div class="col-md-6">[% l('Evergreen Version') %]</div>
+          <div class="col-md-6">{{context.version}}</div>
+        </div>
+        <div class="row pad-vert">
+          <div class="col-md-6">[% l('Hostname') %]</div>
+          <div class="col-md-6">{{context.server}}</div>
+        </div>
+      </div>
+    </div><!--panel-->
+  </div>
+</div>
+
+
+
index f76c278..167e238 100644 (file)
@@ -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;
+        }
+    );
+
+}])