]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/+admin/users/user-list/user-list.component.html
Fix rowsPerPage change, add filter clear button, update video-abuse-list search query...
[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">
457bb213 5 <my-global-icon iconName="add"></my-global-icon>
b1d40cff 6 <ng-container i18n>Create user</ng-container>
04e0fc48 7 </a>
897ec54d 8</div>
04e0fc48 9
ab998f7b 10<p-table
25a42e29 11 [value]="users" [lazy]="true" [paginator]="totalRecords > 0" [totalRecords]="totalRecords" [rows]="rowsPerPage" [rowsPerPageOptions]="rowsPerPageOptions"
141b177d 12 [sortField]="sort.field" [sortOrder]="sort.order" (onLazyLoad)="loadLazy($event)" dataKey="id"
791645e6 13 [(selection)]="selectedUsers"
2bc9bd08 14 [showCurrentPageReport]="true" i18n-currentPageReportTemplate
45c14ae1 15 currentPageReportTemplate="Showing {{'{first}'}} to {{'{last}'}} of {{'{totalRecords}'}} users"
25a42e29 16 (onPage)="onPage($event)" [expandedRowKeys]="expandedRows"
04e0fc48 17>
791645e6
C
18 <ng-template pTemplate="caption">
19 <div class="caption">
20 <div>
21 <my-action-dropdown
22 *ngIf="isInSelectionMode()" i18n-label label="Batch actions" theme="orange"
23 [actions]="bulkUserActions" [entry]="selectedUsers"
24 >
25 </my-action-dropdown>
26 </div>
27
25a42e29 28 <div class="has-feedback has-clear">
791645e6
C
29 <input
30 type="text" name="table-filter" id="table-filter" i18n-placeholder placeholder="Filter..."
be27ef3b 31 (keyup)="onSearch($event)"
791645e6 32 >
25a42e29
RK
33 <a class="glyphicon glyphicon-remove-sign form-control-feedback form-control-clear" (click)="resetSearch()"></a>
34 <span class="sr-only" i18n>Clear filters</span>
791645e6
C
35 </div>
36 </div>
37 </ng-template>
38
ab998f7b
C
39 <ng-template pTemplate="header">
40 <tr>
791645e6 41 <th style="width: 40px">
2cae5f13 42 <p-tableHeaderCheckbox></p-tableHeaderCheckbox>
791645e6 43 </th>
2cae5f13 44 <th style="width: 40px"></th>
b1d40cff
C
45 <th i18n pSortableColumn="username">Username <p-sortIcon field="username"></p-sortIcon></th>
46 <th i18n>Email</th>
4511437e 47 <th i18n pSortableColumn="videoQuotaUsed">Video quota <p-sortIcon field="videoQuotaUsed"></p-sortIcon></th>
b1d40cff
C
48 <th i18n>Role</th>
49 <th i18n pSortableColumn="createdAt">Created <p-sortIcon field="createdAt"></p-sortIcon></th>
141b177d 50 <th style="width: 50px;"></th>
ab998f7b
C
51 </tr>
52 </ng-template>
53
141b177d
C
54 <ng-template pTemplate="body" let-expanded="expanded" let-user>
55
791645e6 56 <tr [pSelectableRow]="user" [ngClass]="{ banned: user.blocked }">
d6af8146 57 <td>
791645e6
C
58 <p-tableCheckbox [value]="user"></p-tableCheckbox>
59 </td>
60
d6af8146 61 <td class="expand-cell">
141b177d
C
62 <span *ngIf="user.blockedReason" class="expander" [pRowToggler]="user">
63 <i [ngClass]="expanded ? 'glyphicon glyphicon-menu-down' : 'glyphicon glyphicon-menu-right'"></i>
64 </span>
65 </td>
791645e6 66
141b177d 67 <td>
d6af8146
RK
68 <a i18n-title title="Open account in a new tab" target="_blank" rel="noopener noreferrer" [routerLink]="[ '/accounts/' + user.username ]">
69 <div class="chip two-lines">
70 <img
71 class="avatar"
72 [src]="user?.account?.avatar?.path"
73 (error)="switchToDefaultAvatar($event)"
74 alt="Avatar"
75 >
76 <div>
77 {{ user.account.displayName }}
78 <span class="text-muted">{{ user.username }}</span>
79 </div>
80 </div>
af5767ff
C
81 <span i18n *ngIf="user.blocked" class="banned-info">(banned)</span>
82 </a>
141b177d 83 </td>
5abb9fbb 84
9b82d49d 85 <td *ngIf="!requiresEmailVerification || user.blocked; else emailWithVerificationStatus" [title]="user.email">{{ user.email }}</td>
5abb9fbb 86
fc2ec87a
JM
87 <ng-template #emailWithVerificationStatus>
88 <td *ngIf="user.emailVerified === false; else emailVerifiedNotFalse" i18n-title title="User's email must be verified to login">
89 <em>? {{ user.email }}</em>
90 </td>
91 <ng-template #emailVerifiedNotFalse>
92 <td i18n-title title="User's email is verified / User can login without email verification">
93 &#x2713; {{ user.email }}
94 </td>
95 </ng-template>
96 </ng-template>
5abb9fbb 97
a76138ff 98 <td>{{ user.videoQuotaUsed }} / {{ user.videoQuota }}</td>
ab998f7b 99 <td>{{ user.roleLabel }}</td>
9b82d49d 100 <td [title]="user.createdAt">{{ user.createdAt }}</td>
ab998f7b 101 <td class="action-cell">
791645e6 102 <my-user-moderation-dropdown *ngIf="!isInSelectionMode()" [user]="user" (userChanged)="onUserChanged()" (userDeleted)="onUserChanged()">
79bd2632 103 </my-user-moderation-dropdown>
141b177d
C
104 </td>
105 </tr>
106 </ng-template>
107
108 <ng-template pTemplate="rowexpansion" let-user>
109 <tr class="user-blocked-reason">
110 <td colspan="7">
111 <span i18n class="ban-reason-label">Ban reason:</span>
112 {{ user.blockedReason }}
ab998f7b
C
113 </td>
114 </tr>
115 </ng-template>
116</p-table>
141b177d 117
2fbe7f19 118<my-user-ban-modal #userBanModal (userBanned)="onUserChanged()"></my-user-ban-modal>