]>
Commit | Line | Data |
---|---|---|
9589907c C |
1 | <h1> |
2 | <my-global-icon iconName="user" aria-hidden="true"></my-global-icon> | |
3 | <ng-container i18n>Registration requests</ng-container> | |
4 | </h1> | |
5 | ||
6 | <p-table | |
7 | [value]="registrations" [paginator]="totalRecords > 0" [totalRecords]="totalRecords" [rows]="rowsPerPage" [first]="pagination.start" | |
8 | [rowsPerPageOptions]="rowsPerPageOptions" [sortField]="sort.field" [sortOrder]="sort.order" dataKey="id" | |
9 | [lazy]="true" (onLazyLoad)="loadLazy($event)" [lazyLoadOnInit]="false" | |
cd940f40 | 10 | [(selection)]="selectedRows" [showCurrentPageReport]="true" i18n-currentPageReportTemplate |
9589907c C |
11 | currentPageReportTemplate="Showing {{'{first}'}} to {{'{last}'}} of {{'{totalRecords}'}} registrations" |
12 | [expandedRowKeys]="expandedRows" | |
13 | > | |
14 | <ng-template pTemplate="caption"> | |
15 | <div class="caption"> | |
cd940f40 C |
16 | <div class="left-buttons"> |
17 | <my-action-dropdown | |
18 | *ngIf="isInSelectionMode()" i18n-label label="Batch actions" theme="orange" | |
19 | [actions]="bulkActions" [entry]="selectedRows" | |
20 | > | |
21 | </my-action-dropdown> | |
22 | </div> | |
23 | ||
9589907c C |
24 | <div class="ms-auto"> |
25 | <my-advanced-input-filter (search)="onSearch($event)"></my-advanced-input-filter> | |
26 | </div> | |
27 | </div> | |
28 | </ng-template> | |
29 | ||
30 | <ng-template pTemplate="header"> | |
31 | <tr> <!-- header --> | |
cd940f40 C |
32 | <th style="width: 40px"> |
33 | <p-tableHeaderCheckbox ariaLabel="Select all rows" i18n-ariaLabel></p-tableHeaderCheckbox> | |
34 | </th> | |
9589907c C |
35 | <th style="width: 40px;"></th> |
36 | <th style="width: 150px;"></th> | |
37 | <th i18n>Account</th> | |
38 | <th i18n>Email</th> | |
39 | <th i18n>Channel</th> | |
40 | <th i18n>Registration reason</th> | |
41 | <th i18n pSortableColumn="state" style="width: 80px;">State <p-sortIcon field="state"></p-sortIcon></th> | |
42 | <th i18n>Moderation response</th> | |
43 | <th style="width: 150px;" i18n pSortableColumn="createdAt">Requested on <p-sortIcon field="createdAt"></p-sortIcon></th> | |
44 | </tr> | |
45 | </ng-template> | |
46 | ||
47 | <ng-template pTemplate="body" let-expanded="expanded" let-registration> | |
cd940f40 C |
48 | <tr [pSelectableRow]="registration"> |
49 | <td class="checkbox-cell"> | |
50 | <p-tableCheckbox [value]="registration" ariaLabel="Select this row" i18n-ariaLabel></p-tableCheckbox> | |
51 | </td> | |
52 | ||
9589907c C |
53 | <td class="expand-cell" [pRowToggler]="registration"> |
54 | <my-table-expander-icon [expanded]="expanded"></my-table-expander-icon> | |
55 | </td> | |
56 | ||
57 | <td class="action-cell"> | |
58 | <my-action-dropdown | |
59 | [ngClass]="{ 'show': expanded }" placement="bottom-right top-right left auto" container="body" | |
60 | i18n-label label="Actions" [actions]="registrationActions" [entry]="registration" | |
61 | ></my-action-dropdown> | |
62 | </td> | |
63 | ||
64 | <td> | |
65 | <div class="chip two-lines"> | |
66 | <div> | |
67 | <span>{{ registration.username }}</span> | |
68 | <span class="muted">{{ registration.accountDisplayName }}</span> | |
69 | </div> | |
70 | </div> | |
71 | </td> | |
72 | ||
73 | <td> | |
74 | <my-user-email-info [entry]="registration" [requiresEmailVerification]="requiresEmailVerification"></my-user-email-info> | |
75 | </td> | |
76 | ||
77 | <td> | |
78 | <div class="chip two-lines"> | |
79 | <div> | |
80 | <span>{{ registration.channelHandle }}</span> | |
81 | <span class="muted">{{ registration.channelDisplayName }}</span> | |
82 | </div> | |
83 | </div> | |
84 | </td> | |
85 | ||
86 | <td container="body" placement="left auto" [ngbTooltip]="registration.registrationReason"> | |
87 | {{ registration.registrationReason }} | |
88 | </td> | |
89 | ||
90 | <td class="c-hand abuse-states" [pRowToggler]="registration"> | |
91 | <my-global-icon *ngIf="isRegistrationAccepted(registration)" [title]="registration.state.label" iconName="tick"></my-global-icon> | |
92 | <my-global-icon *ngIf="isRegistrationRejected(registration)" [title]="registration.state.label" iconName="cross"></my-global-icon> | |
93 | </td> | |
94 | ||
95 | <td container="body" placement="left auto" [ngbTooltip]="registration.moderationResponse"> | |
96 | {{ registration.moderationResponse }} | |
97 | </td> | |
98 | ||
99 | <td class="c-hand" [pRowToggler]="registration">{{ registration.createdAt | date: 'short' }}</td> | |
100 | </tr> | |
101 | </ng-template> | |
102 | ||
103 | <ng-template pTemplate="rowexpansion" let-registration> | |
104 | <tr> | |
105 | <td colspan="9"> | |
106 | <div class="moderation-expanded"> | |
107 | <div class="left"> | |
108 | <div class="d-flex"> | |
109 | <span class="moderation-expanded-label" i18n>Registration reason:</span> | |
110 | <span class="moderation-expanded-text" [innerHTML]="registration.registrationReasonHTML"></span> | |
111 | </div> | |
112 | ||
113 | <div *ngIf="registration.moderationResponse"> | |
114 | <span class="moderation-expanded-label" i18n>Moderation response:</span> | |
115 | <span class="moderation-expanded-text" [innerHTML]="registration.moderationResponseHTML"></span> | |
116 | </div> | |
117 | </div> | |
118 | </div> | |
119 | </td> | |
120 | </tr> | |
121 | </ng-template> | |
122 | ||
123 | <ng-template pTemplate="emptymessage"> | |
124 | <tr> | |
125 | <td colspan="9"> | |
126 | <div class="no-results"> | |
127 | <ng-container *ngIf="search" i18n>No registrations found matching current filters.</ng-container> | |
128 | <ng-container *ngIf="!search" i18n>No registrations found.</ng-container> | |
129 | </div> | |
130 | </td> | |
131 | </tr> | |
132 | </ng-template> | |
133 | </p-table> | |
134 | ||
135 | <my-process-registration-modal #processRegistrationModal (registrationProcessed)="onRegistrationProcessed()"></my-process-registration-modal> |