no message
This commit is contained in:
parent
33701ac3cb
commit
bb60873046
|
@ -1,5 +1,5 @@
|
|||
<div class="container-fluid">
|
||||
<h3>{{titlePrefix}} {{'DATASET-LISTING.TITLE' | translate}}</h3>
|
||||
<h3>{{'DATASET-LISTING.TITLE' | translate}} {{titlePrefix}}</h3>
|
||||
|
||||
|
||||
<app-datasets-criteria-component></app-datasets-criteria-component>
|
||||
|
|
|
@ -55,20 +55,14 @@ export class DatasetListingComponent implements OnInit {
|
|||
ngOnInit() {
|
||||
this.route.params.subscribe((params: Params) => {
|
||||
this.dmpId = params['dmpId'];
|
||||
if (this.dmpId != null) this.setDmpTitle(this.dmpId);
|
||||
// if (this.dmpId != null) this.setDmpTitle(this.dmpId);
|
||||
this.criteria.setCriteria(this.getDefaultCriteria(this.dmpId));
|
||||
this.refresh();
|
||||
this.criteria.setRefreshCallback(() => this.refresh());
|
||||
if (this.dmpId != null) this.titlePrefix ="for " + params['dmpLabel'];
|
||||
});
|
||||
}
|
||||
|
||||
setDmpTitle(dmpId: String) {
|
||||
this.dataManagementPlanService.getSingle(dmpId).map(data => data as DataManagementPlanModel)
|
||||
.subscribe(data => {
|
||||
this.titlePrefix = data.label;
|
||||
});
|
||||
}
|
||||
|
||||
refresh() {
|
||||
this.dataSource = new DatasetDataSource(this.datasetService, this._paginator, this.sort, this.languageService, this.snackBar, this.criteria);
|
||||
}
|
||||
|
|
|
@ -58,7 +58,7 @@
|
|||
<button mat-menu-item (click)="rowClick(row.id)"><mat-icon>mode_edit</mat-icon>{{'DMP-LISTING.ACTIONS.EDIT' | translate}}</button>
|
||||
<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)"><mat-icon>list</mat-icon>{{'DMP-LISTING.ACTIONS.DATASETS' | 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)="clone(row.id)"><mat-icon>filter_none</mat-icon>{{'DMP-LISTING.ACTIONS.CLONE' | translate}}</button>
|
||||
|
|
|
@ -12,6 +12,8 @@ import { Router, ActivatedRoute } from "@angular/router";
|
|||
import { TranslateService } from "@ngx-translate/core";
|
||||
import { DataSource } from "@angular/cdk/table";
|
||||
import { Observable } from "rxjs/Observable";
|
||||
import { DataManagementPlanRoutes } from '@app/dmps/dmps.routes';
|
||||
import { DatasetRoutes } from '@app/datasets/dataset.routes';
|
||||
|
||||
|
||||
|
||||
|
@ -65,8 +67,8 @@ export class DataManagementPlanListingComponent implements OnInit {
|
|||
this.router.navigate(['/datasets/new/' + rowId]);
|
||||
}
|
||||
|
||||
showDatasets(rowId: String) {
|
||||
this.router.navigate(['/datasets/dmp/' + rowId]);
|
||||
showDatasets(rowId: String, rowLabel:String) {
|
||||
this.router.navigate(['/datasets/dmp/' + rowId, {dmpLabel:rowLabel}]);
|
||||
}
|
||||
|
||||
newVersion(rowId: String) {
|
||||
|
|
|
@ -136,7 +136,7 @@
|
|||
"ACTIONS": {
|
||||
"SAVE": "Save",
|
||||
"CANCEL": "Cancel",
|
||||
"DELETE": "Delete"
|
||||
"DELETE": "Remove"
|
||||
}
|
||||
},
|
||||
"CRITERIA": {
|
||||
|
|
Loading…
Reference in New Issue