]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - client/src/app/+admin/follows/followers-list/followers-list.component.html
Fix accessibility action buttons and display on imports and followers list
[github/Chocobozzz/PeerTube.git] / client / src / app / +admin / follows / followers-list / followers-list.component.html
1 <p-table
2 [value]="followers" [lazy]="true" [paginator]="totalRecords > 0" [totalRecords]="totalRecords" [rows]="rowsPerPage" [rowsPerPageOptions]="rowsPerPageOptions"
3 [sortField]="sort.field" [sortOrder]="sort.order" (onLazyLoad)="loadLazy($event)" (onPage)="onPage($event)"
4 [showCurrentPageReport]="true" i18n-currentPageReportTemplate
5 currentPageReportTemplate="Showing {{'{first}'}} to {{'{last}'}} of {{'{totalRecords}'}} followers"
6 >
7 <ng-template pTemplate="caption">
8 <div class="caption">
9 <div class="ml-auto has-feedback has-clear">
10 <input
11 type="text" name="table-filter" id="table-filter" i18n-placeholder placeholder="Filter..."
12 (keyup)="onSearch($event)"
13 >
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>
16 </div>
17 </div>
18 </ng-template>
19
20 <ng-template pTemplate="header">
21 <tr>
22 <th i18n>Follower handle</th>
23 <th style="width: 100px;" i18n pSortableColumn="state">State <p-sortIcon field="state"></p-sortIcon></th>
24 <th style="width: 100px;" i18n pSortableColumn="score">Score <p-sortIcon field="score"></p-sortIcon></th>
25 <th style="width: 150px;" i18n pSortableColumn="createdAt">Created <p-sortIcon field="createdAt"></p-sortIcon></th>
26 <th style="width: 150px;"></th>
27 </tr>
28 </ng-template>
29
30 <ng-template pTemplate="body" let-follow>
31 <tr>
32 <td>
33 <a [href]="follow.follower.url" i18n-title title="Open actor page in a new tab" target="_blank" rel="noopener noreferrer">
34 {{ follow.follower.name + '@' + follow.follower.host }}
35 <span class="glyphicon glyphicon-new-window"></span>
36 </a>
37 </td>
38
39 <td *ngIf="follow.state === 'accepted'" i18n>Accepted</td>
40 <td *ngIf="follow.state === 'pending'" i18n>Pending</td>
41
42 <td>{{ follow.score }}</td>
43 <td>{{ follow.createdAt | date: 'short' }}</td>
44
45 <td class="action-cell">
46 <ng-container *ngIf="follow.state === 'pending'">
47 <my-button i18n-title title="Accept" icon="tick" (click)="acceptFollower(follow)"></my-button>
48 <my-button i18n-title title="Refuse" icon="cross" (click)="rejectFollower(follow)"></my-button>
49 </ng-container>
50
51 <my-delete-button *ngIf="follow.state === 'accepted'" (click)="deleteFollower(follow)"></my-delete-button>
52 </td>
53 </tr>
54 </ng-template>
55
56 <ng-template pTemplate="emptymessage">
57 <tr>
58 <td colspan="6">
59 <div class="no-results">
60 <ng-container *ngIf="search" i18n>No follower found matching current filters.</ng-container>
61 <ng-container *ngIf="!search" i18n>Your instance doesn't have any follower.</ng-container>
62 </div>
63 </td>
64 </tr>
65 </ng-template>
66 </p-table>