]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/+admin/users/user-list/user-list.component.html
Add bulk actions in users table
[github/Chocobozzz/PeerTube.git] / client / src / app / +admin / users / user-list / user-list.component.html
CommitLineData
cd83ea1b 1<div class="admin-sub-header">
b1d40cff 2 <div i18n class="form-sub-title">Users list</div>
dfe3ec6b 3
4c200caa 4 <a class="add-button" routerLink="/admin/users/create">
04e0fc48 5 <span class="icon icon-add"></span>
b1d40cff 6 <ng-container i18n>Create user</ng-container>
04e0fc48 7 </a>
897ec54d 8</div>
04e0fc48 9
ab998f7b
C
10<p-table
11 [value]="users" [lazy]="true" [paginator]="true" [totalRecords]="totalRecords" [rows]="rowsPerPage"
141b177d 12 [sortField]="sort.field" [sortOrder]="sort.order" (onLazyLoad)="loadLazy($event)" dataKey="id"
791645e6 13 [(selection)]="selectedUsers"
04e0fc48 14>
791645e6
C
15 <ng-template pTemplate="caption">
16 <div class="caption">
17 <div>
18 <my-action-dropdown
19 *ngIf="isInSelectionMode()" i18n-label label="Batch actions" theme="orange"
20 [actions]="bulkUserActions" [entry]="selectedUsers"
21 >
22 </my-action-dropdown>
23 </div>
24
25 <div>
26 <input
27 type="text" name="table-filter" id="table-filter" i18n-placeholder placeholder="Filter..."
28 >
29 </div>
30 </div>
31 </ng-template>
32
ab998f7b
C
33 <ng-template pTemplate="header">
34 <tr>
141b177d 35 <th style="width: 40px"></th>
791645e6
C
36 <th style="width: 40px">
37 </th>
b1d40cff
C
38 <th i18n pSortableColumn="username">Username <p-sortIcon field="username"></p-sortIcon></th>
39 <th i18n>Email</th>
40 <th i18n>Video quota</th>
41 <th i18n>Role</th>
42 <th i18n pSortableColumn="createdAt">Created <p-sortIcon field="createdAt"></p-sortIcon></th>
141b177d 43 <th style="width: 50px;"></th>
ab998f7b
C
44 </tr>
45 </ng-template>
46
141b177d
C
47 <ng-template pTemplate="body" let-expanded="expanded" let-user>
48
791645e6
C
49 <tr [pSelectableRow]="user" [ngClass]="{ banned: user.blocked }">
50 <td>
51 <p-tableCheckbox [value]="user"></p-tableCheckbox>
52 </td>
53
141b177d
C
54 <td>
55 <span *ngIf="user.blockedReason" class="expander" [pRowToggler]="user">
56 <i [ngClass]="expanded ? 'glyphicon glyphicon-menu-down' : 'glyphicon glyphicon-menu-right'"></i>
57 </span>
58 </td>
791645e6 59
141b177d
C
60 <td>
61 {{ user.username }}
62 <span *ngIf="user.blocked" class="banned-info">(banned)</span>
63 </td>
ab998f7b 64 <td>{{ user.email }}</td>
a76138ff 65 <td>{{ user.videoQuotaUsed }} / {{ user.videoQuota }}</td>
ab998f7b
C
66 <td>{{ user.roleLabel }}</td>
67 <td>{{ user.createdAt }}</td>
68 <td class="action-cell">
791645e6 69 <my-user-moderation-dropdown *ngIf="!isInSelectionMode()" [user]="user" (userChanged)="onUserChanged()" (userDeleted)="onUserChanged()">
79bd2632 70 </my-user-moderation-dropdown>
141b177d
C
71 </td>
72 </tr>
73 </ng-template>
74
75 <ng-template pTemplate="rowexpansion" let-user>
76 <tr class="user-blocked-reason">
77 <td colspan="7">
78 <span i18n class="ban-reason-label">Ban reason:</span>
79 {{ user.blockedReason }}
ab998f7b
C
80 </td>
81 </tr>
82 </ng-template>
83</p-table>
141b177d 84
791645e6 85<my-user-ban-modal #userBanModal (userBanned)="onUsersBanned()"></my-user-ban-modal>