num of datasets column

This commit is contained in:
annampak 2018-01-23 10:49:54 +02:00
parent 54734489e6
commit dcada74d7b
3 changed files with 9 additions and 2 deletions

View File

@ -69,7 +69,8 @@
<mat-header-cell *matHeaderCellDef>{{'DATASET-LISTING.COLUMNS.ACTIONS' | translate}}</mat-header-cell>
<mat-cell *matCellDef="let row">
<mat-menu #actionsMenu="matMenu">
<button mat-menu-item (click)="rowClick(row.id)"><mat-icon>mode_edit</mat-icon>{{'DATASET-LISTING.ACTIONS.EDIT' | translate}}</button>
<button *ngIf="row.status==0" mat-menu-item (click)="rowClick(row.id)"><mat-icon>mode_edit</mat-icon>{{'DATASET-LISTING.ACTIONS.EDIT' | translate}}</button>
<button *ngIf="row.status==1" mat-menu-item (click)="rowClick(row.id)"><mat-icon>visibility</mat-icon>{{'DATASET-LISTING.ACTIONS.VIEW' | translate}}</button>
<button *ngIf="row.status==1" mat-menu-item (click)="makeItPublic(row.id)"><mat-icon>people_outline</mat-icon>{{'DATASET-LISTING.ACTIONS.MAKE-IT-PUBLIC' | translate}}</button>
</mat-menu>
<button mat-icon-button [matMenuTriggerFor]="actionsMenu">

View File

@ -45,6 +45,12 @@
<mat-cell *matCellDef="let row"> {{row.version}}</mat-cell>
</ng-container>
<!-- Column Definition: Datasets(count) -->
<ng-container cdkColumnDef="numOfDatasets">
<mat-header-cell *matHeaderCellDef>{{'DMP-LISTING.COLUMNS.DATASETS' | translate}}</mat-header-cell>
<mat-cell *matCellDef="let row"> {{row.numOfDatasets}}</mat-cell>
</ng-container>
<ng-container cdkColumnDef="actions">
<mat-header-cell *matHeaderCellDef>{{'DMP-LISTING.COLUMNS.ACTIONS' | translate}}</mat-header-cell>
<mat-cell *matCellDef="let row">

View File

@ -27,7 +27,7 @@ export class DataManagementPlanListingComponent implements OnInit {
@ViewChild(DataManagementPlanCriteriaComponent) criteria: DataManagementPlanCriteriaComponent;
dataSource: DataManagementPlanDataSource | null;
displayedColumns: String[] = ['name', 'project', 'researchers', 'organisations', 'version', 'actions'];
displayedColumns: String[] = ['name', 'project', 'researchers', 'organisations', 'version', 'numOfDatasets', 'actions'];
constructor(
private dataManagementPlanService: DataManagementPlanService,