]>
Commit | Line | Data |
---|---|---|
ab998f7b C |
1 | <p-table |
2 | [value]="following" [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 | <div> | |
8 | <input | |
9 | type="text" name="table-filter" id="table-filter" i18n-placeholder placeholder="Filter..." | |
10 | (keyup)="onSearch($event.target.value)" | |
11 | > | |
12 | </div> | |
13 | </div> | |
14 | </ng-template> | |
15 | ||
ab998f7b C |
16 | <ng-template pTemplate="header"> |
17 | <tr> | |
b1d40cff C |
18 | <th i18n style="width: 60px">ID</th> |
19 | <th i18n>Host</th> | |
20 | <th i18n>State</th> | |
21 | <th i18n pSortableColumn="createdAt">Created <p-sortIcon field="createdAt"></p-sortIcon></th> | |
c48e82b5 | 22 | <th i18n>Redundancy allowed</th> |
ab998f7b C |
23 | <th></th> |
24 | </tr> | |
25 | </ng-template> | |
26 | ||
27 | <ng-template pTemplate="body" let-follow> | |
28 | <tr> | |
29 | <td>{{ follow.id }}</td> | |
30 | <td>{{ follow.following.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 | 35 | <td>{{ follow.createdAt }}</td> |
c48e82b5 C |
36 | <td> |
37 | <my-redundancy-checkbox | |
38 | [host]="follow.following.host" [redundancyAllowed]="follow.following.hostRedundancyAllowed" | |
39 | ></my-redundancy-checkbox> | |
40 | </td> | |
ab998f7b C |
41 | <td class="action-cell"> |
42 | <my-delete-button (click)="removeFollowing(follow)"></my-delete-button> | |
43 | </td> | |
44 | </tr> | |
45 | </ng-template> | |
46 | </p-table> |