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 213f44b86..fe68bd513 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 @@ -17,6 +17,8 @@ import { DatasetProfileEditorModel } from './dataset-profile-editor-model'; import { ConfirmationDialogComponent } from '../../../../library/confirmation-dialog/confirmation-dialog.component'; import { DatasetProfileEnum } from '../../../../core/common/enum/dataset-profile'; import * as FileSaver from 'file-saver'; +import { BreadcrumbItem } from '../../../misc/breadcrumb/definition/breadcrumb-item'; +import { Observable } from 'rxjs'; //import * as data from 'src/assets/resources/skipDisable.json'; const skipDisable: any[] = require('../../../../../assets/resources/skipDisable.json'); @@ -36,6 +38,7 @@ export class DatasetProfileEditorComponent extends BaseComponent implements OnIn private datasetProfileId: string; newVersionId: string; dataWizardModel: DatasetWizardModel; + breadCrumbs: Observable; @ViewChild('stepper') stepper: MatHorizontalStepper; viewOnly = false; @@ -82,6 +85,11 @@ export class DatasetProfileEditorComponent extends BaseComponent implements OnIn }, error => this.onCallbackError(error) ); + this.breadCrumbs = Observable.of([{ + parentComponentName: 'DatasetProfileListingComponent', + label: this.language.instant('NAV-BAR.TEMPLATE'), + url: '/dataset-profiles/' + this.datasetProfileId + }]); } else if (cloneId != null) { this.datasetProfileService.clone(cloneId) .pipe(map(data => data as DatasetProfile), takeUntil(this._destroyed)) diff --git a/dmp-frontend/src/app/ui/admin/dataset-profile/listing/dataset-profile-listing.component.ts b/dmp-frontend/src/app/ui/admin/dataset-profile/listing/dataset-profile-listing.component.ts index 0b3a20c04..5b6db04b5 100644 --- a/dmp-frontend/src/app/ui/admin/dataset-profile/listing/dataset-profile-listing.component.ts +++ b/dmp-frontend/src/app/ui/admin/dataset-profile/listing/dataset-profile-listing.component.ts @@ -15,6 +15,7 @@ import { DatasetProfileCriteriaComponent } from './criteria/dataset-profile.comp import { error } from 'selenium-webdriver'; import { UiNotificationService, SnackBarNotificationLevel } from '../../../../core/services/notification/ui-notification-service'; import { TranslateService } from '@ngx-translate/core'; +import { BreadcrumbItem } from '../../../misc/breadcrumb/definition/breadcrumb-item'; @Component({ selector: 'app-dataset-profile-listing-component', @@ -27,6 +28,7 @@ export class DatasetProfileListingComponent extends BaseComponent implements OnI @ViewChild(MatSort) sort: MatSort; @ViewChild(DatasetProfileCriteriaComponent) criteria: DatasetProfileCriteriaComponent; + breadCrumbs: Observable; dataSource: DatasetDataSource | null; displayedColumns: String[] = ['label', 'description', 'created', 'actions']; pageEvent: PageEvent; @@ -55,16 +57,24 @@ export class DatasetProfileListingComponent extends BaseComponent implements OnI this.criteria.setCriteria(this.getDefaultCriteria()); this.refresh(); this.criteria.setRefreshCallback(() => this.refresh()); + // this.breadCrumbs = Observable.of([{ + // parentComponentName: null, + // label: this.language.instant('NAV-BAR.DATASET-TEMPLATES'), + // url: 'plans/edit/' + this.dmpId + // }]); } else { this.itemId = params['groupId']; - if (this.itemId) { const datasetProfileLabel = this.route.snapshot.queryParams.groupLabel; } - this.criteria.setCriteria(this.getDefaultCriteria()); this.refresh(); this.criteria.setRefreshCallback(() => this.refresh()); + this.breadCrumbs = Observable.of([{ + parentComponentName: null, + label: this.language.instant('NAV-BAR.DATASET-TEMPLATES'), + url: '/dataset-profiles' + }]); } }); } @@ -75,7 +85,7 @@ export class DatasetProfileListingComponent extends BaseComponent implements OnI .subscribe(data => { this.titlePrefix = data.label; } - ); + ); } refresh() { diff --git a/dmp-frontend/src/app/ui/admin/dmp-profile/editor/dmp-profile-editor.component.ts b/dmp-frontend/src/app/ui/admin/dmp-profile/editor/dmp-profile-editor.component.ts index d76f07c83..05b129b0b 100644 --- a/dmp-frontend/src/app/ui/admin/dmp-profile/editor/dmp-profile-editor.component.ts +++ b/dmp-frontend/src/app/ui/admin/dmp-profile/editor/dmp-profile-editor.component.ts @@ -15,6 +15,8 @@ import { DmpProfileService } from '../../../../core/services/dmp/dmp-profile.ser import { SnackBarNotificationLevel, UiNotificationService } from '../../../../core/services/notification/ui-notification-service'; import { EnumUtils } from '../../../../core/services/utilities/enum-utils.service'; import { DmpProfileEditorModel, DmpProfileFieldEditorModel } from './dmp-profile-editor.model'; +import { BreadcrumbItem } from '../../../misc/breadcrumb/definition/breadcrumb-item'; +import { Observable } from 'rxjs'; @Component({ selector: 'app-dmp-profile-editor-component', @@ -29,6 +31,7 @@ export class DmpProfileEditorComponent extends BaseComponent implements AfterVie formGroup: FormGroup = null; host = environment.Server; dmpProfileId: string; + breadCrumbs: Observable; constructor( private dmpProfileService: DmpProfileService, @@ -58,12 +61,22 @@ export class DmpProfileEditorComponent extends BaseComponent implements AfterVie this.formGroup.disable(); this.viewOnly = true } + this.breadCrumbs = Observable.of([{ + parentComponentName: 'DmpProfileListingComponent', + label: this.language.instant('NAV-BAR.TEMPLATE'), + url: '/dmp-profiles/' + this.dmpProfileId + }]); }); } else { this.dmpProfileModel = new DmpProfileEditorModel(); setTimeout(() => { this.formGroup = this.dmpProfileModel.buildForm(); }); + this.breadCrumbs = Observable.of([{ + parentComponentName: 'DmpProfileListingComponent', + label: this.language.instant('NAV-BAR.TEMPLATE'), + url: '/dmp-profiles/' + this.dmpProfileId + }]); } }); } @@ -82,8 +95,8 @@ export class DmpProfileEditorComponent extends BaseComponent implements AfterVie this.dmpProfileService.createDmp(this.formGroup.value) .pipe(takeUntil(this._destroyed)) .subscribe( - complete => this.onCallbackSuccess(), - error => this.onCallbackError(error) + complete => this.onCallbackSuccess(), + error => this.onCallbackError(error) ); } @@ -185,8 +198,8 @@ export class DmpProfileEditorComponent extends BaseComponent implements AfterVie this.dmpProfileService.createDmp(this.formGroup.value) .pipe(takeUntil(this._destroyed)) .subscribe( - complete => this.onCallbackSuccess(), - error => this.onCallbackError(error) + complete => this.onCallbackSuccess(), + error => this.onCallbackError(error) ); } @@ -226,4 +239,4 @@ export class DmpProfileEditorComponent extends BaseComponent implements AfterVie } return filename; } -} \ No newline at end of file +} diff --git a/dmp-frontend/src/app/ui/admin/dmp-profile/listing/dmp-profile-listing.component.ts b/dmp-frontend/src/app/ui/admin/dmp-profile/listing/dmp-profile-listing.component.ts index d36c06e13..4353d5e7f 100644 --- a/dmp-frontend/src/app/ui/admin/dmp-profile/listing/dmp-profile-listing.component.ts +++ b/dmp-frontend/src/app/ui/admin/dmp-profile/listing/dmp-profile-listing.component.ts @@ -11,6 +11,7 @@ import { DmpProfileCriteria } from '../../../../core/query/dmp/dmp-profile-crite import { DmpProfileService } from '../../../../core/services/dmp/dmp-profile.service'; import { DataTableRequest } from '../../../../core/model/data-table/data-table-request'; import { DmpProfileCriteriaComponent } from './criteria/dmp-profile-criteria.component'; +import { BreadcrumbItem } from '../../../misc/breadcrumb/definition/breadcrumb-item'; @Component({ selector: 'app-dmp-profile-listing-component', @@ -28,6 +29,7 @@ export class DmpProfileListingComponent extends BaseComponent implements OnInit pageEvent: PageEvent; titlePrefix: String; dmpId: String; + breadCrumbs: Observable; statuses = [ { value: '0', viewValue: 'Active' }, @@ -44,7 +46,6 @@ export class DmpProfileListingComponent extends BaseComponent implements OnInit super(); } - ngOnInit() { this.route.params .pipe(takeUntil(this._destroyed)) @@ -53,6 +54,11 @@ export class DmpProfileListingComponent extends BaseComponent implements OnInit this.criteria.setCriteria(this.getDefaultCriteria()); this.refresh(); this.criteria.setRefreshCallback(() => this.refresh()); + this.breadCrumbs = Observable.of([{ + parentComponentName: null, + label: this.languageService.instant('NAV-BAR.DMP-TEMPLATES'), + url: '/dmp-profiles' + }]); }); } @@ -73,7 +79,6 @@ export class DmpProfileListingComponent extends BaseComponent implements OnInit // debugger; // this.datasetService.makeDatasetPublic(id).pipe(takeUntil(this._destroyed)).subscribe(); // } - } export class DatasetDataSource extends DataSource { @@ -96,7 +101,6 @@ export class DatasetDataSource extends DataSource { //this._sort.matSortChange ]; - return Observable.merge(...displayDataChanges) .startWith(null) .switchMap(() => { diff --git a/dmp-frontend/src/app/ui/admin/user/listing/user-listing.component.ts b/dmp-frontend/src/app/ui/admin/user/listing/user-listing.component.ts index ee69e25c4..934d66731 100644 --- a/dmp-frontend/src/app/ui/admin/user/listing/user-listing.component.ts +++ b/dmp-frontend/src/app/ui/admin/user/listing/user-listing.component.ts @@ -9,6 +9,7 @@ import { UserService } from '../../../../core/services/user/user.service'; import { SnackBarNotificationComponent } from '../../../../library/notification/snack-bar/snack-bar-notification.component'; import { DataTableRequest } from '../../../../core/model/data-table/data-table-request'; import { UserCriteriaComponent } from './criteria/user-criteria.component'; +import { BreadcrumbItem } from '../../../misc/breadcrumb/definition/breadcrumb-item'; export class UsersDataSource extends DataSource { @@ -93,6 +94,7 @@ export class UserListingComponent implements OnInit, AfterViewInit { @ViewChild(MatSort) sort: MatSort; @ViewChild(UserCriteriaComponent) criteria: UserCriteriaComponent; + breadCrumbs: Observable; dataSource: UsersDataSource | null; displayedColumns: String[] = ['name', 'email', 'lastloggedin', 'roles']; @@ -105,6 +107,11 @@ export class UserListingComponent implements OnInit, AfterViewInit { } ngOnInit() { + this.breadCrumbs = Observable.of([{ + parentComponentName: null, + label: this.languageService.instant('NAV-BAR.USERS-BREADCRUMB'), + url: "/users" + }]); //this.refresh(); //called on ngAfterViewInit with default criteria } diff --git a/dmp-frontend/src/app/ui/dataset-create-wizard/dataset-create-wizard.component.ts b/dmp-frontend/src/app/ui/dataset-create-wizard/dataset-create-wizard.component.ts index 6d3d46804..c151cc291 100644 --- a/dmp-frontend/src/app/ui/dataset-create-wizard/dataset-create-wizard.component.ts +++ b/dmp-frontend/src/app/ui/dataset-create-wizard/dataset-create-wizard.component.ts @@ -47,7 +47,7 @@ export class DatasetCreateWizard extends BaseComponent implements OnInit, IBread this.breadCrumbs = Observable.of([ { parentComponentName: 'Dashboard', - label: 'Dataset description wizard', + label: this.language.instant('NAV-BAR.DATASET-DESCRIPTION-WIZARD'), url: '/datasetcreatewizard' }] ); 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 10c8e2bf3..cc305b6cb 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 @@ -136,7 +136,7 @@ export class DatasetWizardComponent extends BaseComponent implements OnInit, IBr this.breadCrumbs = Observable.of([ { parentComponentName: null, - label: 'Datasets', + label: this.language.instant('NAV-BAR.DATASETS'), url: '/datasets', notFoundResolver: [ { @@ -178,7 +178,7 @@ export class DatasetWizardComponent extends BaseComponent implements OnInit, IBr this.breadCrumbs = Observable.of([ { parentComponentName: null, - label: 'Datasets', + label: this.language.instant('NAV-BAR.DATASETS'), url: '/datasets', notFoundResolver: [ { @@ -214,7 +214,7 @@ export class DatasetWizardComponent extends BaseComponent implements OnInit, IBr this.breadCrumbs = Observable.of([ { parentComponentName: null, - label: 'Datasets', + label: this.language.instant('NAV-BAR.DATASETS'), url: '/datasets', notFoundResolver: [ { @@ -260,7 +260,7 @@ export class DatasetWizardComponent extends BaseComponent implements OnInit, IBr this.breadCrumbs = Observable.of([ { parentComponentName: null, - label: 'Datasets', + label: this.language.instant('NAV-BAR.DATASETS'), url: '/datasets', notFoundResolver: [ { @@ -286,7 +286,7 @@ export class DatasetWizardComponent extends BaseComponent implements OnInit, IBr this.breadCrumbs = Observable.of([ { parentComponentName: null, - label: 'Datasets', + label: this.language.instant('NAV-BAR.DATASETS'), url: '/datasets', notFoundResolver: [ { 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 556b7c70a..bd69c5d2f 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 @@ -12,6 +12,7 @@ import { DmpService } from '../../../core/services/dmp/dmp.service'; import { BreadcrumbItem } from '../../misc/breadcrumb/definition/breadcrumb-item'; import { IBreadCrumbComponent } from '../../misc/breadcrumb/definition/IBreadCrumbComponent'; import { DatasetCriteriaComponent } from './criteria/dataset-criteria.component'; +import { TranslateService } from '@ngx-translate/core'; @Component({ selector: 'app-dataset-listing-component', @@ -38,6 +39,7 @@ export class DatasetListingComponent extends BaseComponent implements OnInit, IB private router: Router, private route: ActivatedRoute, private dmpService: DmpService, + private language: TranslateService, ) { super(); } @@ -56,7 +58,11 @@ export class DatasetListingComponent extends BaseComponent implements OnInit, IB this.criteria.setCriteria(this.getDefaultCriteria(dmp)); this.refresh(); this.criteria.setRefreshCallback((resetPages) => this.refresh(resetPages)); - this.breadCrumbs = Observable.of([{ parentComponentName: 'DmpEditorComponent', label: dmp.label, url: 'plans/edit/' + this.dmpId }]); + this.breadCrumbs = Observable.of([{ + parentComponentName: 'DmpEditorComponent', + label: dmp.label, + url: '/plans/edit/' + this.dmpId + }]); if (params['dmpLabel'] !== undefined) { this.titlePrefix = 'for ' + params['dmpLabel']; } @@ -64,7 +70,11 @@ export class DatasetListingComponent extends BaseComponent implements OnInit, IB this.criteria.setCriteria(this.getDefaultCriteria()); this.refresh(); this.criteria.setRefreshCallback((resetPages) => this.refresh(resetPages)); - this.breadCrumbs = Observable.of([]); + this.breadCrumbs = Observable.of([{ + parentComponentName: null, + label: this.language.instant('NAV-BAR.DATASET-DESCRIPTIONS'), + url: "/datasets" + }]); } if (this.status != null && this.status == 0) { 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 1fae23dda..17ac7f498 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 @@ -155,7 +155,11 @@ export class DmpEditorComponent extends BaseComponent implements OnInit, IBreadC if (this.isAuthenticated) { // if (!this.isAuthenticated) { const breadCrumbs = []; - breadCrumbs.push({ parentComponentName: null, label: 'DMPs', url: "/plans" }); + breadCrumbs.push({ + parentComponentName: null, + label: this.language.instant('NAV-BAR.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( { @@ -196,7 +200,7 @@ export class DmpEditorComponent extends BaseComponent implements OnInit, IBreadC this.breadCrumbs = Observable.of([ { parentComponentName: 'DmpListingComponent', - label: 'DMPs', + label: this.language.instant('NAV-BAR.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()] }] @@ -246,7 +250,7 @@ export class DmpEditorComponent extends BaseComponent implements OnInit, IBreadC this.breadCrumbs = Observable.of([ { parentComponentName: 'DmpListingComponent', - label: 'DMPs', + label: this.language.instant('NAV-BAR.DMPS'), url: 'plans', } ]); @@ -280,8 +284,8 @@ export class DmpEditorComponent extends BaseComponent implements OnInit, IBreadC this.dmpService.createDmp(this.formGroup.getRawValue()) .pipe(takeUntil(this._destroyed)) .subscribe( - complete => this.onCallbackSuccess(), - error => this.onCallbackError(error) + complete => this.onCallbackSuccess(), + error => this.onCallbackError(error) ); } @@ -373,8 +377,8 @@ export class DmpEditorComponent extends BaseComponent implements OnInit, IBreadC this.dmpService.delete(this.dmp.id) .pipe(takeUntil(this._destroyed)) .subscribe( - complete => { this.onCallbackSuccess() }, - error => this.onDeleteCallbackError(error) + complete => { this.onCallbackSuccess() }, + error => this.onDeleteCallbackError(error) ); } }); 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 0609e5663..ab774e46a 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 @@ -14,6 +14,7 @@ import { BreadcrumbItem } from '../../misc/breadcrumb/definition/breadcrumb-item import { IBreadCrumbComponent } from '../../misc/breadcrumb/definition/IBreadCrumbComponent'; import { DmpInvitationDialogComponent } from '../invitation/dmp-invitation.component'; import { DmpCriteriaComponent } from './criteria/dmp-criteria.component'; +import { TranslateService } from '@ngx-translate/core'; @Component({ selector: 'app-dmp-listing-component', @@ -39,7 +40,8 @@ export class DmpListingComponent extends BaseComponent implements OnInit, IBread private router: Router, private route: ActivatedRoute, private dialog: MatDialog, - public enumUtils: EnumUtils + public enumUtils: EnumUtils, + private language: TranslateService, ) { super(); } @@ -67,13 +69,18 @@ export class DmpListingComponent extends BaseComponent implements OnInit, IBread if (this.itemId) { const dmplabel = this.route.snapshot.queryParams.groupLabel; - breadCrumbs.push( - { parentComponentName: null, label: 'DMPs', url: '/plans' }, - ); + breadCrumbs.push({ + parentComponentName: null, + label: this.language.instant('NAV-BAR.DMPS'), + url: '/plans' + }); } - else breadCrumbs.push({ parentComponentName: null, label: 'DMPs', url: "/plans" }) + else breadCrumbs.push({ + parentComponentName: null, + label: this.language.instant('NAV-BAR.DMPS'), + url: "/plans" + }) this.breadCrumbs = Observable.of(breadCrumbs); - this.criteria.setCriteria(this.getDefaultCriteria()); this.refresh(); this.criteria.setRefreshCallback((resetPages) => this.refresh(resetPages)); diff --git a/dmp-frontend/src/app/ui/explore-dataset/explore-dataset-listing.component.ts b/dmp-frontend/src/app/ui/explore-dataset/explore-dataset-listing.component.ts index f35879b75..31f32b832 100644 --- a/dmp-frontend/src/app/ui/explore-dataset/explore-dataset-listing.component.ts +++ b/dmp-frontend/src/app/ui/explore-dataset/explore-dataset-listing.component.ts @@ -10,6 +10,7 @@ import { DatasetService } from '../../core/services/dataset/dataset.service'; import { IBreadCrumbComponent } from '../misc/breadcrumb/definition/IBreadCrumbComponent'; import { BreadcrumbItem } from '../misc/breadcrumb/definition/breadcrumb-item'; import { Observable } from 'rxjs'; +import { TranslateService } from '@ngx-translate/core'; @Component({ @@ -30,6 +31,7 @@ export class ExploreDatasetListingComponent extends BaseComponent implements OnI constructor( private datasetService: DatasetService, private router: Router, + private language: TranslateService, ) { super(); } @@ -38,7 +40,11 @@ export class ExploreDatasetListingComponent extends BaseComponent implements OnI this.refresh(); const breadCrumbs = []; - breadCrumbs.push({ parentComponentName: null, label: 'PUBLIC DATASETS', url: "/explore" }) + breadCrumbs.push({ + parentComponentName: null, + label: this.language.instant('NAV-BAR.PUBLIC DATASETS'), + url: "/explore" + }) this.breadCrumbs = Observable.of(breadCrumbs); } diff --git a/dmp-frontend/src/app/ui/explore-dmp/explore-dmp-listing.component.ts b/dmp-frontend/src/app/ui/explore-dmp/explore-dmp-listing.component.ts index 9ce83cb22..18a4668e3 100644 --- a/dmp-frontend/src/app/ui/explore-dmp/explore-dmp-listing.component.ts +++ b/dmp-frontend/src/app/ui/explore-dmp/explore-dmp-listing.component.ts @@ -10,6 +10,7 @@ import { DmpService } from "../../core/services/dmp/dmp.service"; import { Observable } from "rxjs"; import { IBreadCrumbComponent } from "../misc/breadcrumb/definition/IBreadCrumbComponent"; import { BreadcrumbItem } from "../misc/breadcrumb/definition/breadcrumb-item"; +import { TranslateService } from "@ngx-translate/core"; @Component({ selector: 'app-explore-dmp-listing-component', @@ -29,7 +30,8 @@ export class ExploreDmpListingComponent extends BaseComponent implements OnInit, constructor( private dmpService: DmpService, - private router: Router + private router: Router, + private language: TranslateService, ) { super(); } @@ -38,7 +40,11 @@ export class ExploreDmpListingComponent extends BaseComponent implements OnInit, this.refresh(); const breadCrumbs = []; - breadCrumbs.push({ parentComponentName: null, label: 'PUBLIC DMPS', url: "/explore-plans" }) + breadCrumbs.push({ + parentComponentName: null, + label: this.language.instant('NAV-BAR.PUBLIC DMPS'), + url: "/explore-plans" + }) this.breadCrumbs = Observable.of(breadCrumbs); } diff --git a/dmp-frontend/src/app/ui/misc/breadcrumb/breadcrumb.component.ts b/dmp-frontend/src/app/ui/misc/breadcrumb/breadcrumb.component.ts index a2aeb685e..bbf88b72a 100644 --- a/dmp-frontend/src/app/ui/misc/breadcrumb/breadcrumb.component.ts +++ b/dmp-frontend/src/app/ui/misc/breadcrumb/breadcrumb.component.ts @@ -6,6 +6,7 @@ import { BreadCrumbResolverService } from './service/breadcrumb.service'; import { DashboardService } from '../../../core/services/dashboard/dashboard.service'; import { assertDataInRangeInternal } from '@angular/core/src/render3/util'; import { url } from 'inspector'; +import { TranslateService } from '@ngx-translate/core'; @Component({ selector: 'app-breadcrumb', @@ -22,19 +23,22 @@ export class BreadcrumbComponent implements OnInit { constructor( public activatedRoute: ActivatedRoute, private router: Router, - private breadCrumbService: BreadCrumbResolverService + private breadCrumbService: BreadCrumbResolverService, + private language: TranslateService, ) { - } ngOnInit() { - } buildBreadCrumb(route: ActivatedRoute): Observable { if (this.breadCrumbService.resolve(route)) { return this.breadCrumbService.resolve(route).map(x => { - x.unshift({ label: 'HOME', url: '/home', icon: 'dashboard' }); return x; + x.unshift({ + label: this.language.instant('NAV-BAR.HOME'), + url: '/home', + icon: 'dashboard' + }); return x; }); } return Observable.of([]); diff --git a/dmp-frontend/src/app/ui/project/editor/project-editor.component.ts b/dmp-frontend/src/app/ui/project/editor/project-editor.component.ts index 54754152c..a6cd0c991 100644 --- a/dmp-frontend/src/app/ui/project/editor/project-editor.component.ts +++ b/dmp-frontend/src/app/ui/project/editor/project-editor.component.ts @@ -60,14 +60,18 @@ export class ProjectEditorComponent extends BaseComponent implements OnInit, IBr .subscribe(data => { this.project = new ProjectEditorModel().fromModel(data); this.formGroup = this.project.buildForm(null, this.project.type === ProjectType.External || !this.editMode); - this.breadCrumbs = Observable.of([ - { parentComponentName: 'ProjectListingComponent', label: 'Projects', url: '/projects' }, - ]); + this.breadCrumbs = Observable.of([{ + parentComponentName: 'ProjectListingComponent', + label: this.language.instant('NAV-BAR.PROJECTS'), + url: '/projects' + }]); }); } else { - this.breadCrumbs = Observable.of([ - { parentComponentName: 'ProjectListingComponent', label: 'Projects', url: '/projects' }, - ]); + this.breadCrumbs = Observable.of([{ + parentComponentName: 'ProjectListingComponent', + label: this.language.instant('NAV-BAR.PROJECTS'), + url: '/projects' + }]); this.project = new ProjectEditorModel(); setTimeout(() => { this.formGroup = this.project.buildForm(); @@ -178,8 +182,8 @@ export class ProjectEditorComponent extends BaseComponent implements OnInit, IBr this.formGroup.disable(); } - public imgEnable():boolean{ - if(this.isNew || this.editMode){ + public imgEnable(): boolean { + if (this.isNew || this.editMode) { return true; } return false; @@ -198,7 +202,7 @@ export class ProjectEditorComponent extends BaseComponent implements OnInit, IBr const size: number = event.target.files[0].size; // Get file size. this.sizeError = size > this.maxFileSize; // Checks if file size is valid. const formdata: FormData = new FormData(); - if (!this.sizeError){ + if (!this.sizeError) { if (fileList instanceof FileList) { for (let i = 0; i < fileList.length; i++) { formdata.append('file', fileList[i]); @@ -207,8 +211,8 @@ export class ProjectEditorComponent extends BaseComponent implements OnInit, IBr formdata.append('file', fileList); } this.projectFileUploadService.uploadFile(formdata) - .pipe(takeUntil(this._destroyed)) - .subscribe(files => this.formGroup.get('files').patchValue(files)); + .pipe(takeUntil(this._destroyed)) + .subscribe(files => this.formGroup.get('files').patchValue(files)); } } } diff --git a/dmp-frontend/src/app/ui/quick-wizard/dmp-editor/dmp-editor-wizard.component.ts b/dmp-frontend/src/app/ui/quick-wizard/dmp-editor/dmp-editor-wizard.component.ts index 5c88d7e41..7d64018f2 100644 --- a/dmp-frontend/src/app/ui/quick-wizard/dmp-editor/dmp-editor-wizard.component.ts +++ b/dmp-frontend/src/app/ui/quick-wizard/dmp-editor/dmp-editor-wizard.component.ts @@ -18,148 +18,142 @@ import { DmpEditorWizardModel } from './dmp-editor-wizard-model'; @Component({ - selector: 'app-quick-wizard-dmp-editor-component', - templateUrl: 'dmp-editor-wizard.component.html', - styleUrls: ['./dmp-editor-wizard.component.scss'] + selector: 'app-quick-wizard-dmp-editor-component', + templateUrl: 'dmp-editor-wizard.component.html', + styleUrls: ['./dmp-editor-wizard.component.scss'] }) export class DmpEditorWizardComponent extends BaseComponent implements OnInit, IBreadCrumbComponent { - breadCrumbs: Observable = Observable.of([]); + breadCrumbs: Observable = Observable.of([]); - isNew = true; - dmp: DmpEditorWizardModel; - @Input() formGroup: FormGroup; - @Input() dmpLabel: string; - @Input() datasetFormGroup: FormGroup; - //formGroup: FormGroup = null; - private uiNotificationService: UiNotificationService + isNew = true; + dmp: DmpEditorWizardModel; + @Input() formGroup: FormGroup; + @Input() dmpLabel: string; + @Input() datasetFormGroup: FormGroup; + //formGroup: FormGroup = null; + private uiNotificationService: UiNotificationService - profilesAutoCompleteConfiguration: SingleAutoCompleteConfiguration; - filteredProfiles: DatasetProfileModel[]; - filteredProfilesAsync = false; + profilesAutoCompleteConfiguration: SingleAutoCompleteConfiguration; + filteredProfiles: DatasetProfileModel[]; + filteredProfilesAsync = false; - constructor( - public snackBar: MatSnackBar, - public router: Router, - private route: ActivatedRoute, - private _service: DmpService, - public language: TranslateService - ) { - super(); - } + constructor( + public snackBar: MatSnackBar, + public router: Router, + private route: ActivatedRoute, + private _service: DmpService, + public language: TranslateService + ) { + super(); + } - ngOnInit(): void { + ngOnInit(): void { - this.profilesAutoCompleteConfiguration = { - filterFn: this.filterProfiles.bind(this), - initialItems: (extraData) => this.filterProfiles(''), - displayFn: (item) => item['label'], - titleFn: (item) => item['label'] - }; + this.profilesAutoCompleteConfiguration = { + filterFn: this.filterProfiles.bind(this), + initialItems: (extraData) => this.filterProfiles(''), + displayFn: (item) => item['label'], + titleFn: (item) => item['label'] + }; + + if (this.formGroup == null) { + this.dmp = new DmpEditorWizardModel(); + this.formGroup = this.dmp.buildForm(); + } + this.formGroup.get('label').setValue(this.language.instant('QUICKWIZARD.CREATE-ADD.CREATE.QUICKWIZARD_CREATE.SECOND-STEP.DMP-NAME') + this.dmpLabel); + this.formGroup.get('label').setValue(this.language.instant('QUICKWIZARD.CREATE-ADD.CREATE.QUICKWIZARD_CREATE.SECOND-STEP.DMP-NAME') + this.dmpLabel); + + this.breadCrumbs = Observable.of([{ + parentComponentName: 'project', + label: this.language.instant('NAV-BAR.DMP'), + url: '/quick-wizard/dmp' + }]); + } + + formSubmit(): void { + this.touchAllFormFields(this.formGroup); + if (!this.isFormValid()) { return; } + this.onSubmit(); + } + + public isFormValid() { + return this.formGroup.valid; + } + + public touchAllFormFields(formControl: AbstractControl) { + if (formControl instanceof FormControl) { + formControl.markAsTouched(); + } else if (formControl instanceof FormGroup) { + Object.keys(formControl.controls).forEach(item => { + const control = formControl.get(item); + this.touchAllFormFields(control); + }); + } else if (formControl instanceof FormArray) { + formControl.controls.forEach(item => { + this.touchAllFormFields(item); + }); + } + } + + onSubmit(): void { + // this.projectService.createProject(this.formGroup.value) + // .pipe(takeUntil(this._destroyed)) + // .subscribe( + // complete => this.onCallbackSuccess(), + // error => this.onCallbackError(error) + // ); + } - if (this.formGroup == null) { - this.dmp = new DmpEditorWizardModel(); - this.formGroup = this.dmp.buildForm(); - } - this.formGroup.get('label').setValue(this.language.instant('QUICKWIZARD.CREATE-ADD.CREATE.QUICKWIZARD_CREATE.SECOND-STEP.DMP-NAME') + this.dmpLabel); - this.formGroup.get('label').setValue(this.language.instant('QUICKWIZARD.CREATE-ADD.CREATE.QUICKWIZARD_CREATE.SECOND-STEP.DMP-NAME') + this.dmpLabel); + onCallbackSuccess(): void { + this.uiNotificationService.snackBarNotification(this.isNew ? this.language.instant('GENERAL.SNACK-BAR.SUCCESSFUL-CREATION') : this.language.instant('GENERAL.SNACK-BAR.SUCCESSFUL-UPDATE'), SnackBarNotificationLevel.Success); + this.router.navigate(['/dmp']); + } - this.breadCrumbs = Observable.of([ - { - parentComponentName: 'project', - label: 'Dmp', - url: '/quick-wizard/dmp' - }] - ); + onCallbackError(errorResponse: any) { + this.setErrorModel(errorResponse.error.payload); + this.validateAllFormFields(this.formGroup); + } - } + public setErrorModel(validationErrorModel: ValidationErrorModel) { + Object.keys(validationErrorModel).forEach(item => { + (this.dmp.validationErrorModel)[item] = (validationErrorModel)[item]; + }); + } - formSubmit(): void { - this.touchAllFormFields(this.formGroup); - if (!this.isFormValid()) { return; } - this.onSubmit(); - } + public validateAllFormFields(formControl: AbstractControl) { + if (formControl instanceof FormControl) { + formControl.updateValueAndValidity({ emitEvent: false }); + } else if (formControl instanceof FormGroup) { + Object.keys(formControl.controls).forEach(item => { + const control = formControl.get(item); + this.validateAllFormFields(control); + }); + } else if (formControl instanceof FormArray) { + formControl.controls.forEach(item => { + this.validateAllFormFields(item); + }); + } + } - public isFormValid() { - return this.formGroup.valid; - } + filterProfiles(value: string): Observable { - public touchAllFormFields(formControl: AbstractControl) { - if (formControl instanceof FormControl) { - formControl.markAsTouched(); - } else if (formControl instanceof FormGroup) { - Object.keys(formControl.controls).forEach(item => { - const control = formControl.get(item); - this.touchAllFormFields(control); - }); - } else if (formControl instanceof FormArray) { - formControl.controls.forEach(item => { - this.touchAllFormFields(item); - }); - } - } + this.filteredProfiles = undefined; + this.filteredProfilesAsync = true; - onSubmit(): void { - // this.projectService.createProject(this.formGroup.value) - // .pipe(takeUntil(this._destroyed)) - // .subscribe( - // complete => this.onCallbackSuccess(), - // error => this.onCallbackError(error) - // ); - } + const request = new RequestItem(); + const criteria = new DatasetProfileCriteria(); + criteria.like = value; + request.criteria = criteria; + return this._service.searchDMPProfiles(request); + } - - onCallbackSuccess(): void { - this.uiNotificationService.snackBarNotification(this.isNew ? this.language.instant('GENERAL.SNACK-BAR.SUCCESSFUL-CREATION') : this.language.instant('GENERAL.SNACK-BAR.SUCCESSFUL-UPDATE'), SnackBarNotificationLevel.Success); - this.router.navigate(['/dmp']); - } - - onCallbackError(errorResponse: any) { - this.setErrorModel(errorResponse.error.payload); - this.validateAllFormFields(this.formGroup); - } - - public setErrorModel(validationErrorModel: ValidationErrorModel) { - Object.keys(validationErrorModel).forEach(item => { - (this.dmp.validationErrorModel)[item] = (validationErrorModel)[item]; - }); - } - - public validateAllFormFields(formControl: AbstractControl) { - if (formControl instanceof FormControl) { - formControl.updateValueAndValidity({ emitEvent: false }); - } else if (formControl instanceof FormGroup) { - Object.keys(formControl.controls).forEach(item => { - const control = formControl.get(item); - this.validateAllFormFields(control); - }); - } else if (formControl instanceof FormArray) { - formControl.controls.forEach(item => { - this.validateAllFormFields(item); - }); - } - } - - filterProfiles(value: string): Observable { - - this.filteredProfiles = undefined; - this.filteredProfilesAsync = true; - - const request = new RequestItem(); - const criteria = new DatasetProfileCriteria(); - criteria.like = value; - request.criteria = criteria; - return this._service.searchDMPProfiles(request); - } - - datasetIsEmpty() { - if (this.datasetFormGroup && this.datasetFormGroup.get('datasetsList') && (this.datasetFormGroup.get('datasetsList') as FormArray).length != 0) { - return true; - } - return false; - } - - -} \ No newline at end of file + datasetIsEmpty() { + if (this.datasetFormGroup && this.datasetFormGroup.get('datasetsList') && (this.datasetFormGroup.get('datasetsList') as FormArray).length != 0) { + return true; + } + return false; + } +} diff --git a/dmp-frontend/src/app/ui/quick-wizard/project-editor/project-editor-wizard.component.ts b/dmp-frontend/src/app/ui/quick-wizard/project-editor/project-editor-wizard.component.ts index 2614bc76f..ca00db149 100644 --- a/dmp-frontend/src/app/ui/quick-wizard/project-editor/project-editor-wizard.component.ts +++ b/dmp-frontend/src/app/ui/quick-wizard/project-editor/project-editor-wizard.component.ts @@ -17,164 +17,156 @@ import { IBreadCrumbComponent } from '../../misc/breadcrumb/definition/IBreadCru import { ProjectEditorWizardModel } from './project-editor-wizard-model'; @Component({ - selector: 'app-quick-wizard-project-editor-component', - templateUrl: 'project-editor-wizard.component.html', - styleUrls: ['./project-editor-wizard.component.scss'] + selector: 'app-quick-wizard-project-editor-component', + templateUrl: 'project-editor-wizard.component.html', + styleUrls: ['./project-editor-wizard.component.scss'] }) export class ProjectEditorWizardComponent extends BaseComponent implements OnInit, IBreadCrumbComponent { - breadCrumbs: Observable = Observable.of([]); + breadCrumbs: Observable = Observable.of([]); - isNew = false; - project: ProjectEditorWizardModel; - @Input() formGroup: FormGroup; - //formGroup: FormGroup = null; - private uiNotificationService: UiNotificationService + isNew = false; + project: ProjectEditorWizardModel; + @Input() formGroup: FormGroup; + //formGroup: FormGroup = null; + private uiNotificationService: UiNotificationService - projectAutoCompleteConfiguration: SingleAutoCompleteConfiguration; + projectAutoCompleteConfiguration: SingleAutoCompleteConfiguration; - constructor( - public snackBar: MatSnackBar, - private route: ActivatedRoute, - public router: Router, - public language: TranslateService, - private projectService: ProjectService, - public languageResolverService: LanguageResolverService, - ) { - super(); - } + constructor( + public snackBar: MatSnackBar, + private route: ActivatedRoute, + public router: Router, + public language: TranslateService, + private projectService: ProjectService, + public languageResolverService: LanguageResolverService, + ) { + super(); + } - ngOnInit() { - this.breadCrumbs = Observable.of([ - { - parentComponentName: 'QuickCreate', - label: 'Project', - url: '/quick-wizard/project' - }] - ); + ngOnInit() { + this.breadCrumbs = Observable.of([{ + parentComponentName: 'QuickCreate', + label: this.language.instant('NAV-BAR.PROJECT'), + url: '/quick-wizard/project' + }]); - const projectRequestItem: RequestItem = new RequestItem(); - projectRequestItem.criteria = new ProjectCriteria(); + const projectRequestItem: RequestItem = new RequestItem(); + projectRequestItem.criteria = new ProjectCriteria(); - this.projectAutoCompleteConfiguration = { - filterFn: this.searchProject.bind(this), - initialItems: (extraData) => this.searchProject(''), - displayFn: (item) => item['label'], - titleFn: (item) => item['label'] - }; + this.projectAutoCompleteConfiguration = { + filterFn: this.searchProject.bind(this), + initialItems: (extraData) => this.searchProject(''), + displayFn: (item) => item['label'], + titleFn: (item) => item['label'] + }; - if (!this.formGroup) { - this.project = new ProjectEditorWizardModel(); - this.formGroup = this.project.buildForm(); - } + if (!this.formGroup) { + this.project = new ProjectEditorWizardModel(); + this.formGroup = this.project.buildForm(); + } - this.formGroup.get('existProject').enable(); - this.formGroup.get('label').disable(); - this.formGroup.get('description').disable(); + this.formGroup.get('existProject').enable(); + this.formGroup.get('label').disable(); + this.formGroup.get('description').disable(); + // this.route.params + // .pipe(takeUntil(this._destroyed)) + // .subscribe((params: Params) => { + // const itemId = params['id']; + // if (itemId != null) { + // this.isNew = false; + // this.projectService.getSingle(itemId).map(data => data as ProjectListingModel) + // .pipe(takeUntil(this._destroyed)) + // .subscribe(data => { + // this.project = new ProjectEditorModel().fromModel(data); + // this.formGroup = this.project.buildForm(null, this.project.type === ProjectType.External || !this.editMode); + // this.breadCrumbs = Observable.of([ + // { parentComponentName: 'ProjectListingComponent', label: 'Projects', url: '/projects' }, + // ]); + // }); + // } else { + // this.breadCrumbs = Observable.of([ + // { parentComponentName: 'QuickWizardComponent', label: 'Projects', url: '/projects' }, + // ]); + // this.project = new ProjectEditorWizardModel(); + // setTimeout(() => { + // this.formGroup = this.project.buildForm(); + // }); + // } + // }); + } - - // this.route.params - // .pipe(takeUntil(this._destroyed)) - // .subscribe((params: Params) => { - // const itemId = params['id']; + public isFormValid() { + return this.formGroup.valid; + } - // if (itemId != null) { - // this.isNew = false; - // this.projectService.getSingle(itemId).map(data => data as ProjectListingModel) - // .pipe(takeUntil(this._destroyed)) - // .subscribe(data => { - // this.project = new ProjectEditorModel().fromModel(data); - // this.formGroup = this.project.buildForm(null, this.project.type === ProjectType.External || !this.editMode); - // this.breadCrumbs = Observable.of([ - // { parentComponentName: 'ProjectListingComponent', label: 'Projects', url: '/projects' }, - // ]); - // }); - // } else { - // this.breadCrumbs = Observable.of([ - // { parentComponentName: 'QuickWizardComponent', label: 'Projects', url: '/projects' }, - // ]); - // this.project = new ProjectEditorWizardModel(); - // setTimeout(() => { - // this.formGroup = this.project.buildForm(); - // }); - // } - // }); - } + public touchAllFormFields(formControl: AbstractControl) { + if (formControl instanceof FormControl) { + formControl.markAsTouched(); + } else if (formControl instanceof FormGroup) { + Object.keys(formControl.controls).forEach(item => { + const control = formControl.get(item); + this.touchAllFormFields(control); + }); + } else if (formControl instanceof FormArray) { + formControl.controls.forEach(item => { + this.touchAllFormFields(item); + }); + } + } + onCallbackSuccess(): void { + this.uiNotificationService.snackBarNotification(this.isNew ? this.language.instant('GENERAL.SNACK-BAR.SUCCESSFUL-CREATION') : this.language.instant('GENERAL.SNACK-BAR.SUCCESSFUL-UPDATE'), SnackBarNotificationLevel.Success); + this.router.navigate(['/project']); + } - public isFormValid() { - return this.formGroup.valid; - } + onCallbackError(errorResponse: any) { + this.setErrorModel(errorResponse.error.payload); + this.validateAllFormFields(this.formGroup); + } - public touchAllFormFields(formControl: AbstractControl) { - if (formControl instanceof FormControl) { - formControl.markAsTouched(); - } else if (formControl instanceof FormGroup) { - Object.keys(formControl.controls).forEach(item => { - const control = formControl.get(item); - this.touchAllFormFields(control); - }); - } else if (formControl instanceof FormArray) { - formControl.controls.forEach(item => { - this.touchAllFormFields(item); - }); - } - } + public setErrorModel(validationErrorModel: ValidationErrorModel) { + Object.keys(validationErrorModel).forEach(item => { + (this.project.validationErrorModel)[item] = (validationErrorModel)[item]; + }); + } - onCallbackSuccess(): void { - this.uiNotificationService.snackBarNotification(this.isNew ? this.language.instant('GENERAL.SNACK-BAR.SUCCESSFUL-CREATION') : this.language.instant('GENERAL.SNACK-BAR.SUCCESSFUL-UPDATE'), SnackBarNotificationLevel.Success); - this.router.navigate(['/project']); - } + public validateAllFormFields(formControl: AbstractControl) { + if (formControl instanceof FormControl) { + formControl.updateValueAndValidity({ emitEvent: false }); + } else if (formControl instanceof FormGroup) { + Object.keys(formControl.controls).forEach(item => { + const control = formControl.get(item); + this.validateAllFormFields(control); + }); + } else if (formControl instanceof FormArray) { + formControl.controls.forEach(item => { + this.validateAllFormFields(item); + }); + } + } - onCallbackError(errorResponse: any) { - this.setErrorModel(errorResponse.error.payload); - this.validateAllFormFields(this.formGroup); - } + searchProject(query: string) { + const projectRequestItem: RequestItem = new RequestItem(); + projectRequestItem.criteria = new ProjectCriteria(); + projectRequestItem.criteria.like = query; + return this.projectService.getWithExternal(projectRequestItem); + } - public setErrorModel(validationErrorModel: ValidationErrorModel) { - Object.keys(validationErrorModel).forEach(item => { - (this.project.validationErrorModel)[item] = (validationErrorModel)[item]; - }); - } - - public validateAllFormFields(formControl: AbstractControl) { - if (formControl instanceof FormControl) { - formControl.updateValueAndValidity({ emitEvent: false }); - } else if (formControl instanceof FormGroup) { - Object.keys(formControl.controls).forEach(item => { - const control = formControl.get(item); - this.validateAllFormFields(control); - }); - } else if (formControl instanceof FormArray) { - formControl.controls.forEach(item => { - this.validateAllFormFields(item); - }); - } - } - - - searchProject(query: string) { - const projectRequestItem: RequestItem = new RequestItem(); - projectRequestItem.criteria = new ProjectCriteria(); - projectRequestItem.criteria.like = query; - return this.projectService.getWithExternal(projectRequestItem); - } - - create() { - this.isNew = !this.isNew; - if (this.isNew) { - this.formGroup.get('existProject').disable(); - this.formGroup.get('existProject').reset(); - this.formGroup.get('label').enable(); - this.formGroup.get('description').enable(); - } else { - this.formGroup.get('existProject').enable(); - this.formGroup.get('label').disable(); - this.formGroup.get('label').reset(); - this.formGroup.get('description').disable(); - this.formGroup.get('description').reset(); - } - } - -} \ No newline at end of file + create() { + this.isNew = !this.isNew; + if (this.isNew) { + this.formGroup.get('existProject').disable(); + this.formGroup.get('existProject').reset(); + this.formGroup.get('label').enable(); + this.formGroup.get('description').enable(); + } else { + this.formGroup.get('existProject').enable(); + this.formGroup.get('label').disable(); + this.formGroup.get('label').reset(); + this.formGroup.get('description').disable(); + this.formGroup.get('description').reset(); + } + } +} diff --git a/dmp-frontend/src/app/ui/quick-wizard/quick-wizard-editor/quick-wizard-editor.component.ts b/dmp-frontend/src/app/ui/quick-wizard/quick-wizard-editor/quick-wizard-editor.component.ts index 9dd8f4f92..1d33863e1 100644 --- a/dmp-frontend/src/app/ui/quick-wizard/quick-wizard-editor/quick-wizard-editor.component.ts +++ b/dmp-frontend/src/app/ui/quick-wizard/quick-wizard-editor/quick-wizard-editor.component.ts @@ -47,14 +47,11 @@ export class QuickWizardEditorComponent extends BaseComponent implements OnInit, this.quickWizard = new QuickWizardEditorWizardModel(); this.quickWizard.project = new ProjectEditorWizardModel(); this.formGroup = this.quickWizard.buildForm(); - this.breadCrumbs = Observable.of([ - { - parentComponentName: 'Dashboard', - label: 'DMP Wizard', - url: '/quick-wizard' - }] - ); - + this.breadCrumbs = Observable.of([{ + parentComponentName: 'Dashboard', + label: this.language.instant('NAV-BAR.DMP-WIZARD'), + url: '/quick-wizard' + }]); } isActive(step: string): boolean { diff --git a/dmp-frontend/src/assets/i18n/en.json b/dmp-frontend/src/assets/i18n/en.json index 218152e97..9ae12f1b4 100644 --- a/dmp-frontend/src/assets/i18n/en.json +++ b/dmp-frontend/src/assets/i18n/en.json @@ -51,13 +51,25 @@ "BREADCRUMB-ROOT": "Dashboard", "TITLE": "OpenDMP", "PROJECTS": "Projects", + "PROJECT": "Project", + "DMP": "Dmp", "DMPS": "DMPs", "DATASETS": "Datasets", "PUBLIC-DATASETS": "Explore OpenDMP", "USERS": "Users", "DATASETS-ADMIN": "Dataset Profiles", "DMP-PROFILES": "DMP Profiles", - "ABOUT": "About" + "ABOUT": "About", + "DATASET-DESCRIPTIONS": "DATASET DESCRIPTIONS", + "DATASET-DESCRIPTION-WIZARD": "Dataset description wizard", + "PUBLIC DATASETS": "PUBLIC DATASETS", + "PUBLIC DMPS": "PUBLIC DMPS", + "HOME": "HOME", + "DMP-WIZARD": "DMP Wizard", + "DATASET-TEMPLATES": "DATASET TEMPLATES", + "TEMPLATE": "TEMPLATE", + "DMP-TEMPLATES": "DMP TEMPLATES", + "USERS-BREADCRUMB": "USERS" }, "SIDE-BAR": { "GENERAL": "GENERAL",