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)
committerChris Sharp <csharp@georgialibraries.org>
Wed, 6 Nov 2019 17:29:43 +0000 (12:29 -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 ceed287..b4edbd2 100644 (file)
@@ -54,7 +54,7 @@ export class BasicAdminPageComponent implements OnInit {
         // the prefix because that will cause it to double-up.
         // e.g. eg.grid.acq.acq.cancel_reason
         this.persistKeyPfx = this.route.snapshot.parent.url[0].path;
-        const selfPrefixers = ['acq', 'booking'];
+        const selfPrefixers = ['acq', 'booking', 'extra'];
         if (selfPrefixers.indexOf(this.persistKeyPfx) > -1) {
             // ACQ is a special case, because unlike 'server', 'local',
             // 'workstation', the schema ('acq') is the root of the path.
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 a0df70e..15a1f47 100644 (file)
@@ -18,6 +18,9 @@ const routes: Routes = [{
   }, {
     path: 'booking',
     loadChildren: '@eg/staff/admin/booking/admin-booking.module#AdminBookingModule'
+  }, {
+    path: 'extra',
+    loadChildren: '@eg/staff/admin/extra/admin-extra.module#AdminExtraModule'
   }]
 }];
 
index 265368a..f06722d 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</span>
             <span i18n>Reports</span>
index ddaf12f..7bf2e70 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') %]