]>
Commit | Line | Data |
---|---|---|
1 | <div class="admin-sub-header"> | |
2 | <div class="admin-sub-title">Users list</div> | |
3 | ||
4 | <a class="add-button" routerLink="/admin/users/add"> | |
5 | <span class="icon icon-add"></span> | |
6 | Add user | |
7 | </a> | |
8 | </div> | |
9 | ||
10 | <p-table | |
11 | [value]="users" [lazy]="true" [paginator]="true" [totalRecords]="totalRecords" [rows]="rowsPerPage" | |
12 | [sortField]="sort.field" [sortOrder]="sort.order" (onLazyLoad)="loadLazy($event)" | |
13 | > | |
14 | <ng-template pTemplate="header"> | |
15 | <tr> | |
16 | <th pSortableColumn="username">Username <p-sortIcon field="username"></p-sortIcon></th> | |
17 | <th>Email</th> | |
18 | <th>Video quota</th> | |
19 | <th>Role</th> | |
20 | <th pSortableColumn="createdAt">Created <p-sortIcon field="createdAt"></p-sortIcon></th> | |
21 | <th></th> | |
22 | </tr> | |
23 | </ng-template> | |
24 | ||
25 | <ng-template pTemplate="body" let-user> | |
26 | <tr> | |
27 | <td>{{ user.username }}</td> | |
28 | <td>{{ user.email }}</td> | |
29 | <td>{{ user.videoQuota }}</td> | |
30 | <td>{{ user.roleLabel }}</td> | |
31 | <td>{{ user.createdAt }}</td> | |
32 | <td class="action-cell"> | |
33 | <my-edit-button [routerLink]="getRouterUserEditLink(user)"></my-edit-button> | |
34 | <my-delete-button (click)="removeUser(user)"></my-delete-button> | |
35 | </td> | |
36 | </tr> | |
37 | </ng-template> | |
38 | </p-table> |