From: Bill Erickson Date: Thu, 12 Jul 2018 16:10:26 +0000 (-0400) Subject: LP#1779158 Display attrs page X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=586eade4ae36f875d87269b394b4eed0ebe7e226;p=working%2FEvergreen.git LP#1779158 Display attrs page Signed-off-by: Bill Erickson --- diff --git a/Open-ILS/src/eg2/src/app/staff/cat/vandelay/display-attrs.component.html b/Open-ILS/src/eg2/src/app/staff/cat/vandelay/display-attrs.component.html new file mode 100644 index 0000000000..78a86ed34c --- /dev/null +++ b/Open-ILS/src/eg2/src/app/staff/cat/vandelay/display-attrs.component.html @@ -0,0 +1,17 @@ + + + + +
+ +
+
+
+ + +
+ +
+
+
+
diff --git a/Open-ILS/src/eg2/src/app/staff/cat/vandelay/display-attrs.component.ts b/Open-ILS/src/eg2/src/app/staff/cat/vandelay/display-attrs.component.ts new file mode 100644 index 0000000000..6cb13afd96 --- /dev/null +++ b/Open-ILS/src/eg2/src/app/staff/cat/vandelay/display-attrs.component.ts @@ -0,0 +1,35 @@ +import {Component, OnInit, ViewChild} from '@angular/core'; +import {Router, ActivatedRoute, ParamMap} from '@angular/router'; +import {NgbTabset, NgbTabChangeEvent} from '@ng-bootstrap/ng-bootstrap'; + +@Component({ + templateUrl: 'display-attrs.component.html' +}) +export class DisplayAttrsComponent { + + attrType: string; + + constructor( + private router: Router, + private route: ActivatedRoute) { + + this.route.paramMap.subscribe((params: ParamMap) => { + this.attrType = params.get('atype'); + }); + } + + // Changing a tab in the UI means changing the route. + // Changing the route ultimately results in changing the tab. + onTabChange(evt: NgbTabChangeEvent) { + this.attrType = evt.nextId; + + // prevent tab changing until after route navigation + evt.preventDefault(); + + const url = + `/staff/cat/vandelay/display_attrs/${this.attrType}`; + + this.router.navigate([url]); + } +} +