LP#1772680: add admin interfaces for the RBDigital integration tables
authorGalen Charlton <gmc@equinoxinitiative.org>
Wed, 23 Jan 2019 01:50:01 +0000 (20:50 -0500)
committerGalen Charlton <gmc@equinoxinitiative.org>
Wed, 23 Jan 2019 01:55:55 +0000 (20:55 -0500)
The database tables used by the RBDigital interface now have
standard Angular administration interfaces. These can be reached
from a new item on the web staff Adminstration menu, "Extras Administration"

Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Open-ILS/src/eg2/src/app/staff/admin/basic-admin-page.component.ts
Open-ILS/src/eg2/src/app/staff/admin/extra/admin-extra-splash.component.html [new file with mode: 0644]
Open-ILS/src/eg2/src/app/staff/admin/extra/admin-extra-splash.component.ts [new file with mode: 0644]
Open-ILS/src/eg2/src/app/staff/admin/extra/admin-extra.module.ts [new file with mode: 0644]
Open-ILS/src/eg2/src/app/staff/admin/extra/routing.module.ts [new file with mode: 0644]
Open-ILS/src/eg2/src/app/staff/admin/routing.module.ts
Open-ILS/src/eg2/src/app/staff/nav.component.html
Open-ILS/src/templates/staff/navbar.tt2

index 0d6be84..613fb1a 100644 (file)
@@ -38,9 +38,9 @@ export class BasicAdminPageComponent implements OnInit {
         // Set the prefix to "server", "local", "workstation",
         // extracted from the URL path.
         this.persistKeyPfx = this.route.snapshot.parent.url[0].path;
-        if (this.persistKeyPfx === 'acq') {
-            // ACQ is a special case, becaus unlike 'server', 'local',
-            // 'workstation', the schema ('acq') is the root of the path.
+        if (this.persistKeyPfx === 'acq' || this.persistKeyPfx === 'extra') {
+            // ACQ and Extra are a special cases, because unlike 'server', 'local',
+            // 'workstation', the schema ('acq' or 'extra') is the root of the path.
             this.persistKeyPfx = '';
         }
 
diff --git a/Open-ILS/src/eg2/src/app/staff/admin/extra/admin-extra-splash.component.html b/Open-ILS/src/eg2/src/app/staff/admin/extra/admin-extra-splash.component.html
new file mode 100644 (file)
index 0000000..7ac9f14
--- /dev/null
@@ -0,0 +1,16 @@
+<eg-staff-banner bannerText="Extras Administration" i18n-bannerText>
+</eg-staff-banner>
+
+<div class="container">
+  <eg-link-table columnCount="3">
+    <eg-link-table-link i18n-label label="RBDigital Digital Services"
+      routerLink="/staff/admin/extra/rbdigital_digital_services"></eg-link-table-link>
+    <eg-link-table-link i18n-label label="RBDigital Digital Services Authorized"
+      routerLink="/staff/admin/extra/rbdigital_digital_services_authorized"></eg-link-table-link>
+    <eg-link-table-link i18n-label label="RBDigital Search Fields"
+      routerLink="/staff/admin/extra/rbdigital_search_fields"></eg-link-table-link>
+    <eg-link-table-link i18n-label label="RBDigital Search Field Mappings"
+      routerLink="/staff/admin/extra/rbdigital_search_field_mappings"></eg-link-table-link>
+  </eg-link-table>
+</div>
+
diff --git a/Open-ILS/src/eg2/src/app/staff/admin/extra/admin-extra-splash.component.ts b/Open-ILS/src/eg2/src/app/staff/admin/extra/admin-extra-splash.component.ts
new file mode 100644 (file)
index 0000000..3be96b8
--- /dev/null
@@ -0,0 +1,11 @@
+import {Component, Input, ViewChildren,
+    AfterViewInit, QueryList} from '@angular/core';
+
+@Component({
+    templateUrl: './admin-extra-splash.component.html'
+})
+
+export class AdminExtraSplashComponent {
+}
+
+
diff --git a/Open-ILS/src/eg2/src/app/staff/admin/extra/admin-extra.module.ts b/Open-ILS/src/eg2/src/app/staff/admin/extra/admin-extra.module.ts
new file mode 100644 (file)
index 0000000..db2b7af
--- /dev/null
@@ -0,0 +1,24 @@
+import {NgModule} from '@angular/core';
+import {StaffCommonModule} from '@eg/staff/common.module';
+import {AdminExtraRoutingModule} from './routing.module';
+import {AdminCommonModule} from '@eg/staff/admin/common.module';
+import {AdminExtraSplashComponent} from './admin-extra-splash.component';
+
+@NgModule({
+  declarations: [
+      AdminExtraSplashComponent
+  ],
+  imports: [
+    AdminCommonModule,
+    AdminExtraRoutingModule
+  ],
+  exports: [
+  ],
+  providers: [
+  ]
+})
+
+export class AdminExtraModule {
+}
+
+
diff --git a/Open-ILS/src/eg2/src/app/staff/admin/extra/routing.module.ts b/Open-ILS/src/eg2/src/app/staff/admin/extra/routing.module.ts
new file mode 100644 (file)
index 0000000..0cc37c5
--- /dev/null
@@ -0,0 +1,22 @@
+import {NgModule} from '@angular/core';
+import {RouterModule, Routes} from '@angular/router';
+import {AdminExtraSplashComponent} from './admin-extra-splash.component';
+import {BasicAdminPageComponent} from '@eg/staff/admin/basic-admin-page.component';
+
+const routes: Routes = [{
+    path: 'splash',
+    component: AdminExtraSplashComponent
+}, {
+    path: ':table',
+    component: BasicAdminPageComponent,
+    // All "extra" admin pages cover data in the extra.* schema.  No need to
+    // duplicate it within the URL path.  Pass it manually instead.
+    data: [{schema: 'extra'}]
+}];
+
+@NgModule({
+  imports: [RouterModule.forChild(routes)],
+  exports: [RouterModule]
+})
+
+export class AdminExtraRoutingModule {}
index a93f9ee..af44774 100644 (file)
@@ -12,6 +12,9 @@ const routes: Routes = [{
   }, {
     path: 'acq',
     loadChildren: '@eg/staff/admin/acq/admin-acq.module#AdminAcqModule'
+  }, {
+    path: 'extra',
+    loadChildren: '@eg/staff/admin/extra/admin-extra.module#AdminExtraModule'
   }]
 }];
 
index feed30b..a99d246 100644 (file)
             <span class="material-icons">business_center</span>
             <span i18n>Booking Administration</span>
           </a>
+          <a class="dropdown-item"
+              routerLink="/staff/admin/extra/splash">
+            <span class="material-icons">card_giftcard</span>
+            <span i18n>Extras Administration</span>
+          </a>
           <a class="dropdown-item" href="/eg/staff/reporter/legacy/main">
             <span class="material-icons">insert_chart_outlined</span>
             <span i18n>Reports</span>
index e6eb2bd..f22e664 100644 (file)
             </a>
           </li>
           <li>
+            <a href="/eg2/staff/admin/extra/splash">
+              <span class="glyphicon glyphicon-gift"></span>
+              [% l('Extras Administration') %]
+            </a>
+          </li>
+          <li>
             <a href="./reporter/legacy/main" target="_self">
               <span class="glyphicon glyphicon-object-align-bottom"></span>
               [% l('Reports') %]