diff --git a/dmp-frontend/src/app/ui/dataset/dataset-wizard/dataset-wizard.component.ts b/dmp-frontend/src/app/ui/dataset/dataset-wizard/dataset-wizard.component.ts index 260e97f02..01aefd5ac 100644 --- a/dmp-frontend/src/app/ui/dataset/dataset-wizard/dataset-wizard.component.ts +++ b/dmp-frontend/src/app/ui/dataset/dataset-wizard/dataset-wizard.component.ts @@ -135,18 +135,18 @@ export class DatasetWizardComponent extends BaseComponent implements OnInit, IBr this.breadCrumbs = Observable.of([ { parentComponentName: null, - label: this.language.instant('NAV-BAR.DATASET'), - url: '/datasets', + label: this.datasetWizardModel.label, + url: '/datasets/edit/' + this.datasetWizardModel.id, notFoundResolver: [ { parentComponentName: null, - label: this.datasetWizardModel.dmp.project.label, - url: '/projects/edit/' + this.datasetWizardModel.dmp.project.id + label: this.datasetWizardModel.dmp.label, + url: '/plans/overview/' + this.datasetWizardModel.dmp.id }, { parentComponentName: null, - label: this.datasetWizardModel.dmp.label, - url: '/plans/edit/' + this.datasetWizardModel.dmp.id, + label: this.language.instant('NAV-BAR.MY-DATASET-DESCRIPTIONS').toUpperCase(), + url: '/datasets' }, ] }]); @@ -160,7 +160,7 @@ export class DatasetWizardComponent extends BaseComponent implements OnInit, IBr this.loadDatasetProfiles(); this.formGroup.get('dmp').valueChanges .pipe(takeUntil(this._destroyed)) - .subscribe( () => { + .subscribe(() => { this.dmpValueChanged(this.formGroup.get('dmp').value); }); this.formGroup.get('profile').valueChanges @@ -187,7 +187,7 @@ export class DatasetWizardComponent extends BaseComponent implements OnInit, IBr this.breadCrumbs = Observable.of([ { parentComponentName: null, - label: this.language.instant('NAV-BAR.DATASETS'), + label: this.language.instant('NAV-BAR.MY-DATASET-DESCRIPTIONS'), url: '/datasets', notFoundResolver: [ { @@ -223,7 +223,7 @@ export class DatasetWizardComponent extends BaseComponent implements OnInit, IBr this.breadCrumbs = Observable.of([ { parentComponentName: null, - label: this.language.instant('NAV-BAR.DATASETS'), + label: this.language.instant('NAV-BAR.MY-DATASET-DESCRIPTIONS'), url: '/datasets', notFoundResolver: [ { @@ -269,7 +269,7 @@ export class DatasetWizardComponent extends BaseComponent implements OnInit, IBr this.breadCrumbs = Observable.of([ { parentComponentName: null, - label: this.language.instant('NAV-BAR.DATASETS'), + label: this.language.instant('NAV-BAR.MY-DATASET-DESCRIPTIONS'), url: '/datasets', notFoundResolver: [ { @@ -295,7 +295,7 @@ export class DatasetWizardComponent extends BaseComponent implements OnInit, IBr this.breadCrumbs = Observable.of([ { parentComponentName: null, - label: this.language.instant('NAV-BAR.DATASETS'), + label: this.language.instant('NAV-BAR.MY-DATASET-DESCRIPTIONS'), url: '/datasets', notFoundResolver: [ { @@ -339,6 +339,12 @@ export class DatasetWizardComponent extends BaseComponent implements OnInit, IBr this.datasetProfileValueChanged(x); }); this.dmpValueChanged(null); + this.breadCrumbs = Observable.of([ + { + parentComponentName: null, + label: this.language.instant('DATASET-LISTING.ACTIONS.CREATE-NEW').toUpperCase(), + url: '/datasets/new/' + }]); } // this.route.params diff --git a/dmp-frontend/src/app/ui/dataset/listing/dataset-listing.component.ts b/dmp-frontend/src/app/ui/dataset/listing/dataset-listing.component.ts index 5709478ed..31706b52d 100644 --- a/dmp-frontend/src/app/ui/dataset/listing/dataset-listing.component.ts +++ b/dmp-frontend/src/app/ui/dataset/listing/dataset-listing.component.ts @@ -73,7 +73,7 @@ export class DatasetListingComponent extends BaseComponent implements OnInit, IB this.criteria.setRefreshCallback((resetPages) => this.refresh(resetPages)); this.breadCrumbs = Observable.of([{ parentComponentName: null, - label: this.language.instant('NAV-BAR.DATASET-DESCRIPTIONS'), + label: this.language.instant('NAV-BAR.MY-DATASET-DESCRIPTIONS'), url: "/datasets" }]); } diff --git a/dmp-frontend/src/app/ui/dmp/editor/dmp-editor.component.ts b/dmp-frontend/src/app/ui/dmp/editor/dmp-editor.component.ts index a64f9c131..0cf9c06ee 100644 --- a/dmp-frontend/src/app/ui/dmp/editor/dmp-editor.component.ts +++ b/dmp-frontend/src/app/ui/dmp/editor/dmp-editor.component.ts @@ -119,15 +119,14 @@ export class DmpEditorComponent extends BaseComponent implements OnInit, IBreadC const breadCrumbs = []; breadCrumbs.push({ parentComponentName: null, - label: this.language.instant('NAV-BAR.DMPS'), + label: this.language.instant('NAV-BAR.MY-DMPS'), url: "/plans" }); const breadcrumb = await this.projectService.getSingle(this.dmp.project.id).map(x => ({ label: x.label, url: '/projects/edit/' + x.id }) as BreadcrumbItem).toPromise(); - breadCrumbs.push( - { + breadCrumbs.push({ parentComponentName: 'DmpListingComponent', - label: breadcrumb.label, - url: breadcrumb.url, + label: this.dmp.label, + url: '/plans/edit/' + this.dmp.id, // notFoundResolver: [await this.projectService.getSingle(this.dmp.project.id).map(x => ({ label: x.label, url: '/projects/edit/' + x.id }) as BreadcrumbItem).toPromise()] } ); @@ -163,7 +162,7 @@ export class DmpEditorComponent extends BaseComponent implements OnInit, IBreadC this.breadCrumbs = Observable.of([ { parentComponentName: 'DmpListingComponent', - label: this.language.instant('NAV-BAR.DMPS'), + label: this.language.instant('NAV-BAR.MY-DMPS'), url: 'plans', notFoundResolver: [await this.projectService.getSingle(this.dmp.project.id).map(x => ({ label: x.label, url: '/projects/edit/' + x.id }) as BreadcrumbItem).toPromise()] }] @@ -175,6 +174,21 @@ export class DmpEditorComponent extends BaseComponent implements OnInit, IBreadC this.dmp = new DmpEditorModel(); this.formGroup = this.dmp.buildForm(); this.registerFormEventsForNewItem(); + if (this.isAuthenticated) { + const breadCrumbs = []; + breadCrumbs.push({ + parentComponentName: null, + label: this.language.instant('NAV-BAR.MY-DMPS'), + url: "/plans" + }); + breadCrumbs.push({ + parentComponentName: null, + label: "CREATE NEW DMP", + url: "/plans/new" + } + ); + this.breadCrumbs = Observable.of(breadCrumbs); + } } }); @@ -194,7 +208,7 @@ export class DmpEditorComponent extends BaseComponent implements OnInit, IBreadC this.breadCrumbs = Observable.of([ { parentComponentName: 'DmpListingComponent', - label: this.language.instant('NAV-BAR.DMPS'), + label: this.language.instant('NAV-BAR.MY-DMPS'), url: 'plans', } ]); diff --git a/dmp-frontend/src/app/ui/dmp/listing/dmp-listing.component.ts b/dmp-frontend/src/app/ui/dmp/listing/dmp-listing.component.ts index fd03f6eea..94651518f 100644 --- a/dmp-frontend/src/app/ui/dmp/listing/dmp-listing.component.ts +++ b/dmp-frontend/src/app/ui/dmp/listing/dmp-listing.component.ts @@ -67,18 +67,19 @@ export class DmpListingComponent extends BaseComponent implements OnInit, IBread this.showProject = true; const breadCrumbs = []; - if (this.itemId) { - const dmplabel = this.route.snapshot.queryParams.groupLabel; - breadCrumbs.push({ - parentComponentName: null, - label: this.language.instant('NAV-BAR.DMPS'), - url: '/plans' - }); - } - else breadCrumbs.push({ - parentComponentName: null, - label: this.language.instant('NAV-BAR.DMPS'), - url: "/plans" + // if (this.itemId) { + // const dmplabel = this.route.snapshot.queryParams.groupLabel; + // breadCrumbs.push({ + // parentComponentName: null, + // label: this.language.instant('NAV-BAR.DMPS'), + // url: '/plans' + // }); + // } + // else + breadCrumbs.push({ + parentComponentName: null, + label: this.language.instant('NAV-BAR.MY-DMPS'), + url: "/plans" }) this.breadCrumbs = Observable.of(breadCrumbs); this.criteria.setCriteria(this.getDefaultCriteria()); diff --git a/dmp-frontend/src/app/ui/dmp/overview/dmp-overview.component.ts b/dmp-frontend/src/app/ui/dmp/overview/dmp-overview.component.ts index 3197887a0..3607df7aa 100644 --- a/dmp-frontend/src/app/ui/dmp/overview/dmp-overview.component.ts +++ b/dmp-frontend/src/app/ui/dmp/overview/dmp-overview.component.ts @@ -54,8 +54,8 @@ export class DmpOverviewComponent extends BaseComponent implements OnInit { .subscribe(data => { this.dmp = data; const breadCrumbs = []; - breadCrumbs.push({ parentComponentName: null, label: 'DMPs', url: "/plans" }); - breadCrumbs.push({ parentComponentName: 'DmpListingComponent', label: this.dmp.label, url: '/overview/' + this.dmp.id }); + breadCrumbs.push({ parentComponentName: null, label: this.language.instant('NAV-BAR.MY-DMPS'), url: "/plans" }); + breadCrumbs.push({ parentComponentName: 'DmpListingComponent', label: this.dmp.label, url: '/plans/overview/' + this.dmp.id }); this.breadCrumbs = Observable.of(breadCrumbs); }) } diff --git a/dmp-frontend/src/app/ui/misc/breadcrumb/breadcrumb.component.html b/dmp-frontend/src/app/ui/misc/breadcrumb/breadcrumb.component.html index 4edfe5012..e4ce76eb5 100644 --- a/dmp-frontend/src/app/ui/misc/breadcrumb/breadcrumb.component.html +++ b/dmp-frontend/src/app/ui/misc/breadcrumb/breadcrumb.component.html @@ -1,13 +1,13 @@
-
+