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