Adds missing breadcrumbs.
This commit is contained in:
parent
4f727e5f2e
commit
fadaa9bbcb
|
@ -17,6 +17,8 @@ import { DatasetProfileEditorModel } from './dataset-profile-editor-model';
|
||||||
import { ConfirmationDialogComponent } from '../../../../library/confirmation-dialog/confirmation-dialog.component';
|
import { ConfirmationDialogComponent } from '../../../../library/confirmation-dialog/confirmation-dialog.component';
|
||||||
import { DatasetProfileEnum } from '../../../../core/common/enum/dataset-profile';
|
import { DatasetProfileEnum } from '../../../../core/common/enum/dataset-profile';
|
||||||
import * as FileSaver from 'file-saver';
|
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';
|
//import * as data from 'src/assets/resources/skipDisable.json';
|
||||||
|
|
||||||
const skipDisable: any[] = require('../../../../../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;
|
private datasetProfileId: string;
|
||||||
newVersionId: string;
|
newVersionId: string;
|
||||||
dataWizardModel: DatasetWizardModel;
|
dataWizardModel: DatasetWizardModel;
|
||||||
|
breadCrumbs: Observable<BreadcrumbItem[]>;
|
||||||
@ViewChild('stepper') stepper: MatHorizontalStepper;
|
@ViewChild('stepper') stepper: MatHorizontalStepper;
|
||||||
viewOnly = false;
|
viewOnly = false;
|
||||||
|
|
||||||
|
@ -82,6 +85,11 @@ export class DatasetProfileEditorComponent extends BaseComponent implements OnIn
|
||||||
},
|
},
|
||||||
error => this.onCallbackError(error)
|
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) {
|
} else if (cloneId != null) {
|
||||||
this.datasetProfileService.clone(cloneId)
|
this.datasetProfileService.clone(cloneId)
|
||||||
.pipe(map(data => data as DatasetProfile), takeUntil(this._destroyed))
|
.pipe(map(data => data as DatasetProfile), takeUntil(this._destroyed))
|
||||||
|
|
|
@ -15,6 +15,7 @@ import { DatasetProfileCriteriaComponent } from './criteria/dataset-profile.comp
|
||||||
import { error } from 'selenium-webdriver';
|
import { error } from 'selenium-webdriver';
|
||||||
import { UiNotificationService, SnackBarNotificationLevel } from '../../../../core/services/notification/ui-notification-service';
|
import { UiNotificationService, SnackBarNotificationLevel } from '../../../../core/services/notification/ui-notification-service';
|
||||||
import { TranslateService } from '@ngx-translate/core';
|
import { TranslateService } from '@ngx-translate/core';
|
||||||
|
import { BreadcrumbItem } from '../../../misc/breadcrumb/definition/breadcrumb-item';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-dataset-profile-listing-component',
|
selector: 'app-dataset-profile-listing-component',
|
||||||
|
@ -27,6 +28,7 @@ export class DatasetProfileListingComponent extends BaseComponent implements OnI
|
||||||
@ViewChild(MatSort) sort: MatSort;
|
@ViewChild(MatSort) sort: MatSort;
|
||||||
@ViewChild(DatasetProfileCriteriaComponent) criteria: DatasetProfileCriteriaComponent;
|
@ViewChild(DatasetProfileCriteriaComponent) criteria: DatasetProfileCriteriaComponent;
|
||||||
|
|
||||||
|
breadCrumbs: Observable<BreadcrumbItem[]>;
|
||||||
dataSource: DatasetDataSource | null;
|
dataSource: DatasetDataSource | null;
|
||||||
displayedColumns: String[] = ['label', 'description', 'created', 'actions'];
|
displayedColumns: String[] = ['label', 'description', 'created', 'actions'];
|
||||||
pageEvent: PageEvent;
|
pageEvent: PageEvent;
|
||||||
|
@ -55,16 +57,24 @@ export class DatasetProfileListingComponent extends BaseComponent implements OnI
|
||||||
this.criteria.setCriteria(this.getDefaultCriteria());
|
this.criteria.setCriteria(this.getDefaultCriteria());
|
||||||
this.refresh();
|
this.refresh();
|
||||||
this.criteria.setRefreshCallback(() => 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 {
|
} else {
|
||||||
this.itemId = params['groupId'];
|
this.itemId = params['groupId'];
|
||||||
|
|
||||||
if (this.itemId) {
|
if (this.itemId) {
|
||||||
const datasetProfileLabel = this.route.snapshot.queryParams.groupLabel;
|
const datasetProfileLabel = this.route.snapshot.queryParams.groupLabel;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.criteria.setCriteria(this.getDefaultCriteria());
|
this.criteria.setCriteria(this.getDefaultCriteria());
|
||||||
this.refresh();
|
this.refresh();
|
||||||
this.criteria.setRefreshCallback(() => this.refresh());
|
this.criteria.setRefreshCallback(() => this.refresh());
|
||||||
|
this.breadCrumbs = Observable.of([{
|
||||||
|
parentComponentName: null,
|
||||||
|
label: this.language.instant('NAV-BAR.DATASET-TEMPLATES'),
|
||||||
|
url: '/dataset-profiles'
|
||||||
|
}]);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,6 +15,8 @@ import { DmpProfileService } from '../../../../core/services/dmp/dmp-profile.ser
|
||||||
import { SnackBarNotificationLevel, UiNotificationService } from '../../../../core/services/notification/ui-notification-service';
|
import { SnackBarNotificationLevel, UiNotificationService } from '../../../../core/services/notification/ui-notification-service';
|
||||||
import { EnumUtils } from '../../../../core/services/utilities/enum-utils.service';
|
import { EnumUtils } from '../../../../core/services/utilities/enum-utils.service';
|
||||||
import { DmpProfileEditorModel, DmpProfileFieldEditorModel } from './dmp-profile-editor.model';
|
import { DmpProfileEditorModel, DmpProfileFieldEditorModel } from './dmp-profile-editor.model';
|
||||||
|
import { BreadcrumbItem } from '../../../misc/breadcrumb/definition/breadcrumb-item';
|
||||||
|
import { Observable } from 'rxjs';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-dmp-profile-editor-component',
|
selector: 'app-dmp-profile-editor-component',
|
||||||
|
@ -29,6 +31,7 @@ export class DmpProfileEditorComponent extends BaseComponent implements AfterVie
|
||||||
formGroup: FormGroup = null;
|
formGroup: FormGroup = null;
|
||||||
host = environment.Server;
|
host = environment.Server;
|
||||||
dmpProfileId: string;
|
dmpProfileId: string;
|
||||||
|
breadCrumbs: Observable<BreadcrumbItem[]>;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private dmpProfileService: DmpProfileService,
|
private dmpProfileService: DmpProfileService,
|
||||||
|
@ -58,12 +61,22 @@ export class DmpProfileEditorComponent extends BaseComponent implements AfterVie
|
||||||
this.formGroup.disable();
|
this.formGroup.disable();
|
||||||
this.viewOnly = true
|
this.viewOnly = true
|
||||||
}
|
}
|
||||||
|
this.breadCrumbs = Observable.of([{
|
||||||
|
parentComponentName: 'DmpProfileListingComponent',
|
||||||
|
label: this.language.instant('NAV-BAR.TEMPLATE'),
|
||||||
|
url: '/dmp-profiles/' + this.dmpProfileId
|
||||||
|
}]);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.dmpProfileModel = new DmpProfileEditorModel();
|
this.dmpProfileModel = new DmpProfileEditorModel();
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.formGroup = this.dmpProfileModel.buildForm();
|
this.formGroup = this.dmpProfileModel.buildForm();
|
||||||
});
|
});
|
||||||
|
this.breadCrumbs = Observable.of([{
|
||||||
|
parentComponentName: 'DmpProfileListingComponent',
|
||||||
|
label: this.language.instant('NAV-BAR.TEMPLATE'),
|
||||||
|
url: '/dmp-profiles/' + this.dmpProfileId
|
||||||
|
}]);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,6 +11,7 @@ import { DmpProfileCriteria } from '../../../../core/query/dmp/dmp-profile-crite
|
||||||
import { DmpProfileService } from '../../../../core/services/dmp/dmp-profile.service';
|
import { DmpProfileService } from '../../../../core/services/dmp/dmp-profile.service';
|
||||||
import { DataTableRequest } from '../../../../core/model/data-table/data-table-request';
|
import { DataTableRequest } from '../../../../core/model/data-table/data-table-request';
|
||||||
import { DmpProfileCriteriaComponent } from './criteria/dmp-profile-criteria.component';
|
import { DmpProfileCriteriaComponent } from './criteria/dmp-profile-criteria.component';
|
||||||
|
import { BreadcrumbItem } from '../../../misc/breadcrumb/definition/breadcrumb-item';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-dmp-profile-listing-component',
|
selector: 'app-dmp-profile-listing-component',
|
||||||
|
@ -28,6 +29,7 @@ export class DmpProfileListingComponent extends BaseComponent implements OnInit
|
||||||
pageEvent: PageEvent;
|
pageEvent: PageEvent;
|
||||||
titlePrefix: String;
|
titlePrefix: String;
|
||||||
dmpId: String;
|
dmpId: String;
|
||||||
|
breadCrumbs: Observable<BreadcrumbItem[]>;
|
||||||
|
|
||||||
statuses = [
|
statuses = [
|
||||||
{ value: '0', viewValue: 'Active' },
|
{ value: '0', viewValue: 'Active' },
|
||||||
|
@ -44,7 +46,6 @@ export class DmpProfileListingComponent extends BaseComponent implements OnInit
|
||||||
super();
|
super();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.route.params
|
this.route.params
|
||||||
.pipe(takeUntil(this._destroyed))
|
.pipe(takeUntil(this._destroyed))
|
||||||
|
@ -53,6 +54,11 @@ export class DmpProfileListingComponent extends BaseComponent implements OnInit
|
||||||
this.criteria.setCriteria(this.getDefaultCriteria());
|
this.criteria.setCriteria(this.getDefaultCriteria());
|
||||||
this.refresh();
|
this.refresh();
|
||||||
this.criteria.setRefreshCallback(() => 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;
|
// debugger;
|
||||||
// this.datasetService.makeDatasetPublic(id).pipe(takeUntil(this._destroyed)).subscribe();
|
// this.datasetService.makeDatasetPublic(id).pipe(takeUntil(this._destroyed)).subscribe();
|
||||||
// }
|
// }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export class DatasetDataSource extends DataSource<DmpProfileListing> {
|
export class DatasetDataSource extends DataSource<DmpProfileListing> {
|
||||||
|
@ -96,7 +101,6 @@ export class DatasetDataSource extends DataSource<DmpProfileListing> {
|
||||||
//this._sort.matSortChange
|
//this._sort.matSortChange
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
return Observable.merge(...displayDataChanges)
|
return Observable.merge(...displayDataChanges)
|
||||||
.startWith(null)
|
.startWith(null)
|
||||||
.switchMap(() => {
|
.switchMap(() => {
|
||||||
|
|
|
@ -9,6 +9,7 @@ import { UserService } from '../../../../core/services/user/user.service';
|
||||||
import { SnackBarNotificationComponent } from '../../../../library/notification/snack-bar/snack-bar-notification.component';
|
import { SnackBarNotificationComponent } from '../../../../library/notification/snack-bar/snack-bar-notification.component';
|
||||||
import { DataTableRequest } from '../../../../core/model/data-table/data-table-request';
|
import { DataTableRequest } from '../../../../core/model/data-table/data-table-request';
|
||||||
import { UserCriteriaComponent } from './criteria/user-criteria.component';
|
import { UserCriteriaComponent } from './criteria/user-criteria.component';
|
||||||
|
import { BreadcrumbItem } from '../../../misc/breadcrumb/definition/breadcrumb-item';
|
||||||
|
|
||||||
export class UsersDataSource extends DataSource<UserListingModel> {
|
export class UsersDataSource extends DataSource<UserListingModel> {
|
||||||
|
|
||||||
|
@ -93,6 +94,7 @@ export class UserListingComponent implements OnInit, AfterViewInit {
|
||||||
@ViewChild(MatSort) sort: MatSort;
|
@ViewChild(MatSort) sort: MatSort;
|
||||||
@ViewChild(UserCriteriaComponent) criteria: UserCriteriaComponent;
|
@ViewChild(UserCriteriaComponent) criteria: UserCriteriaComponent;
|
||||||
|
|
||||||
|
breadCrumbs: Observable<BreadcrumbItem[]>;
|
||||||
dataSource: UsersDataSource | null;
|
dataSource: UsersDataSource | null;
|
||||||
displayedColumns: String[] = ['name', 'email', 'lastloggedin', 'roles'];
|
displayedColumns: String[] = ['name', 'email', 'lastloggedin', 'roles'];
|
||||||
|
|
||||||
|
@ -105,6 +107,11 @@ export class UserListingComponent implements OnInit, AfterViewInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
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
|
//this.refresh(); //called on ngAfterViewInit with default criteria
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -47,7 +47,7 @@ export class DatasetCreateWizard extends BaseComponent implements OnInit, IBread
|
||||||
this.breadCrumbs = Observable.of([
|
this.breadCrumbs = Observable.of([
|
||||||
{
|
{
|
||||||
parentComponentName: 'Dashboard',
|
parentComponentName: 'Dashboard',
|
||||||
label: 'Dataset description wizard',
|
label: this.language.instant('NAV-BAR.DATASET-DESCRIPTION-WIZARD'),
|
||||||
url: '/datasetcreatewizard'
|
url: '/datasetcreatewizard'
|
||||||
}]
|
}]
|
||||||
);
|
);
|
||||||
|
|
|
@ -136,7 +136,7 @@ export class DatasetWizardComponent extends BaseComponent implements OnInit, IBr
|
||||||
this.breadCrumbs = Observable.of([
|
this.breadCrumbs = Observable.of([
|
||||||
{
|
{
|
||||||
parentComponentName: null,
|
parentComponentName: null,
|
||||||
label: 'Datasets',
|
label: this.language.instant('NAV-BAR.DATASETS'),
|
||||||
url: '/datasets',
|
url: '/datasets',
|
||||||
notFoundResolver: [
|
notFoundResolver: [
|
||||||
{
|
{
|
||||||
|
@ -178,7 +178,7 @@ export class DatasetWizardComponent extends BaseComponent implements OnInit, IBr
|
||||||
this.breadCrumbs = Observable.of([
|
this.breadCrumbs = Observable.of([
|
||||||
{
|
{
|
||||||
parentComponentName: null,
|
parentComponentName: null,
|
||||||
label: 'Datasets',
|
label: this.language.instant('NAV-BAR.DATASETS'),
|
||||||
url: '/datasets',
|
url: '/datasets',
|
||||||
notFoundResolver: [
|
notFoundResolver: [
|
||||||
{
|
{
|
||||||
|
@ -214,7 +214,7 @@ export class DatasetWizardComponent extends BaseComponent implements OnInit, IBr
|
||||||
this.breadCrumbs = Observable.of([
|
this.breadCrumbs = Observable.of([
|
||||||
{
|
{
|
||||||
parentComponentName: null,
|
parentComponentName: null,
|
||||||
label: 'Datasets',
|
label: this.language.instant('NAV-BAR.DATASETS'),
|
||||||
url: '/datasets',
|
url: '/datasets',
|
||||||
notFoundResolver: [
|
notFoundResolver: [
|
||||||
{
|
{
|
||||||
|
@ -260,7 +260,7 @@ export class DatasetWizardComponent extends BaseComponent implements OnInit, IBr
|
||||||
this.breadCrumbs = Observable.of([
|
this.breadCrumbs = Observable.of([
|
||||||
{
|
{
|
||||||
parentComponentName: null,
|
parentComponentName: null,
|
||||||
label: 'Datasets',
|
label: this.language.instant('NAV-BAR.DATASETS'),
|
||||||
url: '/datasets',
|
url: '/datasets',
|
||||||
notFoundResolver: [
|
notFoundResolver: [
|
||||||
{
|
{
|
||||||
|
@ -286,7 +286,7 @@ export class DatasetWizardComponent extends BaseComponent implements OnInit, IBr
|
||||||
this.breadCrumbs = Observable.of([
|
this.breadCrumbs = Observable.of([
|
||||||
{
|
{
|
||||||
parentComponentName: null,
|
parentComponentName: null,
|
||||||
label: 'Datasets',
|
label: this.language.instant('NAV-BAR.DATASETS'),
|
||||||
url: '/datasets',
|
url: '/datasets',
|
||||||
notFoundResolver: [
|
notFoundResolver: [
|
||||||
{
|
{
|
||||||
|
|
|
@ -12,6 +12,7 @@ import { DmpService } from '../../../core/services/dmp/dmp.service';
|
||||||
import { BreadcrumbItem } from '../../misc/breadcrumb/definition/breadcrumb-item';
|
import { BreadcrumbItem } from '../../misc/breadcrumb/definition/breadcrumb-item';
|
||||||
import { IBreadCrumbComponent } from '../../misc/breadcrumb/definition/IBreadCrumbComponent';
|
import { IBreadCrumbComponent } from '../../misc/breadcrumb/definition/IBreadCrumbComponent';
|
||||||
import { DatasetCriteriaComponent } from './criteria/dataset-criteria.component';
|
import { DatasetCriteriaComponent } from './criteria/dataset-criteria.component';
|
||||||
|
import { TranslateService } from '@ngx-translate/core';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-dataset-listing-component',
|
selector: 'app-dataset-listing-component',
|
||||||
|
@ -38,6 +39,7 @@ export class DatasetListingComponent extends BaseComponent implements OnInit, IB
|
||||||
private router: Router,
|
private router: Router,
|
||||||
private route: ActivatedRoute,
|
private route: ActivatedRoute,
|
||||||
private dmpService: DmpService,
|
private dmpService: DmpService,
|
||||||
|
private language: TranslateService,
|
||||||
) {
|
) {
|
||||||
super();
|
super();
|
||||||
}
|
}
|
||||||
|
@ -56,7 +58,11 @@ export class DatasetListingComponent extends BaseComponent implements OnInit, IB
|
||||||
this.criteria.setCriteria(this.getDefaultCriteria(dmp));
|
this.criteria.setCriteria(this.getDefaultCriteria(dmp));
|
||||||
this.refresh();
|
this.refresh();
|
||||||
this.criteria.setRefreshCallback((resetPages) => this.refresh(resetPages));
|
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) {
|
if (params['dmpLabel'] !== undefined) {
|
||||||
this.titlePrefix = 'for ' + params['dmpLabel'];
|
this.titlePrefix = 'for ' + params['dmpLabel'];
|
||||||
}
|
}
|
||||||
|
@ -64,7 +70,11 @@ export class DatasetListingComponent extends BaseComponent implements OnInit, IB
|
||||||
this.criteria.setCriteria(this.getDefaultCriteria());
|
this.criteria.setCriteria(this.getDefaultCriteria());
|
||||||
this.refresh();
|
this.refresh();
|
||||||
this.criteria.setRefreshCallback((resetPages) => this.refresh(resetPages));
|
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) {
|
if (this.status != null && this.status == 0) {
|
||||||
|
|
|
@ -155,7 +155,11 @@ export class DmpEditorComponent extends BaseComponent implements OnInit, IBreadC
|
||||||
if (this.isAuthenticated) {
|
if (this.isAuthenticated) {
|
||||||
// if (!this.isAuthenticated) {
|
// if (!this.isAuthenticated) {
|
||||||
const breadCrumbs = [];
|
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();
|
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(
|
||||||
{
|
{
|
||||||
|
@ -196,7 +200,7 @@ export class DmpEditorComponent extends BaseComponent implements OnInit, IBreadC
|
||||||
this.breadCrumbs = Observable.of([
|
this.breadCrumbs = Observable.of([
|
||||||
{
|
{
|
||||||
parentComponentName: 'DmpListingComponent',
|
parentComponentName: 'DmpListingComponent',
|
||||||
label: 'DMPs',
|
label: this.language.instant('NAV-BAR.DMPS'),
|
||||||
url: 'plans',
|
url: 'plans',
|
||||||
notFoundResolver: [await this.projectService.getSingle(this.dmp.project.id).map(x => ({ label: x.label, url: '/projects/edit/' + x.id }) as BreadcrumbItem).toPromise()]
|
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([
|
this.breadCrumbs = Observable.of([
|
||||||
{
|
{
|
||||||
parentComponentName: 'DmpListingComponent',
|
parentComponentName: 'DmpListingComponent',
|
||||||
label: 'DMPs',
|
label: this.language.instant('NAV-BAR.DMPS'),
|
||||||
url: 'plans',
|
url: 'plans',
|
||||||
}
|
}
|
||||||
]);
|
]);
|
||||||
|
|
|
@ -14,6 +14,7 @@ import { BreadcrumbItem } from '../../misc/breadcrumb/definition/breadcrumb-item
|
||||||
import { IBreadCrumbComponent } from '../../misc/breadcrumb/definition/IBreadCrumbComponent';
|
import { IBreadCrumbComponent } from '../../misc/breadcrumb/definition/IBreadCrumbComponent';
|
||||||
import { DmpInvitationDialogComponent } from '../invitation/dmp-invitation.component';
|
import { DmpInvitationDialogComponent } from '../invitation/dmp-invitation.component';
|
||||||
import { DmpCriteriaComponent } from './criteria/dmp-criteria.component';
|
import { DmpCriteriaComponent } from './criteria/dmp-criteria.component';
|
||||||
|
import { TranslateService } from '@ngx-translate/core';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-dmp-listing-component',
|
selector: 'app-dmp-listing-component',
|
||||||
|
@ -39,7 +40,8 @@ export class DmpListingComponent extends BaseComponent implements OnInit, IBread
|
||||||
private router: Router,
|
private router: Router,
|
||||||
private route: ActivatedRoute,
|
private route: ActivatedRoute,
|
||||||
private dialog: MatDialog,
|
private dialog: MatDialog,
|
||||||
public enumUtils: EnumUtils
|
public enumUtils: EnumUtils,
|
||||||
|
private language: TranslateService,
|
||||||
) {
|
) {
|
||||||
super();
|
super();
|
||||||
}
|
}
|
||||||
|
@ -67,13 +69,18 @@ export class DmpListingComponent extends BaseComponent implements OnInit, IBread
|
||||||
|
|
||||||
if (this.itemId) {
|
if (this.itemId) {
|
||||||
const dmplabel = this.route.snapshot.queryParams.groupLabel;
|
const dmplabel = this.route.snapshot.queryParams.groupLabel;
|
||||||
breadCrumbs.push(
|
breadCrumbs.push({
|
||||||
{ parentComponentName: null, label: 'DMPs', url: '/plans' },
|
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.breadCrumbs = Observable.of(breadCrumbs);
|
||||||
|
|
||||||
this.criteria.setCriteria(this.getDefaultCriteria());
|
this.criteria.setCriteria(this.getDefaultCriteria());
|
||||||
this.refresh();
|
this.refresh();
|
||||||
this.criteria.setRefreshCallback((resetPages) => this.refresh(resetPages));
|
this.criteria.setRefreshCallback((resetPages) => this.refresh(resetPages));
|
||||||
|
|
|
@ -10,6 +10,7 @@ import { DatasetService } from '../../core/services/dataset/dataset.service';
|
||||||
import { IBreadCrumbComponent } from '../misc/breadcrumb/definition/IBreadCrumbComponent';
|
import { IBreadCrumbComponent } from '../misc/breadcrumb/definition/IBreadCrumbComponent';
|
||||||
import { BreadcrumbItem } from '../misc/breadcrumb/definition/breadcrumb-item';
|
import { BreadcrumbItem } from '../misc/breadcrumb/definition/breadcrumb-item';
|
||||||
import { Observable } from 'rxjs';
|
import { Observable } from 'rxjs';
|
||||||
|
import { TranslateService } from '@ngx-translate/core';
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
|
@ -30,6 +31,7 @@ export class ExploreDatasetListingComponent extends BaseComponent implements OnI
|
||||||
constructor(
|
constructor(
|
||||||
private datasetService: DatasetService,
|
private datasetService: DatasetService,
|
||||||
private router: Router,
|
private router: Router,
|
||||||
|
private language: TranslateService,
|
||||||
) {
|
) {
|
||||||
super();
|
super();
|
||||||
}
|
}
|
||||||
|
@ -38,7 +40,11 @@ export class ExploreDatasetListingComponent extends BaseComponent implements OnI
|
||||||
this.refresh();
|
this.refresh();
|
||||||
|
|
||||||
const breadCrumbs = [];
|
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);
|
this.breadCrumbs = Observable.of(breadCrumbs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10,6 +10,7 @@ import { DmpService } from "../../core/services/dmp/dmp.service";
|
||||||
import { Observable } from "rxjs";
|
import { Observable } from "rxjs";
|
||||||
import { IBreadCrumbComponent } from "../misc/breadcrumb/definition/IBreadCrumbComponent";
|
import { IBreadCrumbComponent } from "../misc/breadcrumb/definition/IBreadCrumbComponent";
|
||||||
import { BreadcrumbItem } from "../misc/breadcrumb/definition/breadcrumb-item";
|
import { BreadcrumbItem } from "../misc/breadcrumb/definition/breadcrumb-item";
|
||||||
|
import { TranslateService } from "@ngx-translate/core";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-explore-dmp-listing-component',
|
selector: 'app-explore-dmp-listing-component',
|
||||||
|
@ -29,7 +30,8 @@ export class ExploreDmpListingComponent extends BaseComponent implements OnInit,
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private dmpService: DmpService,
|
private dmpService: DmpService,
|
||||||
private router: Router
|
private router: Router,
|
||||||
|
private language: TranslateService,
|
||||||
) {
|
) {
|
||||||
super();
|
super();
|
||||||
}
|
}
|
||||||
|
@ -38,7 +40,11 @@ export class ExploreDmpListingComponent extends BaseComponent implements OnInit,
|
||||||
this.refresh();
|
this.refresh();
|
||||||
|
|
||||||
const breadCrumbs = [];
|
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);
|
this.breadCrumbs = Observable.of(breadCrumbs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,6 +6,7 @@ import { BreadCrumbResolverService } from './service/breadcrumb.service';
|
||||||
import { DashboardService } from '../../../core/services/dashboard/dashboard.service';
|
import { DashboardService } from '../../../core/services/dashboard/dashboard.service';
|
||||||
import { assertDataInRangeInternal } from '@angular/core/src/render3/util';
|
import { assertDataInRangeInternal } from '@angular/core/src/render3/util';
|
||||||
import { url } from 'inspector';
|
import { url } from 'inspector';
|
||||||
|
import { TranslateService } from '@ngx-translate/core';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-breadcrumb',
|
selector: 'app-breadcrumb',
|
||||||
|
@ -22,19 +23,22 @@ export class BreadcrumbComponent implements OnInit {
|
||||||
constructor(
|
constructor(
|
||||||
public activatedRoute: ActivatedRoute,
|
public activatedRoute: ActivatedRoute,
|
||||||
private router: Router,
|
private router: Router,
|
||||||
private breadCrumbService: BreadCrumbResolverService
|
private breadCrumbService: BreadCrumbResolverService,
|
||||||
|
private language: TranslateService,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
buildBreadCrumb(route: ActivatedRoute): Observable<BreadcrumbItem[]> {
|
buildBreadCrumb(route: ActivatedRoute): Observable<BreadcrumbItem[]> {
|
||||||
if (this.breadCrumbService.resolve(route)) {
|
if (this.breadCrumbService.resolve(route)) {
|
||||||
return this.breadCrumbService.resolve(route).map(x => {
|
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([]);
|
return Observable.of([]);
|
||||||
|
|
|
@ -60,14 +60,18 @@ export class ProjectEditorComponent extends BaseComponent implements OnInit, IBr
|
||||||
.subscribe(data => {
|
.subscribe(data => {
|
||||||
this.project = new ProjectEditorModel().fromModel(data);
|
this.project = new ProjectEditorModel().fromModel(data);
|
||||||
this.formGroup = this.project.buildForm(null, this.project.type === ProjectType.External || !this.editMode);
|
this.formGroup = this.project.buildForm(null, this.project.type === ProjectType.External || !this.editMode);
|
||||||
this.breadCrumbs = Observable.of([
|
this.breadCrumbs = Observable.of([{
|
||||||
{ parentComponentName: 'ProjectListingComponent', label: 'Projects', url: '/projects' },
|
parentComponentName: 'ProjectListingComponent',
|
||||||
]);
|
label: this.language.instant('NAV-BAR.PROJECTS'),
|
||||||
|
url: '/projects'
|
||||||
|
}]);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.breadCrumbs = Observable.of([
|
this.breadCrumbs = Observable.of([{
|
||||||
{ parentComponentName: 'ProjectListingComponent', label: 'Projects', url: '/projects' },
|
parentComponentName: 'ProjectListingComponent',
|
||||||
]);
|
label: this.language.instant('NAV-BAR.PROJECTS'),
|
||||||
|
url: '/projects'
|
||||||
|
}]);
|
||||||
this.project = new ProjectEditorModel();
|
this.project = new ProjectEditorModel();
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.formGroup = this.project.buildForm();
|
this.formGroup = this.project.buildForm();
|
||||||
|
@ -178,8 +182,8 @@ export class ProjectEditorComponent extends BaseComponent implements OnInit, IBr
|
||||||
this.formGroup.disable();
|
this.formGroup.disable();
|
||||||
}
|
}
|
||||||
|
|
||||||
public imgEnable():boolean{
|
public imgEnable(): boolean {
|
||||||
if(this.isNew || this.editMode){
|
if (this.isNew || this.editMode) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
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.
|
const size: number = event.target.files[0].size; // Get file size.
|
||||||
this.sizeError = size > this.maxFileSize; // Checks if file size is valid.
|
this.sizeError = size > this.maxFileSize; // Checks if file size is valid.
|
||||||
const formdata: FormData = new FormData();
|
const formdata: FormData = new FormData();
|
||||||
if (!this.sizeError){
|
if (!this.sizeError) {
|
||||||
if (fileList instanceof FileList) {
|
if (fileList instanceof FileList) {
|
||||||
for (let i = 0; i < fileList.length; i++) {
|
for (let i = 0; i < fileList.length; i++) {
|
||||||
formdata.append('file', fileList[i]);
|
formdata.append('file', fileList[i]);
|
||||||
|
|
|
@ -58,7 +58,6 @@ export class DmpEditorWizardComponent extends BaseComponent implements OnInit, I
|
||||||
titleFn: (item) => item['label']
|
titleFn: (item) => item['label']
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
if (this.formGroup == null) {
|
if (this.formGroup == null) {
|
||||||
this.dmp = new DmpEditorWizardModel();
|
this.dmp = new DmpEditorWizardModel();
|
||||||
this.formGroup = this.dmp.buildForm();
|
this.formGroup = this.dmp.buildForm();
|
||||||
|
@ -66,14 +65,11 @@ export class DmpEditorWizardComponent extends BaseComponent implements OnInit, I
|
||||||
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.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([
|
this.breadCrumbs = Observable.of([{
|
||||||
{
|
|
||||||
parentComponentName: 'project',
|
parentComponentName: 'project',
|
||||||
label: 'Dmp',
|
label: this.language.instant('NAV-BAR.DMP'),
|
||||||
url: '/quick-wizard/dmp'
|
url: '/quick-wizard/dmp'
|
||||||
}]
|
}]);
|
||||||
);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
formSubmit(): void {
|
formSubmit(): void {
|
||||||
|
@ -160,6 +156,4 @@ export class DmpEditorWizardComponent extends BaseComponent implements OnInit, I
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
|
@ -44,13 +44,11 @@ export class ProjectEditorWizardComponent extends BaseComponent implements OnIni
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.breadCrumbs = Observable.of([
|
this.breadCrumbs = Observable.of([{
|
||||||
{
|
|
||||||
parentComponentName: 'QuickCreate',
|
parentComponentName: 'QuickCreate',
|
||||||
label: 'Project',
|
label: this.language.instant('NAV-BAR.PROJECT'),
|
||||||
url: '/quick-wizard/project'
|
url: '/quick-wizard/project'
|
||||||
}]
|
}]);
|
||||||
);
|
|
||||||
|
|
||||||
const projectRequestItem: RequestItem<ProjectCriteria> = new RequestItem();
|
const projectRequestItem: RequestItem<ProjectCriteria> = new RequestItem();
|
||||||
projectRequestItem.criteria = new ProjectCriteria();
|
projectRequestItem.criteria = new ProjectCriteria();
|
||||||
|
@ -71,9 +69,6 @@ export class ProjectEditorWizardComponent extends BaseComponent implements OnIni
|
||||||
this.formGroup.get('label').disable();
|
this.formGroup.get('label').disable();
|
||||||
this.formGroup.get('description').disable();
|
this.formGroup.get('description').disable();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// this.route.params
|
// this.route.params
|
||||||
// .pipe(takeUntil(this._destroyed))
|
// .pipe(takeUntil(this._destroyed))
|
||||||
// .subscribe((params: Params) => {
|
// .subscribe((params: Params) => {
|
||||||
|
@ -102,7 +97,6 @@ export class ProjectEditorWizardComponent extends BaseComponent implements OnIni
|
||||||
// });
|
// });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public isFormValid() {
|
public isFormValid() {
|
||||||
return this.formGroup.valid;
|
return this.formGroup.valid;
|
||||||
}
|
}
|
||||||
|
@ -153,7 +147,6 @@ export class ProjectEditorWizardComponent extends BaseComponent implements OnIni
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
searchProject(query: string) {
|
searchProject(query: string) {
|
||||||
const projectRequestItem: RequestItem<ProjectCriteria> = new RequestItem();
|
const projectRequestItem: RequestItem<ProjectCriteria> = new RequestItem();
|
||||||
projectRequestItem.criteria = new ProjectCriteria();
|
projectRequestItem.criteria = new ProjectCriteria();
|
||||||
|
@ -176,5 +169,4 @@ export class ProjectEditorWizardComponent extends BaseComponent implements OnIni
|
||||||
this.formGroup.get('description').reset();
|
this.formGroup.get('description').reset();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -47,14 +47,11 @@ export class QuickWizardEditorComponent extends BaseComponent implements OnInit,
|
||||||
this.quickWizard = new QuickWizardEditorWizardModel();
|
this.quickWizard = new QuickWizardEditorWizardModel();
|
||||||
this.quickWizard.project = new ProjectEditorWizardModel();
|
this.quickWizard.project = new ProjectEditorWizardModel();
|
||||||
this.formGroup = this.quickWizard.buildForm();
|
this.formGroup = this.quickWizard.buildForm();
|
||||||
this.breadCrumbs = Observable.of([
|
this.breadCrumbs = Observable.of([{
|
||||||
{
|
|
||||||
parentComponentName: 'Dashboard',
|
parentComponentName: 'Dashboard',
|
||||||
label: 'DMP Wizard',
|
label: this.language.instant('NAV-BAR.DMP-WIZARD'),
|
||||||
url: '/quick-wizard'
|
url: '/quick-wizard'
|
||||||
}]
|
}]);
|
||||||
);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
isActive(step: string): boolean {
|
isActive(step: string): boolean {
|
||||||
|
|
|
@ -51,13 +51,25 @@
|
||||||
"BREADCRUMB-ROOT": "Dashboard",
|
"BREADCRUMB-ROOT": "Dashboard",
|
||||||
"TITLE": "OpenDMP",
|
"TITLE": "OpenDMP",
|
||||||
"PROJECTS": "Projects",
|
"PROJECTS": "Projects",
|
||||||
|
"PROJECT": "Project",
|
||||||
|
"DMP": "Dmp",
|
||||||
"DMPS": "DMPs",
|
"DMPS": "DMPs",
|
||||||
"DATASETS": "Datasets",
|
"DATASETS": "Datasets",
|
||||||
"PUBLIC-DATASETS": "Explore OpenDMP",
|
"PUBLIC-DATASETS": "Explore OpenDMP",
|
||||||
"USERS": "Users",
|
"USERS": "Users",
|
||||||
"DATASETS-ADMIN": "Dataset Profiles",
|
"DATASETS-ADMIN": "Dataset Profiles",
|
||||||
"DMP-PROFILES": "DMP 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": {
|
"SIDE-BAR": {
|
||||||
"GENERAL": "GENERAL",
|
"GENERAL": "GENERAL",
|
||||||
|
|
Loading…
Reference in New Issue