+

{{'DATASET-PROFILE-EDITOR.TITLE.NEW-PROFILE' | translate}}

+

+ {{'DATASET-PROFILE-EDITOR.TITLE.NEW-PROFILE-CLONE' | translate}} + {{form.get('label').value}} +

+

+ {{'DATASET-PROFILE-EDITOR.TITLE.NEW-PROFILE-VERSION' | translate}} + {{form.get('label').value}} +

+

{{form.get('label').value}}

- + {{'GENERAL.VALIDATION.REQUIRED' | translate}} - + {{'GENERAL.VALIDATION.REQUIRED' | translate}}
- +
{{'DATASET-PROFILE-EDITOR.STEPS.PAGES.TITLE' | translate}}
- +
- +
@@ -41,16 +46,13 @@
- +
- +
@@ -65,10 +67,8 @@
- - + +
diff --git a/dmp-frontend/src/app/ui/admin/dataset-profile/editor/dataset-profile-editor.component.ts b/dmp-frontend/src/app/ui/admin/dataset-profile/editor/dataset-profile-editor.component.ts index fbf53931a..0f3b1ece8 100644 --- a/dmp-frontend/src/app/ui/admin/dataset-profile/editor/dataset-profile-editor.component.ts +++ b/dmp-frontend/src/app/ui/admin/dataset-profile/editor/dataset-profile-editor.component.ts @@ -32,6 +32,8 @@ const skipDisable: any[] = require('../../../../../assets/resources/skipDisable. export class DatasetProfileEditorComponent extends BaseComponent implements OnInit { isNew = true; + isNewVersion = false; + isClone = false; isDeleted = false; dataModel: DatasetProfileEditorModel; form: FormGroup; @@ -92,6 +94,7 @@ export class DatasetProfileEditorComponent extends BaseComponent implements OnIn url: '/dataset-profiles/' + this.datasetProfileId }]); } else if (cloneId != null) { + this.isClone = true; this.datasetProfileService.clone(cloneId) .pipe(map(data => data as DatasetProfile), takeUntil(this._destroyed)) .subscribe( @@ -110,6 +113,7 @@ export class DatasetProfileEditorComponent extends BaseComponent implements OnIn error => this.onCallbackError(error) ); } else if (this.newVersionId != null) { + this.isNewVersion = true; this.datasetProfileService.getDatasetProfileById(this.newVersionId) .pipe(map(data => data as DatasetProfile), takeUntil(this._destroyed)) .subscribe( diff --git a/dmp-frontend/src/app/ui/admin/dmp-profile/dmp-profile.routing.ts b/dmp-frontend/src/app/ui/admin/dmp-profile/dmp-profile.routing.ts index 700b2e106..d9d7ac1b4 100644 --- a/dmp-frontend/src/app/ui/admin/dmp-profile/dmp-profile.routing.ts +++ b/dmp-frontend/src/app/ui/admin/dmp-profile/dmp-profile.routing.ts @@ -6,12 +6,12 @@ import { DmpProfileListingComponent } from './listing/dmp-profile-listing.compon const routes: Routes = [ { path: '', component: DmpProfileListingComponent, canActivate: [AuthGuard] }, - { path: 'new', component: DmpProfileEditorComponent, canActivate: [AuthGuard] }, - { path: ':id', component: DmpProfileEditorComponent, canActivate: [AuthGuard] }, + { path: 'new', component: DmpProfileEditorComponent, canActivate: [AuthGuard], data: { title: 'GENERAL.TITLES.DMP-PROFILE-NEW' } }, + { path: ':id', component: DmpProfileEditorComponent, canActivate: [AuthGuard], data: { title: 'GENERAL.TITLES.DMP-PROFILE-EDIT' } }, ]; @NgModule({ imports: [RouterModule.forChild(routes)], exports: [RouterModule] }) -export class DmpProfileRoutingModule { } \ No newline at end of file +export class DmpProfileRoutingModule { } diff --git a/dmp-frontend/src/app/ui/dataset/dataset.routing.ts b/dmp-frontend/src/app/ui/dataset/dataset.routing.ts index b21150984..99bbf7c95 100644 --- a/dmp-frontend/src/app/ui/dataset/dataset.routing.ts +++ b/dmp-frontend/src/app/ui/dataset/dataset.routing.ts @@ -10,7 +10,8 @@ const routes: Routes = [ component: DatasetWizardComponent, canActivate: [AuthGuard], data: { - breadcrumb: true + breadcrumb: true, + title: 'GENERAL.TITLES.DATASET-NEW' }, }, { @@ -19,7 +20,8 @@ const routes: Routes = [ canActivate: [AuthGuard], data: { breadcrumb: true, - public: false + public: false, + title: 'GENERAL.TITLES.DATASET-EDIT' }, }, { @@ -27,7 +29,8 @@ const routes: Routes = [ component: DatasetWizardComponent, //canActivate: [AuthGuard], data: { - public: true + public: true, + title: 'GENERAL.TITLES.DATASET-PUBLIC-EDIT' } }, { @@ -35,7 +38,8 @@ const routes: Routes = [ component: DatasetWizardComponent, canActivate: [AuthGuard], data: { - breadcrumb: true + breadcrumb: true, + title: 'GENERAL.TITLES.DATASET-NEW' }, }, { @@ -59,7 +63,8 @@ const routes: Routes = [ component: DatasetWizardComponent, canActivate: [AuthGuard], data: { - breadcrumb: true + breadcrumb: true, + title: 'GENERAL.TITLES.DATASET-COPY' }, }, { @@ -67,7 +72,8 @@ const routes: Routes = [ component: DatasetWizardComponent, canActivate: [AuthGuard], data: { - breadcrumb: true + breadcrumb: true, + title: 'GENERAL.TITLES.DATASET-UPDATE' }, } ]; diff --git a/dmp-frontend/src/app/ui/dmp/clone/dmp-clone.component.html b/dmp-frontend/src/app/ui/dmp/clone/dmp-clone.component.html index eba79873d..e79ab5628 100644 --- a/dmp-frontend/src/app/ui/dmp/clone/dmp-clone.component.html +++ b/dmp-frontend/src/app/ui/dmp/clone/dmp-clone.component.html @@ -6,8 +6,8 @@

{{ formGroup.get('label').value }}