LP1811156 Activate Angular server admin page
authorBill Erickson <berickxx@gmail.com>
Wed, 9 Jan 2019 22:13:43 +0000 (17:13 -0500)
committerMike Rylander <mrylander@gmail.com>
Wed, 13 Feb 2019 16:56:58 +0000 (11:56 -0500)
Point Admin -> Server Admin from AngJS and Angular navbars to the
Angular version of the server admin splash page.

Includes Angular auto-admin page sanity check for cases where a route
has no extra data.

Signed-off-by: Bill Erickson <berickxx@gmail.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Open-ILS/src/eg2/src/app/staff/admin/basic-admin-page.component.ts
Open-ILS/src/eg2/src/app/staff/nav.component.html
Open-ILS/src/templates/staff/navbar.tt2

index 84219f1..d47d92a 100644 (file)
@@ -55,7 +55,9 @@ export class BasicAdminPageComponent implements OnInit {
         }
 
         // Pass the readonlyFields param if available
-        if (this.route.snapshot.data[0].readonlyFields) {
+        if (this.route.snapshot.data &&
+            this.route.snapshot.data.length &&
+            this.route.snapshot.data[0].readonlyFields) {
             this.readonlyFields = this.route.snapshot.data[0].readonlyFields;
         }
 
index 7c30c00..b43d8e7 100644 (file)
             <span class="material-icons">person</span>
             <span i18n>User Permission Editor</span>
           </a>
-          <!-- Angular version
           <a class="dropdown-item"
               routerLink="/staff/admin/server/splash">
             <span class="material-icons">account_balance</span>
             <span i18n>Server Administration</span>
           </a>
-          -->
-          <a class="dropdown-item" href="/eg/staff/admin/server/index">
-            <span class="material-icons">account_balance</span>
-            <span i18n>Server Administration</span>
-          </a>
           <a class="dropdown-item" href="/eg/staff/admin/local/index">
             <span class="material-icons">landscape</span>
             <span i18n>Local Administration</span>
index 1ca59d5..ee48e6b 100644 (file)
             </a>
           </li>
           <li>
-            <a href="./admin/server/index" target="_self">
+            <a href="/eg2/staff/admin/server/splash">
               <span class="glyphicon glyphicon-briefcase"></span>
               [% l('Server Administration') %]
             </a>