From 0ee949a4af89b5664c74fb641dddb452a1f5ea42 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Sun, 19 Nov 2017 19:55:07 -0500 Subject: [PATCH] LP#626157 Ang2 experiments / nav Signed-off-by: Bill Erickson --- Open-ILS/webby-src/package.json | 1 + Open-ILS/webby-src/src/app/base.module.ts | 4 ++- .../patron/bcsearch/bcsearch-routing.module.ts | 3 ++ .../circ/patron/bcsearch/bcsearch.component.ts | 2 +- .../webby-src/src/app/staff/nav.component.html | 33 ++++++++++++++++++++++ Open-ILS/webby-src/src/app/staff/nav.component.ts | 17 +++++++++++ .../webby-src/src/app/staff/staff.component.html | 6 ++-- Open-ILS/webby-src/src/app/staff/staff.module.ts | 10 +++++-- Open-ILS/webby-src/src/app/welcome.component.html | 23 +++++++-------- Open-ILS/webby-src/src/index.html | 6 ++++ 10 files changed, 84 insertions(+), 21 deletions(-) create mode 100644 Open-ILS/webby-src/src/app/staff/nav.component.html create mode 100644 Open-ILS/webby-src/src/app/staff/nav.component.ts diff --git a/Open-ILS/webby-src/package.json b/Open-ILS/webby-src/package.json index 19672bd561..69892f8fd9 100644 --- a/Open-ILS/webby-src/package.json +++ b/Open-ILS/webby-src/package.json @@ -21,6 +21,7 @@ "@angular/platform-browser": "^5.0.0", "@angular/platform-browser-dynamic": "^5.0.0", "@angular/router": "^5.0.0", + "@ng-bootstrap/ng-bootstrap": "^1.0.0-beta.5", "core-js": "^2.4.1", "jquery": "^3.2.1", "rxjs": "^5.5.2", diff --git a/Open-ILS/webby-src/src/app/base.module.ts b/Open-ILS/webby-src/src/app/base.module.ts index b94475783a..df83aa8de6 100644 --- a/Open-ILS/webby-src/src/app/base.module.ts +++ b/Open-ILS/webby-src/src/app/base.module.ts @@ -6,6 +6,7 @@ import { BrowserModule } from '@angular/platform-browser'; import { NgModule } from '@angular/core'; import { Router } from '@angular/router'; // Debugging +import { NgbModule } from '@ng-bootstrap/ng-bootstrap'; import { EgBaseComponent } from './base.component'; import { EgBaseRoutingModule } from './base-routing.module'; @@ -18,7 +19,8 @@ import { WelcomeComponent } from './welcome.component'; ], imports: [ EgBaseRoutingModule, - BrowserModule + BrowserModule, + NgbModule.forRoot() ], providers: [], bootstrap: [EgBaseComponent] diff --git a/Open-ILS/webby-src/src/app/staff/circ/patron/bcsearch/bcsearch-routing.module.ts b/Open-ILS/webby-src/src/app/staff/circ/patron/bcsearch/bcsearch-routing.module.ts index 6245d2411f..25d8a57670 100644 --- a/Open-ILS/webby-src/src/app/staff/circ/patron/bcsearch/bcsearch-routing.module.ts +++ b/Open-ILS/webby-src/src/app/staff/circ/patron/bcsearch/bcsearch-routing.module.ts @@ -3,6 +3,9 @@ import { RouterModule, Routes } from '@angular/router'; import { EgBcSearchComponent } from './bcsearch.component'; const routes: Routes = [ + { path: '', + component: EgBcSearchComponent + }, { path: ':barcode', component: EgBcSearchComponent }, diff --git a/Open-ILS/webby-src/src/app/staff/circ/patron/bcsearch/bcsearch.component.ts b/Open-ILS/webby-src/src/app/staff/circ/patron/bcsearch/bcsearch.component.ts index 958f5228bc..710590594a 100644 --- a/Open-ILS/webby-src/src/app/staff/circ/patron/bcsearch/bcsearch.component.ts +++ b/Open-ILS/webby-src/src/app/staff/circ/patron/bcsearch/bcsearch.component.ts @@ -41,7 +41,7 @@ export class EgBcSearchComponent implements OnInit { ).subscribe( x => console.log(x), e => console.log('echo event: ' + e), - () => console.log('done'); + () => console.log('done') ) } diff --git a/Open-ILS/webby-src/src/app/staff/nav.component.html b/Open-ILS/webby-src/src/app/staff/nav.component.html new file mode 100644 index 0000000000..299c96a53a --- /dev/null +++ b/Open-ILS/webby-src/src/app/staff/nav.component.html @@ -0,0 +1,33 @@ + + + diff --git a/Open-ILS/webby-src/src/app/staff/nav.component.ts b/Open-ILS/webby-src/src/app/staff/nav.component.ts new file mode 100644 index 0000000000..06f17e498a --- /dev/null +++ b/Open-ILS/webby-src/src/app/staff/nav.component.ts @@ -0,0 +1,17 @@ +import { Component, OnInit } from '@angular/core'; +import { ActivatedRoute, Router } from '@angular/router'; + +@Component({ + selector: 'eg-staff-nav-bar'; + templateUrl: 'nav.component.html' +}) + +export class EgStaffNavComponent implements OnInit { + constructor(private route: ActivatedRoute) {} + + ngOnInit() { + + } +} + + diff --git a/Open-ILS/webby-src/src/app/staff/staff.component.html b/Open-ILS/webby-src/src/app/staff/staff.component.html index e8bfeba5b2..36ae852691 100644 --- a/Open-ILS/webby-src/src/app/staff/staff.component.html +++ b/Open-ILS/webby-src/src/app/staff/staff.component.html @@ -1,6 +1,6 @@ -

Nav Bar Goes Here

- -

Staff Module

+ + + diff --git a/Open-ILS/webby-src/src/app/staff/staff.module.ts b/Open-ILS/webby-src/src/app/staff/staff.module.ts index 232634f754..f7dd6b1ace 100644 --- a/Open-ILS/webby-src/src/app/staff/staff.module.ts +++ b/Open-ILS/webby-src/src/app/staff/staff.module.ts @@ -1,17 +1,21 @@ import { CommonModule } from '@angular/common'; import { NgModule } from '@angular/core'; -//import { FormsModule } from '@angular/forms'; +import { FormsModule } from '@angular/forms'; +import { NgbModule } from '@ng-bootstrap/ng-bootstrap'; import { EgStaffComponent } from './staff.component'; import { EgStaffRoutingModule } from './staff-routing.module'; +import { EgStaffNavComponent } from './nav.component'; @NgModule({ declarations: [ - EgStaffComponent + EgStaffComponent, + EgStaffNavComponent ], imports: [ EgStaffRoutingModule, - //FormsModule, + FormsModule, + NgbModule ], providers: [] }) diff --git a/Open-ILS/webby-src/src/app/welcome.component.html b/Open-ILS/webby-src/src/app/welcome.component.html index 0526829ad1..8ec7fbb1d5 100644 --- a/Open-ILS/webby-src/src/app/welcome.component.html +++ b/Open-ILS/webby-src/src/app/welcome.component.html @@ -1,14 +1,11 @@ -
- -

Welcome to Webby

- - - If you see this page, you're probably in good shape... - - -

- But maybe you meant to go to the staff page - or the catalog. -

+
+

Welcome to Webby

+

+ If you see this page, you're probably in good shape... +

+
+

+ But maybe you meant to go to the staff page + or the catalog. +

- diff --git a/Open-ILS/webby-src/src/index.html b/Open-ILS/webby-src/src/index.html index 3bb7d5f52e..b1d2497bc5 100644 --- a/Open-ILS/webby-src/src/index.html +++ b/Open-ILS/webby-src/src/index.html @@ -7,6 +7,12 @@ + + -- 2.11.0