]>
Commit | Line | Data |
---|---|---|
65b21c96 | 1 | <p-table |
b8cf27c0 | 2 | [value]="blockedAccounts" [lazy]="true" [paginator]="totalRecords > 0" [totalRecords]="totalRecords" [rows]="rowsPerPage" [rowsPerPageOptions]="rowsPerPageOptions" |
86ab2292 | 3 | [sortField]="sort.field" [sortOrder]="sort.order" (onLazyLoad)="loadLazy($event)" (onPage)="onPage($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"> | |
25a42e29 | 9 | <div class="ml-auto has-feedback has-clear"> |
e0a92917 RK |
10 | <input |
11 | type="text" name="table-filter" id="table-filter" i18n-placeholder placeholder="Filter..." | |
12 | (keyup)="onSearch($event)" | |
13 | > | |
25a42e29 RK |
14 | <a class="glyphicon glyphicon-remove-sign form-control-feedback form-control-clear" (click)="resetSearch()"></a> |
15 | <span class="sr-only" i18n>Clear filters</span> | |
e0a92917 RK |
16 | </div> |
17 | </div> | |
18 | </ng-template> | |
65b21c96 C |
19 | |
20 | <ng-template pTemplate="header"> | |
21 | <tr> | |
30814423 | 22 | <th style="width: 150px;">Action</th> <!-- column for action buttons --> |
7f0d8561 | 23 | <th style="width: calc(100% - 300px);" i18n>Account</th> |
df4c603d | 24 | <th style="width: 150px;" i18n pSortableColumn="createdAt">Muted at <p-sortIcon field="createdAt"></p-sortIcon></th> |
65b21c96 C |
25 | </tr> |
26 | </ng-template> | |
27 | ||
28 | <ng-template pTemplate="body" let-accountBlock> | |
29 | <tr> | |
30814423 K |
30 | <td class="action-cell"> |
31 | <button class="unblock-button" (click)="unblockAccount(accountBlock)" i18n>Unmute</button> | |
32 | </td> | |
33 | ||
d3840613 RK |
34 | <td> |
35 | <a [href]="accountBlock.blockedAccount.url" i18n-title title="Open account in a new tab" target="_blank" rel="noopener noreferrer"> | |
36 | <div class="chip two-lines"> | |
37 | <img | |
38 | class="avatar" | |
39 | [src]="accountBlock.blockedAccount.avatar?.path" | |
40 | (error)="switchToDefaultAvatar($event)" | |
41 | alt="Avatar" | |
42 | > | |
43 | <div> | |
44 | {{ accountBlock.blockedAccount.displayName }} | |
45 | <span class="text-muted">{{ accountBlock.blockedAccount.nameWithHost }}</span> | |
46 | </div> | |
47 | </div> | |
48 | </a> | |
49 | </td> | |
50 | ||
7f979fd8 | 51 | <td>{{ accountBlock.createdAt | date: 'short' }}</td> |
65b21c96 C |
52 | </tr> |
53 | </ng-template> | |
d3840613 RK |
54 | |
55 | <ng-template pTemplate="emptymessage"> | |
56 | <tr> | |
57 | <td colspan="6"> | |
22839330 | 58 | <div class="no-results"> |
d3840613 RK |
59 | <ng-container *ngIf="search" i18n>No account found matching current filters.</ng-container> |
60 | <ng-container *ngIf="!search" i18n>No account found.</ng-container> | |
61 | </div> | |
62 | </td> | |
63 | </tr> | |
64 | </ng-template> | |
65b21c96 | 65 | </p-table> |