]>
Commit | Line | Data |
---|---|---|
65b21c96 | 1 | <p-table |
b8cf27c0 | 2 | [value]="blockedAccounts" [lazy]="true" [paginator]="totalRecords > 0" [totalRecords]="totalRecords" [rows]="rowsPerPage" [rowsPerPageOptions]="rowsPerPageOptions" |
65b21c96 | 3 | [sortField]="sort.field" [sortOrder]="sort.order" (onLazyLoad)="loadLazy($event)" |
2bc9bd08 | 4 | [showCurrentPageReport]="true" i18n-currentPageReportTemplate |
45c14ae1 | 5 | currentPageReportTemplate="Showing {{'{first}'}} to {{'{last}'}} of {{'{totalRecords}'}} muted accounts" |
65b21c96 | 6 | > |
e0a92917 RK |
7 | <ng-template pTemplate="caption"> |
8 | <div class="caption"> | |
9 | <div class="ml-auto"> | |
10 | <input | |
11 | type="text" name="table-filter" id="table-filter" i18n-placeholder placeholder="Filter..." | |
12 | (keyup)="onSearch($event)" | |
13 | > | |
14 | </div> | |
15 | </div> | |
16 | </ng-template> | |
65b21c96 C |
17 | |
18 | <ng-template pTemplate="header"> | |
19 | <tr> | |
d3840613 | 20 | <th style="width: 100%;" i18n>Account</th> |
9b4241e3 | 21 | <th style="width: 190px;" i18n pSortableColumn="createdAt">Muted at <p-sortIcon field="createdAt"></p-sortIcon></th> |
68d19a0a | 22 | <th style="width: 100px;"></th> <!-- column for action buttons --> |
65b21c96 C |
23 | </tr> |
24 | </ng-template> | |
25 | ||
26 | <ng-template pTemplate="body" let-accountBlock> | |
27 | <tr> | |
d3840613 RK |
28 | <td> |
29 | <a [href]="accountBlock.blockedAccount.url" i18n-title title="Open account in a new tab" target="_blank" rel="noopener noreferrer"> | |
30 | <div class="chip two-lines"> | |
31 | <img | |
32 | class="avatar" | |
33 | [src]="accountBlock.blockedAccount.avatar?.path" | |
34 | (error)="switchToDefaultAvatar($event)" | |
35 | alt="Avatar" | |
36 | > | |
37 | <div> | |
38 | {{ accountBlock.blockedAccount.displayName }} | |
39 | <span class="text-muted">{{ accountBlock.blockedAccount.nameWithHost }}</span> | |
40 | </div> | |
41 | </div> | |
42 | </a> | |
43 | </td> | |
44 | ||
65b21c96 C |
45 | <td>{{ accountBlock.createdAt }}</td> |
46 | <td class="action-cell"> | |
47 | <button class="unblock-button" (click)="unblockAccount(accountBlock)" i18n>Unmute</button> | |
48 | </td> | |
49 | </tr> | |
50 | </ng-template> | |
d3840613 RK |
51 | |
52 | <ng-template pTemplate="emptymessage"> | |
53 | <tr> | |
54 | <td colspan="6"> | |
55 | <div class="empty-table-message"> | |
56 | <ng-container *ngIf="search" i18n>No account found matching current filters.</ng-container> | |
57 | <ng-container *ngIf="!search" i18n>No account found.</ng-container> | |
58 | </div> | |
59 | </td> | |
60 | </tr> | |
61 | </ng-template> | |
65b21c96 | 62 | </p-table> |