]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/+admin/users/user-list/user-list.component.html
Support is:blacklisted as video-abuse-list filter
[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
b8cf27c0 11 [value]="users" [lazy]="true" [paginator]="totalRecords > 0" [totalRecords]="totalRecords" [rows]="rowsPerPage"
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"
04e0fc48 16>
791645e6
C
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..."
be27ef3b 30 (keyup)="onSearch($event)"
791645e6
C
31 >
32 </div>
33 </div>
34 </ng-template>
35
ab998f7b
C
36 <ng-template pTemplate="header">
37 <tr>
791645e6 38 <th style="width: 40px">
2cae5f13 39 <p-tableHeaderCheckbox></p-tableHeaderCheckbox>
791645e6 40 </th>
2cae5f13 41 <th style="width: 40px"></th>
b1d40cff
C
42 <th i18n pSortableColumn="username">Username <p-sortIcon field="username"></p-sortIcon></th>
43 <th i18n>Email</th>
4511437e 44 <th i18n pSortableColumn="videoQuotaUsed">Video quota <p-sortIcon field="videoQuotaUsed"></p-sortIcon></th>
b1d40cff
C
45 <th i18n>Role</th>
46 <th i18n pSortableColumn="createdAt">Created <p-sortIcon field="createdAt"></p-sortIcon></th>
141b177d 47 <th style="width: 50px;"></th>
ab998f7b
C
48 </tr>
49 </ng-template>
50
141b177d
C
51 <ng-template pTemplate="body" let-expanded="expanded" let-user>
52
791645e6 53 <tr [pSelectableRow]="user" [ngClass]="{ banned: user.blocked }">
d6af8146 54 <td>
791645e6
C
55 <p-tableCheckbox [value]="user"></p-tableCheckbox>
56 </td>
57
d6af8146 58 <td class="expand-cell">
141b177d
C
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>
791645e6 63
141b177d 64 <td>
d6af8146
RK
65 <a i18n-title title="Open account in a new tab" target="_blank" rel="noopener noreferrer" [routerLink]="[ '/accounts/' + user.username ]">
66 <div class="chip two-lines">
67 <img
68 class="avatar"
69 [src]="user?.account?.avatar?.path"
70 (error)="switchToDefaultAvatar($event)"
71 alt="Avatar"
72 >
73 <div>
74 {{ user.account.displayName }}
75 <span class="text-muted">{{ user.username }}</span>
76 </div>
77 </div>
af5767ff
C
78 <span i18n *ngIf="user.blocked" class="banned-info">(banned)</span>
79 </a>
141b177d 80 </td>
5abb9fbb 81
9b82d49d 82 <td *ngIf="!requiresEmailVerification || user.blocked; else emailWithVerificationStatus" [title]="user.email">{{ user.email }}</td>
5abb9fbb 83
fc2ec87a
JM
84 <ng-template #emailWithVerificationStatus>
85 <td *ngIf="user.emailVerified === false; else emailVerifiedNotFalse" i18n-title title="User's email must be verified to login">
86 <em>? {{ user.email }}</em>
87 </td>
88 <ng-template #emailVerifiedNotFalse>
89 <td i18n-title title="User's email is verified / User can login without email verification">
90 &#x2713; {{ user.email }}
91 </td>
92 </ng-template>
93 </ng-template>
5abb9fbb 94
a76138ff 95 <td>{{ user.videoQuotaUsed }} / {{ user.videoQuota }}</td>
ab998f7b 96 <td>{{ user.roleLabel }}</td>
9b82d49d 97 <td [title]="user.createdAt">{{ user.createdAt }}</td>
ab998f7b 98 <td class="action-cell">
791645e6 99 <my-user-moderation-dropdown *ngIf="!isInSelectionMode()" [user]="user" (userChanged)="onUserChanged()" (userDeleted)="onUserChanged()">
79bd2632 100 </my-user-moderation-dropdown>
141b177d
C
101 </td>
102 </tr>
103 </ng-template>
104
105 <ng-template pTemplate="rowexpansion" let-user>
106 <tr class="user-blocked-reason">
107 <td colspan="7">
108 <span i18n class="ban-reason-label">Ban reason:</span>
109 {{ user.blockedReason }}
ab998f7b
C
110 </td>
111 </tr>
112 </ng-template>
113</p-table>
141b177d 114
2fbe7f19 115<my-user-ban-modal #userBanModal (userBanned)="onUserChanged()"></my-user-ban-modal>