]>
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" |
cd940f40 | 12 | [(selection)]="selectedRows" |
04e0fc48 | 13 | > |
b014b6b9 C |
14 | <ng-template pTemplate="caption"> |
15 | <div class="caption"> | |
e3d6c643 C |
16 | <div class="left-buttons"> |
17 | <my-action-dropdown | |
18 | *ngIf="isInSelectionMode()" i18n-label label="Batch actions" theme="orange" | |
cd940f40 | 19 | [actions]="bulkActions" [entry]="selectedRows" |
e3d6c643 C |
20 | > |
21 | </my-action-dropdown> | |
22 | </div> | |
23 | ||
4c8749cb | 24 | <div class="ms-auto"> |
073deef8 | 25 | <my-advanced-input-filter [filters]="searchFilters" (search)="onSearch($event)"></my-advanced-input-filter> |
25a42e29 | 26 | </div> |
b014b6b9 C |
27 | </div> |
28 | </ng-template> | |
29 | ||
ab998f7b C |
30 | <ng-template pTemplate="header"> |
31 | <tr> | |
e3d6c643 C |
32 | <th style="width: 40px"> |
33 | <p-tableHeaderCheckbox ariaLabel="Select all rows" i18n-ariaLabel></p-tableHeaderCheckbox> | |
34 | </th> | |
e0436741 | 35 | <th style="width: 150px;" i18n>Actions</th> |
4d029ef8 | 36 | <th i18n>Follower</th> |
68d19a0a RK |
37 | <th style="width: 100px;" i18n pSortableColumn="state">State <p-sortIcon field="state"></p-sortIcon></th> |
38 | <th style="width: 100px;" i18n pSortableColumn="score">Score <p-sortIcon field="score"></p-sortIcon></th> | |
df4c603d | 39 | <th style="width: 150px;" i18n pSortableColumn="createdAt">Created <p-sortIcon field="createdAt"></p-sortIcon></th> |
ab998f7b C |
40 | </tr> |
41 | </ng-template> | |
42 | ||
43 | <ng-template pTemplate="body" let-follow> | |
44 | <tr> | |
e3d6c643 C |
45 | <td class="checkbox-cell"> |
46 | <p-tableCheckbox [value]="follow" ariaLabel="Select this row" i18n-ariaLabel></p-tableCheckbox> | |
47 | </td> | |
48 | ||
30814423 | 49 | <td class="action-cell"> |
e3d6c643 C |
50 | <my-button *ngIf="follow.state !== 'accepted'" i18n-title title="Accept" icon="tick" (click)="acceptFollower([ follow ])"></my-button> |
51 | <my-button *ngIf="follow.state !== 'rejected'" i18n-title title="Reject" icon="cross" (click)="rejectFollower([ follow ])"></my-button> | |
30814423 | 52 | |
e3d6c643 | 53 | <my-delete-button *ngIf="follow.state === 'rejected'" (click)="deleteFollowers([ follow ])"></my-delete-button> |
30814423 | 54 | </td> |
1d26d05f RK |
55 | <td> |
56 | <a [href]="follow.follower.url" i18n-title title="Open actor page in a new tab" target="_blank" rel="noopener noreferrer"> | |
e3d6c643 | 57 | {{ buildFollowerName(follow) }} |
c2faa073 | 58 | <my-global-icon iconName="external-link"></my-global-icon> |
1d26d05f RK |
59 | </a> |
60 | </td> | |
3827c3b3 | 61 | |
073deef8 C |
62 | <td> |
63 | <span *ngIf="follow.state === 'accepted'" class="pt-badge badge-green" i18n>Accepted</span> | |
64 | <span *ngIf="follow.state === 'pending'" class="pt-badge badge-yellow" i18n>Pending</span> | |
65 | <span *ngIf="follow.state === 'rejected'" class="pt-badge badge-red" i18n>Rejected</span> | |
bc99dfe5 | 66 | </td> |
3827c3b3 | 67 | |
0dc64777 | 68 | <td>{{ follow.score }}</td> |
7f979fd8 | 69 | <td>{{ follow.createdAt | date: 'short' }}</td> |
ab998f7b C |
70 | </tr> |
71 | </ng-template> | |
d3840613 RK |
72 | |
73 | <ng-template pTemplate="emptymessage"> | |
74 | <tr> | |
e3d6c643 | 75 | <td colspan="6"> |
22839330 | 76 | <div class="no-results"> |
d3840613 RK |
77 | <ng-container *ngIf="search" i18n>No follower found matching current filters.</ng-container> |
78 | <ng-container *ngIf="!search" i18n>Your instance doesn't have any follower.</ng-container> | |
79 | </div> | |
80 | </td> | |
81 | </tr> | |
82 | </ng-template> | |
ab998f7b | 83 | </p-table> |