From bb60873046f10c4a3165992bb6f8814c7a133c63 Mon Sep 17 00:00:00 2001 From: annampak Date: Fri, 9 Feb 2018 11:01:59 +0200 Subject: [PATCH] no message --- .../datasets/listing/dataset-listing.component.html | 2 +- .../app/datasets/listing/dataset-listing.component.ts | 10 ++-------- .../src/app/dmps/listing/dmp-listing.component.html | 2 +- .../src/app/dmps/listing/dmp-listing.component.ts | 6 ++++-- dmp-frontend/src/assets/lang/en.json | 2 +- 5 files changed, 9 insertions(+), 13 deletions(-) diff --git a/dmp-frontend/src/app/datasets/listing/dataset-listing.component.html b/dmp-frontend/src/app/datasets/listing/dataset-listing.component.html index d950b8246..e438c4a05 100644 --- a/dmp-frontend/src/app/datasets/listing/dataset-listing.component.html +++ b/dmp-frontend/src/app/datasets/listing/dataset-listing.component.html @@ -1,5 +1,5 @@
-

{{titlePrefix}} {{'DATASET-LISTING.TITLE' | translate}}

+

{{'DATASET-LISTING.TITLE' | translate}} {{titlePrefix}}

diff --git a/dmp-frontend/src/app/datasets/listing/dataset-listing.component.ts b/dmp-frontend/src/app/datasets/listing/dataset-listing.component.ts index bf2f59f22..6c50f55a0 100644 --- a/dmp-frontend/src/app/datasets/listing/dataset-listing.component.ts +++ b/dmp-frontend/src/app/datasets/listing/dataset-listing.component.ts @@ -55,20 +55,14 @@ export class DatasetListingComponent implements OnInit { ngOnInit() { this.route.params.subscribe((params: Params) => { this.dmpId = params['dmpId']; - if (this.dmpId != null) this.setDmpTitle(this.dmpId); + // if (this.dmpId != null) this.setDmpTitle(this.dmpId); this.criteria.setCriteria(this.getDefaultCriteria(this.dmpId)); this.refresh(); this.criteria.setRefreshCallback(() => this.refresh()); + if (this.dmpId != null) this.titlePrefix ="for " + params['dmpLabel']; }); } - setDmpTitle(dmpId: String) { - this.dataManagementPlanService.getSingle(dmpId).map(data => data as DataManagementPlanModel) - .subscribe(data => { - this.titlePrefix = data.label; - }); - } - refresh() { this.dataSource = new DatasetDataSource(this.datasetService, this._paginator, this.sort, this.languageService, this.snackBar, this.criteria); } diff --git a/dmp-frontend/src/app/dmps/listing/dmp-listing.component.html b/dmp-frontend/src/app/dmps/listing/dmp-listing.component.html index 323dc0dac..4fd94cd57 100644 --- a/dmp-frontend/src/app/dmps/listing/dmp-listing.component.html +++ b/dmp-frontend/src/app/dmps/listing/dmp-listing.component.html @@ -58,7 +58,7 @@ - + diff --git a/dmp-frontend/src/app/dmps/listing/dmp-listing.component.ts b/dmp-frontend/src/app/dmps/listing/dmp-listing.component.ts index 9bf7d03cf..85e97a4ff 100644 --- a/dmp-frontend/src/app/dmps/listing/dmp-listing.component.ts +++ b/dmp-frontend/src/app/dmps/listing/dmp-listing.component.ts @@ -12,6 +12,8 @@ import { Router, ActivatedRoute } from "@angular/router"; import { TranslateService } from "@ngx-translate/core"; import { DataSource } from "@angular/cdk/table"; import { Observable } from "rxjs/Observable"; +import { DataManagementPlanRoutes } from '@app/dmps/dmps.routes'; +import { DatasetRoutes } from '@app/datasets/dataset.routes'; @@ -65,8 +67,8 @@ export class DataManagementPlanListingComponent implements OnInit { this.router.navigate(['/datasets/new/' + rowId]); } - showDatasets(rowId: String) { - this.router.navigate(['/datasets/dmp/' + rowId]); + showDatasets(rowId: String, rowLabel:String) { + this.router.navigate(['/datasets/dmp/' + rowId, {dmpLabel:rowLabel}]); } newVersion(rowId: String) { diff --git a/dmp-frontend/src/assets/lang/en.json b/dmp-frontend/src/assets/lang/en.json index 932ce7548..08979dd21 100644 --- a/dmp-frontend/src/assets/lang/en.json +++ b/dmp-frontend/src/assets/lang/en.json @@ -136,7 +136,7 @@ "ACTIONS": { "SAVE": "Save", "CANCEL": "Cancel", - "DELETE": "Delete" + "DELETE": "Remove" } }, "CRITERIA": {