]>
Commit | Line | Data |
---|---|---|
ab998f7b C |
1 | <p-table |
2 | [value]="followers" [lazy]="true" [paginator]="true" [totalRecords]="totalRecords" [rows]="rowsPerPage" | |
3 | [sortField]="sort.field" [sortOrder]="sort.order" (onLazyLoad)="loadLazy($event)" | |
04e0fc48 | 4 | > |
b014b6b9 C |
5 | <ng-template pTemplate="caption"> |
6 | <div class="caption"> | |
7 | <input | |
8 | type="text" name="table-filter" id="table-filter" i18n-placeholder placeholder="Filter..." | |
9 | (keyup)="onSearch($event.target.value)" | |
10 | > | |
11 | </div> | |
12 | </ng-template> | |
13 | ||
ab998f7b C |
14 | <ng-template pTemplate="header"> |
15 | <tr> | |
b1d40cff C |
16 | <th i18n style="width: 60px">ID</th> |
17 | <th i18n>Score</th> | |
18 | <th i18n>Name</th> | |
19 | <th i18n>Host</th> | |
20 | <th i18n>State</th> | |
21 | <th i18n pSortableColumn="createdAt">Created <p-sortIcon field="createdAt"></p-sortIcon></th> | |
ab998f7b C |
22 | </tr> |
23 | </ng-template> | |
24 | ||
25 | <ng-template pTemplate="body" let-follow> | |
26 | <tr> | |
27 | <td>{{ follow.id }}</td> | |
28 | <td>{{ follow.score }}</td> | |
29 | <td>{{ follow.follower.name }}</td> | |
30 | <td>{{ follow.follower.host }}</td> | |
3827c3b3 C |
31 | |
32 | <td *ngIf="follow.state === 'accepted'" i18n>Accepted</td> | |
33 | <td *ngIf="follow.state === 'pending'" i18n>Pending</td> | |
34 | ||
ab998f7b C |
35 | <td>{{ follow.createdAt }}</td> |
36 | </tr> | |
37 | </ng-template> | |
38 | </p-table> |