aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+admin/users/user-list/user-list.component.html
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-10-08 15:15:11 +0200
committerChocobozzz <me@florianbigard.com>2018-10-08 15:55:32 +0200
commit791645e620fb98c6e7c32271d91d91ff7e41b892 (patch)
treeb9554ae53c93c1e699d8cc2e137128e599a4c045 /client/src/app/+admin/users/user-list/user-list.component.html
parent80c7336a896d9eb1e71b7c89a72285f914259457 (diff)
downloadPeerTube-791645e620fb98c6e7c32271d91d91ff7e41b892.tar.gz
PeerTube-791645e620fb98c6e7c32271d91d91ff7e41b892.tar.zst
PeerTube-791645e620fb98c6e7c32271d91d91ff7e41b892.zip
Add bulk actions in users table
Diffstat (limited to 'client/src/app/+admin/users/user-list/user-list.component.html')
-rw-r--r--client/src/app/+admin/users/user-list/user-list.component.html31
1 files changed, 29 insertions, 2 deletions
diff --git a/client/src/app/+admin/users/user-list/user-list.component.html b/client/src/app/+admin/users/user-list/user-list.component.html
index cca057ba1..9d1f2e34a 100644
--- a/client/src/app/+admin/users/user-list/user-list.component.html
+++ b/client/src/app/+admin/users/user-list/user-list.component.html
@@ -10,10 +10,31 @@
10<p-table 10<p-table
11 [value]="users" [lazy]="true" [paginator]="true" [totalRecords]="totalRecords" [rows]="rowsPerPage" 11 [value]="users" [lazy]="true" [paginator]="true" [totalRecords]="totalRecords" [rows]="rowsPerPage"
12 [sortField]="sort.field" [sortOrder]="sort.order" (onLazyLoad)="loadLazy($event)" dataKey="id" 12 [sortField]="sort.field" [sortOrder]="sort.order" (onLazyLoad)="loadLazy($event)" dataKey="id"
13 [(selection)]="selectedUsers"
13> 14>
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
14 <ng-template pTemplate="header"> 33 <ng-template pTemplate="header">
15 <tr> 34 <tr>
16 <th style="width: 40px"></th> 35 <th style="width: 40px"></th>
36 <th style="width: 40px">
37 </th>
17 <th i18n pSortableColumn="username">Username <p-sortIcon field="username"></p-sortIcon></th> 38 <th i18n pSortableColumn="username">Username <p-sortIcon field="username"></p-sortIcon></th>
18 <th i18n>Email</th> 39 <th i18n>Email</th>
19 <th i18n>Video quota</th> 40 <th i18n>Video quota</th>
@@ -25,12 +46,17 @@
25 46
26 <ng-template pTemplate="body" let-expanded="expanded" let-user> 47 <ng-template pTemplate="body" let-expanded="expanded" let-user>
27 48
28 <tr [ngClass]="{ banned: user.blocked }"> 49 <tr [pSelectableRow]="user" [ngClass]="{ banned: user.blocked }">
50 <td>
51 <p-tableCheckbox [value]="user"></p-tableCheckbox>
52 </td>
53
29 <td> 54 <td>
30 <span *ngIf="user.blockedReason" class="expander" [pRowToggler]="user"> 55 <span *ngIf="user.blockedReason" class="expander" [pRowToggler]="user">
31 <i [ngClass]="expanded ? 'glyphicon glyphicon-menu-down' : 'glyphicon glyphicon-menu-right'"></i> 56 <i [ngClass]="expanded ? 'glyphicon glyphicon-menu-down' : 'glyphicon glyphicon-menu-right'"></i>
32 </span> 57 </span>
33 </td> 58 </td>
59
34 <td> 60 <td>
35 {{ user.username }} 61 {{ user.username }}
36 <span *ngIf="user.blocked" class="banned-info">(banned)</span> 62 <span *ngIf="user.blocked" class="banned-info">(banned)</span>
@@ -40,7 +66,7 @@
40 <td>{{ user.roleLabel }}</td> 66 <td>{{ user.roleLabel }}</td>
41 <td>{{ user.createdAt }}</td> 67 <td>{{ user.createdAt }}</td>
42 <td class="action-cell"> 68 <td class="action-cell">
43 <my-user-moderation-dropdown [user]="user" (userChanged)="onUserChanged()" (userDeleted)="onUserChanged()"> 69 <my-user-moderation-dropdown *ngIf="!isInSelectionMode()" [user]="user" (userChanged)="onUserChanged()" (userDeleted)="onUserChanged()">
44 </my-user-moderation-dropdown> 70 </my-user-moderation-dropdown>
45 </td> 71 </td>
46 </tr> 72 </tr>
@@ -56,3 +82,4 @@
56 </ng-template> 82 </ng-template>
57</p-table> 83</p-table>
58 84
85<my-user-ban-modal #userBanModal (userBanned)="onUsersBanned()"></my-user-ban-modal>