-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathuser-search.component.html
58 lines (52 loc) · 2.02 KB
/
user-search.component.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<div class="user-header">
User Search
</div>
<div class="mat-elevation-z8 user-table">
<!-- Filter -->
<mat-form-field class="user-filter">
<mat-label>Filter</mat-label>
<input matInput (keyup)="applyFilter($event)" #input />
</mat-form-field>
<!-- Table -->
<table mat-table [dataSource]="tableSource" matSort>
<!-- Declare Fields -->
<ng-container matColumnDef="name">
<th mat-header-cell *matHeaderCellDef mat-sort-header>Name</th>
<td mat-cell *matCellDef="let i">{{ i.name }}</td>
</ng-container>
<ng-container matColumnDef="updated">
<th mat-header-cell *matHeaderCellDef mat-sort-header>Updated</th>
<td mat-cell *matCellDef="let i">{{ i.updated }}</td>
</ng-container>
<ng-container matColumnDef="edit">
<th mat-header-cell *matHeaderCellDef mat-sort-header>Edit</th>
<td mat-cell *matCellDef="let i">
<button (click)="editRecord(i)" mat-icon-button ><mat-icon>edit</mat-icon></button></td>
</ng-container>
<ng-container matColumnDef="delete">
<th mat-header-cell *matHeaderCellDef mat-sort-header>Delete</th>
<td mat-cell *matCellDef="let i"><button mat-icon-button ><mat-icon>delete</mat-icon></button></td>
</ng-container>
<!-- Print Fields -->
<tr mat-header-row *matHeaderRowDef="tableFields"></tr>
<tr mat-row *matRowDef="let row; columns: tableFields" tabindex="0"></tr>
<!-- No Match -->
<tr class="mat-row" *matNoDataRow>
<td class="mat-cell" colspan="4">No data matching the filter "{{ input.value }}"</td>
</tr>
</table>
<!-- Loading -->
<div *ngIf="state == null" class="user-loading">
<mat-progress-spinner mode="indeterminate"></mat-progress-spinner>
</div>
<!-- Paginator -->
<mat-paginator [pageSizeOptions]="[10, 25, 50, 100]" showFirstLastButtons></mat-paginator>
</div>
<div class="button-container">
<button routerLink="/user/form" mat-raised-button color="primary">
Create
</button>
<button routerLink="/" mat-raised-button color="accent">
Back
</button>
</div>