aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+admin/moderation/instance-blocklist/instance-account-blocklist.component.html
blob: d340b5e57296cf32de5b7bc7955423e75012612e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<p-table
  [value]="blockedAccounts" [lazy]="true" [paginator]="true" [totalRecords]="totalRecords" [rows]="rowsPerPage" [rowsPerPageOptions]="rowsPerPageOptions"
  [sortField]="sort.field" [sortOrder]="sort.order" (onLazyLoad)="loadLazy($event)"
  [showCurrentPageReport]="true" i18n-currentPageReportTemplate
  currentPageReportTemplate="Showing {{'{first}'}} to {{'{last}'}} of {{'{totalRecords}'}} muted accounts"
>
  <ng-template pTemplate="caption">
    <div class="caption">
      <div class="ml-auto">
        <input
          type="text" name="table-filter" id="table-filter" i18n-placeholder placeholder="Filter..."
          (keyup)="onSearch($event)"
        >
      </div>
    </div>
  </ng-template>

  <ng-template pTemplate="header">
    <tr>
      <th i18n>Account</th>
      <th style="width: 190px;" i18n pSortableColumn="createdAt">Muted at <p-sortIcon field="createdAt"></p-sortIcon></th>
      <th style="width: 100px;"></th> <!-- column for action buttons --> 
    </tr>
  </ng-template>

  <ng-template pTemplate="body" let-accountBlock>
    <tr>
      <td>{{ accountBlock.blockedAccount.nameWithHost }}</td>
      <td>{{ accountBlock.createdAt }}</td>
      <td class="action-cell">
        <button class="unblock-button" (click)="unblockAccount(accountBlock)" i18n>Unmute</button>
      </td>
    </tr>
  </ng-template>
</p-table>