Improving select displays, focus box-shadows for paginators, instructions for index url
[oweals/peertube.git] / client / src / app / +admin / users / user-list / user-list.component.html
1 <div class="admin-sub-header">
2   <div i18n class="form-sub-title">Users list</div>
3
4   <a class="add-button" routerLink="/admin/users/create">
5     <my-global-icon iconName="add"></my-global-icon>
6     <ng-container i18n>Create user</ng-container>
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)" dataKey="id"
13   [(selection)]="selectedUsers"
14   [showCurrentPageReport]="true" i18n-currentPageReportTemplate
15   currentPageReportTemplate="Showing {first} to {last} of {totalRecords} users"
16 >
17   <ng-template pTemplate="caption">
18     <div class="caption">
19       <div>
20         <my-action-dropdown
21           *ngIf="isInSelectionMode()" i18n-label label="Batch actions" theme="orange"
22           [actions]="bulkUserActions" [entry]="selectedUsers"
23         >
24         </my-action-dropdown>
25       </div>
26
27       <div>
28         <input
29           type="text" name="table-filter" id="table-filter" i18n-placeholder placeholder="Filter..."
30           (keyup)="onSearch($event)"
31         >
32       </div>
33     </div>
34   </ng-template>
35
36   <ng-template pTemplate="header">
37     <tr>
38       <th style="width: 40px">
39         <p-tableHeaderCheckbox></p-tableHeaderCheckbox>
40       </th>
41       <th style="width: 40px"></th>
42       <th i18n pSortableColumn="username">Username <p-sortIcon field="username"></p-sortIcon></th>
43       <th i18n>Email</th>
44       <th i18n pSortableColumn="videoQuotaUsed">Video quota <p-sortIcon field="videoQuotaUsed"></p-sortIcon></th>
45       <th i18n>Role</th>
46       <th i18n pSortableColumn="createdAt">Created <p-sortIcon field="createdAt"></p-sortIcon></th>
47       <th style="width: 50px;"></th>
48     </tr>
49   </ng-template>
50
51   <ng-template pTemplate="body" let-expanded="expanded" let-user>
52
53     <tr [pSelectableRow]="user" [ngClass]="{ banned: user.blocked }">
54       <td class="expand-cell">
55         <p-tableCheckbox [value]="user"></p-tableCheckbox>
56       </td>
57
58       <td>
59         <span *ngIf="user.blockedReason" class="expander" [pRowToggler]="user">
60           <i [ngClass]="expanded ? 'glyphicon glyphicon-menu-down' : 'glyphicon glyphicon-menu-right'"></i>
61         </span>
62       </td>
63
64       <td>
65         <a i18n-title title="Go to the account page" target="_blank" rel="noopener noreferrer" [routerLink]="[ '/accounts/' + user.username ]">
66           {{ user.username }}
67           <span i18n *ngIf="user.blocked" class="banned-info">(banned)</span>
68         </a>
69       </td>
70
71       <td *ngIf="!requiresEmailVerification || user.blocked; else emailWithVerificationStatus" [title]="user.email">{{ user.email }}</td>
72
73       <ng-template #emailWithVerificationStatus>
74         <td *ngIf="user.emailVerified === false; else emailVerifiedNotFalse" i18n-title title="User's email must be verified to login">
75           <em>? {{ user.email }}</em>
76         </td>
77         <ng-template #emailVerifiedNotFalse>
78           <td i18n-title title="User's email is verified / User can login without email verification">
79             &#x2713; {{ user.email }}
80           </td>
81         </ng-template>
82       </ng-template>
83
84       <td>{{ user.videoQuotaUsed }} / {{ user.videoQuota }}</td>
85       <td>{{ user.roleLabel }}</td>
86       <td [title]="user.createdAt">{{ user.createdAt }}</td>
87       <td class="action-cell">
88         <my-user-moderation-dropdown *ngIf="!isInSelectionMode()" [user]="user" (userChanged)="onUserChanged()" (userDeleted)="onUserChanged()">
89         </my-user-moderation-dropdown>
90       </td>
91     </tr>
92   </ng-template>
93
94   <ng-template pTemplate="rowexpansion" let-user>
95     <tr class="user-blocked-reason">
96       <td colspan="7">
97         <span i18n class="ban-reason-label">Ban reason:</span>
98         {{ user.blockedReason }}
99       </td>
100     </tr>
101   </ng-template>
102 </p-table>
103
104 <my-user-ban-modal #userBanModal (userBanned)="onUserChanged()"></my-user-ban-modal>