]>
Commit | Line | Data |
---|---|---|
ed5bb517 K |
1 | <h1> |
2 | <my-global-icon iconName="follower" aria-hidden="true"></my-global-icon> | |
4d029ef8 | 3 | <ng-container i18n>Followers of your instance</ng-container> |
ed5bb517 K |
4 | </h1> |
5 | ||
ab998f7b | 6 | <p-table |
0667dbaf C |
7 | [value]="followers" [paginator]="totalRecords > 0" [totalRecords]="totalRecords" [rows]="rowsPerPage" [first]="pagination.start" |
8 | [rowsPerPageOptions]="rowsPerPageOptions" [sortField]="sort.field" [sortOrder]="sort.order" | |
2e46eb97 | 9 | [lazy]="true" (onLazyLoad)="loadLazy($event)" [lazyLoadOnInit]="false" |
b8cf27c0 | 10 | [showCurrentPageReport]="true" i18n-currentPageReportTemplate |
f66b8d12 | 11 | currentPageReportTemplate="Showing {{'{first}'}} to {{'{last}'}} of {{'{totalRecords}'}} followers" |
04e0fc48 | 12 | > |
b014b6b9 C |
13 | <ng-template pTemplate="caption"> |
14 | <div class="caption"> | |
4c8749cb | 15 | <div class="ms-auto"> |
073deef8 | 16 | <my-advanced-input-filter [filters]="searchFilters" (search)="onSearch($event)"></my-advanced-input-filter> |
25a42e29 | 17 | </div> |
b014b6b9 C |
18 | </div> |
19 | </ng-template> | |
20 | ||
ab998f7b C |
21 | <ng-template pTemplate="header"> |
22 | <tr> | |
e0436741 | 23 | <th style="width: 150px;" i18n>Actions</th> |
4d029ef8 | 24 | <th i18n>Follower</th> |
68d19a0a RK |
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> | |
df4c603d | 27 | <th style="width: 150px;" i18n pSortableColumn="createdAt">Created <p-sortIcon field="createdAt"></p-sortIcon></th> |
ab998f7b C |
28 | </tr> |
29 | </ng-template> | |
30 | ||
31 | <ng-template pTemplate="body" let-follow> | |
32 | <tr> | |
30814423 | 33 | <td class="action-cell"> |
073deef8 C |
34 | <my-button *ngIf="follow.state !== 'accepted'" i18n-title title="Accept" icon="tick" (click)="acceptFollower(follow)"></my-button> |
35 | <my-button *ngIf="follow.state !== 'rejected'" i18n-title title="Refuse" icon="cross" (click)="rejectFollower(follow)"></my-button> | |
30814423 | 36 | |
073deef8 | 37 | <my-delete-button *ngIf="follow.state === 'rejected'" (click)="deleteFollower(follow)"></my-delete-button> |
30814423 | 38 | </td> |
1d26d05f RK |
39 | <td> |
40 | <a [href]="follow.follower.url" i18n-title title="Open actor page in a new tab" target="_blank" rel="noopener noreferrer"> | |
41 | {{ follow.follower.name + '@' + follow.follower.host }} | |
c2faa073 | 42 | <my-global-icon iconName="external-link"></my-global-icon> |
1d26d05f RK |
43 | </a> |
44 | </td> | |
3827c3b3 | 45 | |
073deef8 C |
46 | <td> |
47 | <span *ngIf="follow.state === 'accepted'" class="pt-badge badge-green" i18n>Accepted</span> | |
48 | <span *ngIf="follow.state === 'pending'" class="pt-badge badge-yellow" i18n>Pending</span> | |
49 | <span *ngIf="follow.state === 'rejected'" class="pt-badge badge-red" i18n>Rejected</span> | |
bc99dfe5 | 50 | </td> |
3827c3b3 | 51 | |
0dc64777 | 52 | <td>{{ follow.score }}</td> |
7f979fd8 | 53 | <td>{{ follow.createdAt | date: 'short' }}</td> |
ab998f7b C |
54 | </tr> |
55 | </ng-template> | |
d3840613 RK |
56 | |
57 | <ng-template pTemplate="emptymessage"> | |
58 | <tr> | |
5b0ec7cd | 59 | <td colspan="5"> |
22839330 | 60 | <div class="no-results"> |
d3840613 RK |
61 | <ng-container *ngIf="search" i18n>No follower found matching current filters.</ng-container> |
62 | <ng-container *ngIf="!search" i18n>Your instance doesn't have any follower.</ng-container> | |
63 | </div> | |
64 | </td> | |
65 | </tr> | |
66 | </ng-template> | |
ab998f7b | 67 | </p-table> |