From c2c491618d3ff284eabe545716000118d775478b Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Thu, 21 Feb 2019 13:12:52 -0500 Subject: [PATCH 1/1] LP1806087 Ang catalog pending tabs offer manual redirect Instead of sending users to the AngJS versions of not-yet-implemented tabs from the Angular catalog, show a message indicating the tab is not yet implemented and offer a link to open the requested record tab in a new browser tab. This better clarifies what is happening and helps to avoid situations where the back-button is confusingly hijacked via intermediate redirect. We now also open the "View" link for copies in a new tab as well for consistency with the modified "Edit" link. Signed-off-by: Bill Erickson Signed-off-by: Dan Wells --- .../catalog/record/copies.component.html | 6 ++-- .../catalog/record/record.component.html | 36 +++++++++++++++++++ .../staff/catalog/record/record.component.ts | 25 ------------- 3 files changed, 40 insertions(+), 27 deletions(-) diff --git a/Open-ILS/src/eg2/src/app/staff/catalog/record/copies.component.html b/Open-ILS/src/eg2/src/app/staff/catalog/record/copies.component.html index e60fb24847..dd5718e5b7 100644 --- a/Open-ILS/src/eg2/src/app/staff/catalog/record/copies.component.html +++ b/Open-ILS/src/eg2/src/app/staff/catalog/record/copies.component.html @@ -7,9 +7,11 @@
{{copy.barcode}}
- View + View | - Edit + Edit
diff --git a/Open-ILS/src/eg2/src/app/staff/catalog/record/record.component.html b/Open-ILS/src/eg2/src/app/staff/catalog/record/record.component.html index d1385230f3..0bfc6fbd55 100644 --- a/Open-ILS/src/eg2/src/app/staff/catalog/record/record.component.html +++ b/Open-ILS/src/eg2/src/app/staff/catalog/record/record.component.html @@ -34,6 +34,15 @@ + +
+ MARC Edit not yet implemented. See the + + AngularJS MARC Edit Tab. + +
+
@@ -41,6 +50,15 @@ + +
+ Holds tab not yet implemented. See the + + AngularJS Holds Tab. + +
+
@@ -49,8 +67,26 @@ + +
+ Holdings not yet implemented. See the + + AngularJS Holdings Tab. + +
+
+ +
+ Conjoined Items not yet implemented. See the + + AngularJS Conjoined Items Tab. + +
+
diff --git a/Open-ILS/src/eg2/src/app/staff/catalog/record/record.component.ts b/Open-ILS/src/eg2/src/app/staff/catalog/record/record.component.ts index e6832f1ab9..2a98e36b18 100644 --- a/Open-ILS/src/eg2/src/app/staff/catalog/record/record.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/catalog/record/record.component.ts @@ -10,13 +10,6 @@ import {StaffCatalogService} from '../catalog.service'; import {BibSummaryComponent} from '@eg/staff/share/bib-summary/bib-summary.component'; import {StoreService} from '@eg/core/store.service'; -const ANGJS_TABS: any = { - marc_edit: true, - holds: true, - holdings: true, - conjoined: true -}; - @Component({ selector: 'eg-catalog-record', templateUrl: 'record.component.html' @@ -47,9 +40,6 @@ export class RecordComponent implements OnInit { this.store.getLocalItem('eg.cat.default_record_tab') || 'catalog'; - // TODO: Implement default tab handling for tabs that require - // and AngJS redirect. - // Watch for URL record ID changes // This includes the initial route. // When applying the default configured tab, no navigation occurs @@ -63,11 +53,6 @@ export class RecordComponent implements OnInit { if (!this.recordTab) { this.recordTab = this.defaultTab || 'catalog'; - // On initial load, if the default tab is set to one of - // the AngularJS tabs, redirect the user there. - if (this.recordTab in ANGJS_TABS) { - return this.routeToTab(); - } } this.loadRecord(); @@ -91,16 +76,6 @@ export class RecordComponent implements OnInit { } routeToTab() { - - // Route to the AngularJS catalog tab - if (this.recordTab in ANGJS_TABS) { - const angjsBase = '/eg/staff/cat/catalog/record'; - - window.location.href = - `${angjsBase}/${this.recordId}/${this.recordTab}`; - return; - } - const url = `/staff/catalog/record/${this.recordId}/${this.recordTab}`; -- 2.43.2