From: Bill Erickson Date: Mon, 14 May 2018 21:08:12 +0000 (-0400) Subject: LP#1626157 server admin ui X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=314411b8ad678284abef9e5df824bc2483a37487;p=working%2FEvergreen.git LP#1626157 server admin ui Signed-off-by: Bill Erickson --- diff --git a/Open-ILS/src/eg2/src/app/share/date-select/date-select.component.html b/Open-ILS/src/eg2/src/app/share/date-select/date-select.component.html index 93dc5cffb0..c686be4d28 100644 --- a/Open-ILS/src/eg2/src/app/share/date-select/date-select.component.html +++ b/Open-ILS/src/eg2/src/app/share/date-select/date-select.component.html @@ -4,7 +4,7 @@ class="form-control" ngbDatepicker #datePicker="ngbDatepicker" - [placeholder]="yyyy-mm-dd" + placeholder="yyyy-mm-dd" class="form-control" name="{{fieldName}}" [required]="required" diff --git a/Open-ILS/src/eg2/src/app/share/print/print.component.ts b/Open-ILS/src/eg2/src/app/share/print/print.component.ts index 54106fb1fd..1144f3d7d4 100644 --- a/Open-ILS/src/eg2/src/app/share/print/print.component.ts +++ b/Open-ILS/src/eg2/src/app/share/print/print.component.ts @@ -31,7 +31,7 @@ export class EgPrintComponent implements OnInit { dispatchPrint(printReq) { /* - if (this.hatch.useHatchForPrinting) { + if (this.hatch.isActive) { this.printViaHatch(); } else { */ diff --git a/Open-ILS/src/eg2/src/app/staff/admin/routing.module.ts b/Open-ILS/src/eg2/src/app/staff/admin/routing.module.ts index c74b2705b3..69c6f960f3 100644 --- a/Open-ILS/src/eg2/src/app/staff/admin/routing.module.ts +++ b/Open-ILS/src/eg2/src/app/staff/admin/routing.module.ts @@ -8,7 +8,7 @@ const routes: Routes = [{ loadChildren: '@eg/staff/admin/workstation/routing.module#EgAdminWsRoutingModule' }, { path: 'server', - loadChildren: '@eg/staff/admin/server/routing.module#EgAdminServerRoutingModule' + loadChildren: '@eg/staff/admin/server/admin-server.module#EgAdminServerModule' }] }]; diff --git a/Open-ILS/src/eg2/src/app/staff/admin/server/admin-server-splash.component.html b/Open-ILS/src/eg2/src/app/staff/admin/server/admin-server-splash.component.html new file mode 100644 index 0000000000..96313b8637 --- /dev/null +++ b/Open-ILS/src/eg2/src/app/staff/admin/server/admin-server-splash.component.html @@ -0,0 +1,99 @@ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/Open-ILS/src/eg2/src/app/staff/admin/server/admin-server.module.ts b/Open-ILS/src/eg2/src/app/staff/admin/server/admin-server.module.ts new file mode 100644 index 0000000000..8abab5000d --- /dev/null +++ b/Open-ILS/src/eg2/src/app/staff/admin/server/admin-server.module.ts @@ -0,0 +1,21 @@ +import {NgModule} from '@angular/core'; +import {EgStaffCommonModule} from '@eg/staff/common.module'; +import {EgAdminServerRoutingModule} from './routing.module'; +import {AdminServerSplashComponent} from './admin-server-splash.component'; + +@NgModule({ + declarations: [ + AdminServerSplashComponent + ], + imports: [ + EgStaffCommonModule, + EgAdminServerRoutingModule + ], + providers: [ + ] +}) + +export class EgAdminServerModule { +} + + diff --git a/Open-ILS/src/eg2/src/app/staff/admin/server/routing.module.ts b/Open-ILS/src/eg2/src/app/staff/admin/server/routing.module.ts index 79aa4ed8b0..2a5a90f4aa 100644 --- a/Open-ILS/src/eg2/src/app/staff/admin/server/routing.module.ts +++ b/Open-ILS/src/eg2/src/app/staff/admin/server/routing.module.ts @@ -1,7 +1,11 @@ import {NgModule} from '@angular/core'; import {RouterModule, Routes} from '@angular/router'; +import {AdminServerSplashComponent} from './admin-server-splash.component'; const routes: Routes = [{ + path: 'splash', + component: AdminServerSplashComponent +}, { path: 'config', loadChildren: '@eg/staff/admin/server/config/config.module#EgAdminServerConfigModule' }]; diff --git a/Open-ILS/src/eg2/src/app/staff/common.module.ts b/Open-ILS/src/eg2/src/app/staff/common.module.ts index 4347c648dc..e7e8b29e2b 100644 --- a/Open-ILS/src/eg2/src/app/staff/common.module.ts +++ b/Open-ILS/src/eg2/src/app/staff/common.module.ts @@ -16,6 +16,8 @@ import {EgStringComponent} from '@eg/share/string/string.component'; import {EgStringService} from '@eg/share/string/string.service'; import {FmRecordEditorComponent} from '@eg/share/fm-editor/fm-editor.component'; import {EgDateSelectComponent} from '@eg/share/date-select/date-select.component'; +import {EgLinkTableComponent, EgLinkTableLinkComponent} + from '@eg/staff/share/link-table/link-table.component'; /** * Imports the EG common modules and adds modules common to all staff UI's. @@ -35,7 +37,9 @@ import {EgDateSelectComponent} from '@eg/share/date-select/date-select.component EgStringComponent, EgOpChangeComponent, FmRecordEditorComponent, - EgDateSelectComponent + EgDateSelectComponent, + EgLinkTableComponent, + EgLinkTableLinkComponent ], imports: [ EgCommonModule @@ -54,7 +58,9 @@ import {EgDateSelectComponent} from '@eg/share/date-select/date-select.component EgStringComponent, EgOpChangeComponent, FmRecordEditorComponent, - EgDateSelectComponent + EgDateSelectComponent, + EgLinkTableComponent, + EgLinkTableLinkComponent ] }) diff --git a/Open-ILS/src/eg2/src/app/staff/nav.component.html b/Open-ILS/src/eg2/src/app/staff/nav.component.html index c5d5fcbf93..4d2fbcf80b 100644 --- a/Open-ILS/src/eg2/src/app/staff/nav.component.html +++ b/Open-ILS/src/eg2/src/app/staff/nav.component.html @@ -180,6 +180,11 @@ computer Registered Workstations + + account_balance + Server Administration + diff --git a/Open-ILS/src/eg2/src/app/staff/share/link-table/link-table.component.html b/Open-ILS/src/eg2/src/app/staff/share/link-table/link-table.component.html new file mode 100644 index 0000000000..3a375d2bad --- /dev/null +++ b/Open-ILS/src/eg2/src/app/staff/share/link-table/link-table.component.html @@ -0,0 +1,12 @@ + + diff --git a/Open-ILS/src/eg2/src/app/staff/share/link-table/link-table.component.ts b/Open-ILS/src/eg2/src/app/staff/share/link-table/link-table.component.ts new file mode 100644 index 0000000000..1fc1fc9348 --- /dev/null +++ b/Open-ILS/src/eg2/src/app/staff/share/link-table/link-table.component.ts @@ -0,0 +1,69 @@ +import {Component, Input, OnInit, AfterViewInit, Host} from '@angular/core'; + +interface LinkTableLink { + label: string, + url: string +} + +@Component({ + selector: 'eg-link-table', + templateUrl: './link-table.component.html' +}) + +export class EgLinkTableComponent implements AfterViewInit { + @Input() columnCount: number; + links: LinkTableLink[]; + rowBuckets: any[]; + colList: number[]; + colWidth: number; + + constructor() { + this.links = []; + this.rowBuckets = []; + this.colList = []; + } + + ngAfterViewInit() { + // table-ize the links + let rowCount = Math.ceil(this.links.length / this.columnCount); + this.colWidth = Math.floor(12 / this.columnCount); // Bootstrap 12-grid + + for (let col = 0; col < this.columnCount; col++) + this.colList.push(col); + + // Modifying values in AfterViewInit without other activity + // happening can result in the modified values not getting + // displayed until some action occurs. Modifing after + // via timeout works though. + setTimeout(() => { + for (let row = 0; row < rowCount; row++) { + this.rowBuckets[row] = [ + this.links[row], + this.links[row + Number(rowCount)], + this.links[row + Number(rowCount * 2)] + ]; + } + }); + } +} + +@Component({ + selector: 'eg-link-table-link', + template: '' +}) + +export class EgLinkTableLinkComponent implements OnInit { + @Input() label: string; + @Input() url: string; + + constructor(@Host() private linkTable: EgLinkTableComponent) {} + + ngOnInit() { + this.linkTable.links.push({ + label : this.label, + url: this.url + }); + } +} + +