]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - client/src/app/+admin/moderation/instance-blocklist/instance-account-blocklist.component.html
Unify paginator disabling when no result is displayable, fix batch domain add for...
[github/Chocobozzz/PeerTube.git] / client / src / app / +admin / moderation / instance-blocklist / instance-account-blocklist.component.html
1 <p-table
2 [value]="blockedAccounts" [lazy]="true" [paginator]="totalRecords > 0" [totalRecords]="totalRecords" [rows]="rowsPerPage" [rowsPerPageOptions]="rowsPerPageOptions"
3 [sortField]="sort.field" [sortOrder]="sort.order" (onLazyLoad)="loadLazy($event)"
4 [showCurrentPageReport]="true" i18n-currentPageReportTemplate
5 currentPageReportTemplate="Showing {{'{first}'}} to {{'{last}'}} of {{'{totalRecords}'}} muted accounts"
6 >
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>
17
18 <ng-template pTemplate="header">
19 <tr>
20 <th style="width: 100%;" i18n>Account</th>
21 <th style="width: 190px;" i18n pSortableColumn="createdAt">Muted at <p-sortIcon field="createdAt"></p-sortIcon></th>
22 <th style="width: 100px;"></th> <!-- column for action buttons -->
23 </tr>
24 </ng-template>
25
26 <ng-template pTemplate="body" let-accountBlock>
27 <tr>
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
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>
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>
62 </p-table>