diff --git a/nietzsche-beta-app/src/app/tln-edition/tln-crossref/page-version-view/page-version-view.component.ts b/nietzsche-beta-app/src/app/tln-edition/tln-crossref/page-version-view/page-version-view.component.ts
index 1632959..b3b567f 100644
--- a/nietzsche-beta-app/src/app/tln-edition/tln-crossref/page-version-view/page-version-view.component.ts
+++ b/nietzsche-beta-app/src/app/tln-edition/tln-crossref/page-version-view/page-version-view.component.ts
@@ -1,58 +1,63 @@
import { Component, Input, OnInit } from '@angular/core';
import { Router, ActivatedRoute, Params } from '@angular/router';
import { MatBottomSheetRef} from '@angular/material/bottom-sheet';
import { ManuscriptUnity, NavigationPage} from '../../models';
import { Mapping, RouteReader } from '../../route-reader';
import { RouteUpdater } from '../../route-updater';
import { TlnTextGeneticOrder} from '../../datatypes/text_version';
import { TLN_CONTEXT_VIEW_PARAM, TLN_PAGE_PARAM, TLN_MANUSCRIPT_PARAM, TLN_TEXT_GENETIC_ORDER_PARAM, TLN_CROSSREF_ROUTE } from '../../constants';
@Component({
selector: 'page-version-view',
templateUrl: './page-version-view.component.html',
styleUrls: ['./page-version-view.component.css']
})
export class PageVersionViewComponent extends RouteUpdater implements OnInit {
/**
* IRI of the current page
**/
current_iri: string;
/**
* the current page
**/
@Input() current_page_iri: string;
/**
* the genetic text order that should be displayed.
**/
@Input() geneticOrders: TlnTextGeneticOrder[] = [];
@Input() bottomSheetRef: MatBottomSheetRef;
@Input() parentActivatedRoute: ActivatedRoute;
+ @Input() targetRoute: string;
current_manuscript_iri: string;
current_genetic_order: string;
contextView: string;
- protected currentRoute: string = TLN_CROSSREF_ROUTE;
+ //TODO: change default parentActivatedRoute, exception @Input
+ protected currentRoute: string;// = TLN_CROSSREF_ROUTE;
protected mapping: Mapping = {
current_iri: { param: TLN_PAGE_PARAM, type: "string" },
current_manuscript_iri: { param: TLN_MANUSCRIPT_PARAM, type: "string" },
contextView: { param: TLN_CONTEXT_VIEW_PARAM, type: "string" },
current_genetic_order: { param: TLN_TEXT_GENETIC_ORDER_PARAM, type: "string" }
}
constructor(protected router: Router, protected activatedRoute: ActivatedRoute ){
super(router, activatedRoute);
}
ngOnInit() {
+ if (this.targetRoute != undefined && this.targetRoute != null){
+ this.currentRoute = this.targetRoute;
+ }
super.ngOnInit();
}
private openCrossRef(geneticOrder: TlnTextGeneticOrder){
this.current_genetic_order = geneticOrder.id;
this.current_iri = this.current_page_iri
this.contextView = TLN_PAGE_PARAM;
this.updateParams();
if(this.bottomSheetRef != undefined && this.bottomSheetRef != null){
this.bottomSheetRef.dismiss();
}
}
}
diff --git a/nietzsche-beta-app/src/app/tln-edition/tln-information/tln-information.component.html b/nietzsche-beta-app/src/app/tln-edition/tln-information/tln-information.component.html
index 4e8f6e0..2878768 100644
--- a/nietzsche-beta-app/src/app/tln-edition/tln-information/tln-information.component.html
+++ b/nietzsche-beta-app/src/app/tln-edition/tln-information/tln-information.component.html
@@ -1,6 +1,7 @@
-
-
{{current_page.title}} {{current_page.number}}:
+
+
{{data.page.title}} {{data.page.number}}:
Querverweise:
+ [current_page_iri]="data.page.id" [geneticOrders]="data.geneticOrders"
+ [targetRoute]="crossrefRoute">
diff --git a/nietzsche-beta-app/src/app/tln-edition/tln-information/tln-information.component.ts b/nietzsche-beta-app/src/app/tln-edition/tln-information/tln-information.component.ts
index 801b996..d40d3dd 100644
--- a/nietzsche-beta-app/src/app/tln-edition/tln-information/tln-information.component.ts
+++ b/nietzsche-beta-app/src/app/tln-edition/tln-information/tln-information.component.ts
@@ -1,63 +1,57 @@
import { Component, Inject, OnInit } from '@angular/core';
import { Router, ActivatedRoute, Params } from '@angular/router';
import { MAT_BOTTOM_SHEET_DATA, MatBottomSheetRef} from '@angular/material/bottom-sheet';
import { ManuscriptUnity, NavigationPage} from '../models';
import { Mapping, RouteReader } from '../route-reader';
import { RouteUpdater } from '../route-updater';
import { TlnTextGeneticOrder} from '../datatypes/text_version';
import { TLN_PAGE_PARAM, TLN_MANUSCRIPT_PARAM, TLN_TEXT_GENETIC_ORDER_PARAM, TLN_CROSSREF_ROUTE } from '../constants';
import { TlnViewerNavigation } from '../tln-viewer-navigation/tln-viewer-navigation.component';
export interface ParentInformation {
geneticOrders: TlnTextGeneticOrder[];
page: NavigationPage;
manuscript_iri: string;
parentActivatedRoute?: ActivatedRoute;
}
@Component({
selector: 'app-tln-information',
templateUrl: './tln-information.component.html',
styleUrls: ['./tln-information.component.css']
})
export class TlnInformationComponent extends RouteUpdater implements OnInit {
/**
- * IRI of the current page
+ * IRI of the current page TODO: for later use
**/
current_iri: string;
/**
- * the current page
+ * IRI of the current manuscript TODO: for later use
**/
- current_page: NavigationPage;
+ current_manuscript_iri: string;
/**
- * the data handler of this component that retrieves
- * data and instantiates it according to their proper
- * datatypes.
+ * IRI of the current geneticOrder TODO: for later use
**/
- geneticOrders: TlnTextGeneticOrder[] = [];
- current_manuscript_iri: string;
current_genetic_order: string;
- protected currentRoute: string = TLN_CROSSREF_ROUTE;
+ /**
+ * the route to the crossref app
+ **/
+ private crossrefRoute: string = TLN_CROSSREF_ROUTE;
+ /**
+ * the param mapping TODO: for later use
+ **/
protected mapping: Mapping = {
current_iri: { param: TLN_PAGE_PARAM, type: "string" },
current_manuscript_iri: { param: TLN_MANUSCRIPT_PARAM, type: "string" },
current_genetic_order: { param: TLN_TEXT_GENETIC_ORDER_PARAM, type: "string" }
}
constructor(@Inject(MAT_BOTTOM_SHEET_DATA) private data: ParentInformation, private bottomSheetRef: MatBottomSheetRef
, protected router: Router, protected activatedRoute: ActivatedRoute ){
super(router, activatedRoute);
- this.current_page = data.page;
- this.geneticOrders = data.geneticOrders;
- this.current_manuscript_iri = data.manuscript_iri;
}
- ngOnInit() {
+ /*ngOnInit() { //TODO: for later use
super.ngOnInit();
- }
- private openCrossRef(geneticOrder: TlnTextGeneticOrder){
- this.current_genetic_order = geneticOrder.id;
- this.current_iri = this.current_page.id
- this.updateParams();
- }
+ }*/
}