64 lines
2.7 KiB
HTML
64 lines
2.7 KiB
HTML
<div class="container-fluid">
|
|
<h3>{{titlePrefix}} {{'DATASET-LISTING.TITLE' | translate}}</h3>
|
|
|
|
|
|
<app-datasets-criteria-component></app-datasets-criteria-component>
|
|
<mat-card class="mat-card">
|
|
<mat-card-header>
|
|
<mat-progress-bar *ngIf="dataSource?.isLoadingResults" mode="query"></mat-progress-bar>
|
|
</mat-card-header>
|
|
<mat-table [dataSource]="dataSource" matSort>
|
|
|
|
<!-- Column Definition: Name -->
|
|
<ng-container cdkColumnDef="label">
|
|
<mat-header-cell *matHeaderCellDef>Label</mat-header-cell>
|
|
<mat-cell *matCellDef="let row">{{row.label}}</mat-cell>
|
|
</ng-container>
|
|
|
|
<!-- Column Definition: Status -->
|
|
<ng-container cdkColumnDef="status">
|
|
<mat-header-cell *matHeaderCellDef>Status</mat-header-cell>
|
|
<mat-cell *matCellDef="let row"> {{row.status}}
|
|
</mat-cell>
|
|
</ng-container>
|
|
|
|
<!-- Column Definition: Description -->
|
|
<ng-container cdkColumnDef="description">
|
|
<mat-header-cell *matHeaderCellDef>Description</mat-header-cell>
|
|
<mat-cell *matCellDef="let row"> {{row.description}} </mat-cell>
|
|
</ng-container>
|
|
|
|
<!-- Column Definition: Created -->
|
|
<ng-container cdkColumnDef="created">
|
|
<mat-header-cell *matHeaderCellDef>Created}</mat-header-cell>
|
|
<mat-cell *matCellDef="let row">{{row.created | date:'shortDate'}}</mat-cell>
|
|
</ng-container>
|
|
|
|
<!-- Column Definition: Submission Time -->
|
|
<ng-container cdkColumnDef="actions">
|
|
<mat-header-cell *matHeaderCellDef>{{'DATASET-LISTING.COLUMNS.ACTIONS' | translate}}</mat-header-cell>
|
|
<mat-cell *matCellDef="let row">
|
|
<mat-menu #actionsMenu="matMenu">
|
|
<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">
|
|
<mat-icon>more_vert</mat-icon>
|
|
</button>
|
|
</mat-cell>
|
|
</ng-container>
|
|
|
|
<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
|
|
<mat-row *matRowDef="let row; columns: displayedColumns"></mat-row>
|
|
<!-- (click)="rowClick(row.id)" -->
|
|
|
|
</mat-table>
|
|
<mat-paginator #paginator [length]="dataSource?.totalCount" [pageSizeOptions]="[10, 25, 100]">
|
|
</mat-paginator>
|
|
</mat-card>
|
|
|
|
<button *ngIf="dmpId" mat-fab class="mat-fab-bottom-right" color="primary" [routerLink]="['/datasets/new/'+dmpId] ">
|
|
<mat-icon class="mat-24">add</mat-icon>
|
|
</button>
|
|
</div> |