dmp actions icons- language- dataset title
This commit is contained in:
parent
9558be7e1d
commit
a7baad7322
|
@ -55,7 +55,6 @@ export class DatasetListingComponent implements OnInit {
|
|||
ngOnInit() {
|
||||
this.route.params.subscribe((params: Params) => {
|
||||
this.dmpId = params['dmpId'];
|
||||
// if (this.dmpId != null) this.setDmpTitle(this.dmpId);
|
||||
this.criteria.setCriteria(this.getDefaultCriteria(this.dmpId));
|
||||
this.refresh();
|
||||
this.criteria.setRefreshCallback(() => this.refresh());
|
||||
|
|
|
@ -59,8 +59,8 @@
|
|||
<button mat-menu-item (click)="openShareDialog(row.id,row.label)"><mat-icon>share</mat-icon>{{'DMP-LISTING.ACTIONS.INVITE' | translate}}</button>
|
||||
<button mat-menu-item (click)="addDataset(row.id)"><mat-icon>add</mat-icon>{{'DMP-LISTING.ACTIONS.ADD-DATASET' | translate}}</button>
|
||||
<button mat-menu-item (click)="showDatasets(row.id, row.label)"><mat-icon>list</mat-icon>{{'DMP-LISTING.ACTIONS.DATASETS' | translate}}</button>
|
||||
<button mat-menu-item (click)="newVersion(row.id)"><mat-icon>filter_none</mat-icon>{{'DMP-LISTING.ACTIONS.NEW-VERSION' | translate}}</button>
|
||||
<button mat-menu-item (click)="viewVersions(row.groupId)"><mat-icon>filter_none</mat-icon>{{'DMP-LISTING.ACTIONS.VIEW-VERSION' | translate}}</button>
|
||||
<button mat-menu-item (click)="newVersion(row.id, row.label)"><mat-icon>queue</mat-icon>{{'DMP-LISTING.ACTIONS.NEW-VERSION' | translate}}</button>
|
||||
<button mat-menu-item (click)="viewVersions(row.groupId)"><mat-icon>library_books</mat-icon>{{'DMP-LISTING.ACTIONS.VIEW-VERSION' | translate}}</button>
|
||||
<button mat-menu-item (click)="clone(row.id)"><mat-icon>filter_none</mat-icon>{{'DMP-LISTING.ACTIONS.CLONE' | translate}}</button>
|
||||
</mat-menu>
|
||||
<button mat-icon-button [matMenuTriggerFor]="actionsMenu">
|
||||
|
|
|
@ -71,8 +71,8 @@ export class DataManagementPlanListingComponent implements OnInit {
|
|||
this.router.navigate(['/datasets/dmp/' + rowId, {dmpLabel:rowLabel}]);
|
||||
}
|
||||
|
||||
newVersion(rowId: String) {
|
||||
this.router.navigate(['/dmps/new_version/' + rowId]);
|
||||
newVersion(rowId: String, rowLabel:String) {
|
||||
this.router.navigate(['/dmps/new_version/' + rowId, {dmpLabel:rowLabel}]);
|
||||
}
|
||||
|
||||
viewVersions(rowId: String) {
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
<div class="dmp-wizard">
|
||||
<mat-horizontal-stepper [linear]="isLinear" #stepper>
|
||||
<mat-step>
|
||||
<ng-template matStepLabel>{{'DMP-WIZARD.FIRST-STEP.TITLE' | translate}}</ng-template>
|
||||
<ng-template matStepLabel>{{'DMP-WIZARD.FIRST-STEP.DMP' | translate}}</ng-template>
|
||||
<app-dmp-wizard-editor-component [formGroup]="formGroup" *ngIf="formGroup"></app-dmp-wizard-editor-component>
|
||||
<div class="navigation-buttons-container">
|
||||
<button style="float:right;" matStepperNext mat-raised-button color="primary">{{'DATASET-WIZARD.ACTIONS.NEXT' | translate}}</button>
|
||||
</div>
|
||||
</mat-step>
|
||||
<mat-step>
|
||||
<ng-template matStepLabel>{{'DMP-WIZARD.FIRST-STEP.TITLE' | translate}}</ng-template>
|
||||
<ng-template matStepLabel>{{'DMP-WIZARD.FIRST-STEP.DATASETS' | translate}}</ng-template>
|
||||
<app-dataset-wizard-listing-component [formGroup]="formGroup" [dmpId]="formGroup.get('id').value" *ngIf="formGroup"></app-dataset-wizard-listing-component>
|
||||
<div class="navigation-buttons-container">
|
||||
<button matStepperPrevious mat-raised-button color="primary">{{'DATASET-WIZARD.ACTIONS.BACK' | translate}}</button>
|
||||
<button style="float:right;" matStepperNext mat-raised-button (click)='submit()' color="primary">{{'DATASET-WIZARD.ACTIONS.SAVE' | translate}}</button>
|
||||
<button style="float:right;" matStepperNext mat-raised-button (click)='submit()' color="primary">{{'DMP-WIZARD.ACTIONS.SAVE' | translate}}</button>
|
||||
</div>
|
||||
</mat-step>
|
||||
</mat-horizontal-stepper>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<div class="container-fluid">
|
||||
<h3>{{titlePrefix}} {{'DATASET-LISTING.TITLE' | translate}}</h3>
|
||||
<h3>{{'DATASET-LISTING.TITLE' | translate}} {{titlePrefix}}</h3>
|
||||
<mat-card class="mat-card">
|
||||
<mat-selection-list #selectedItems (selectionChange)="selectionChanged($event,selectedItems)">
|
||||
<mat-list-option *ngFor="let dataset of datasets;" [value]="dataset.id" >
|
||||
|
|
|
@ -56,7 +56,9 @@ export class DatasetWizardListingComponent implements OnInit {
|
|||
|
||||
|
||||
ngOnInit() {
|
||||
if (this.dmpId != null) this.setDmpTitle(this.dmpId);
|
||||
this.route.params.subscribe((params: Params) => {
|
||||
if (this.dmpId != null) this.titlePrefix ="for " + params['dmpLabel'];
|
||||
});
|
||||
let request: DataTableRequest<DatasetCriteria> = new DataTableRequest<DatasetCriteria>(null, null, null);
|
||||
request.criteria = new DatasetCriteria();
|
||||
request.criteria.dmpIds = [this.dmpId];
|
||||
|
@ -66,13 +68,6 @@ export class DatasetWizardListingComponent implements OnInit {
|
|||
this.formGroup.addControl("datasets", new FormBuilder().array(new Array<FormControl>()))
|
||||
}
|
||||
|
||||
setDmpTitle(dmpId: String) {
|
||||
this.dataManagementPlanService.getSingle(dmpId).map(data => data as DataManagementPlanModel)
|
||||
.subscribe(data => {
|
||||
this.titlePrefix = data.label;
|
||||
});
|
||||
}
|
||||
|
||||
selectionChanged(event,selectedItems) {
|
||||
this.formGroup.removeControl("datasets");
|
||||
this.formGroup.addControl("datasets", new FormBuilder().array(new Array<FormControl>()))
|
||||
|
|
|
@ -211,5 +211,16 @@
|
|||
"SAVE": "Save",
|
||||
"CANCEL": "Cancel"
|
||||
}
|
||||
},
|
||||
"DMP-WIZARD":{
|
||||
"FIRST-STEP":{
|
||||
"DMP":"DMP Editor",
|
||||
"DATASETS":"Datasets"
|
||||
},
|
||||
"ACTIONS": {
|
||||
"NEXT": "Next",
|
||||
"BACK": "Back",
|
||||
"SAVE": "Save"
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue