+ <th style="width: 40px">
+ <p-tableHeaderCheckbox ariaLabel="Select all rows" i18n-ariaLabel></p-tableHeaderCheckbox>
+ </th>
+ <th style="width: 40px"></th>
+ <th style="width: 60px;">
+ <div class="c-hand column-toggle" ngbDropdown placement="bottom-left auto" container="body" autoClose="outside">
+ <my-global-icon iconName="columns" ngbDropdownToggle></my-global-icon>
+
+ <div role="menu" class="dropdown-menu" ngbDropdownMenu>
+ <div class="dropdown-header" i18n>Table parameters</div>
+ <div ngbDropdownItem class="dropdown-item">
+ <my-select-checkbox
+ name="columns"
+ [availableItems]="columns"
+ [selectableGroup]="false" [(ngModel)]="selectedColumns"
+ i18n-placeholder placeholder="Select columns"
+ >
+ </my-select-checkbox>
+ </div>
+ <div ngbDropdownItem class="dropdown-item">
+ <my-peertube-checkbox inputName="highlightBannedUsers" [(ngModel)]="highlightBannedUsers"
+ i18n-labelText labelText="Highlight banned users"></my-peertube-checkbox>
+ </div>
+ </div>
+ </div>
+ </th>
+ <th *ngIf="isSelected('username')" pResizableColumn pSortableColumn="username">{{ getColumn('username').label }} <p-sortIcon field="username"></p-sortIcon></th>
+ <th *ngIf="isSelected('email')">{{ getColumn('email').label }}</th>
+ <th *ngIf="isSelected('quota')" style="width: 160px;" pSortableColumn="videoQuotaUsed">{{ getColumn('quota').label }} <p-sortIcon field="videoQuotaUsed"></p-sortIcon></th>
+ <th *ngIf="isSelected('quotaDaily')" style="width: 160px;">{{ getColumn('quotaDaily').label }}</th>
+ <th *ngIf="isSelected('role')" style="width: 120px;" pSortableColumn="role">{{ getColumn('role').label }} <p-sortIcon field="role"></p-sortIcon></th>
+ <th *ngIf="isSelected('pluginAuth')" style="width: 140px;" pResizableColumn >{{ getColumn('pluginAuth').label }}</th>
+ <th *ngIf="isSelected('createdAt')" style="width: 150px;" pSortableColumn="createdAt">{{ getColumn('createdAt').label }} <p-sortIcon field="createdAt"></p-sortIcon></th>
+ <th *ngIf="isSelected('lastLoginDate')" style="width: 150px;" pSortableColumn="lastLoginDate">{{ getColumn('lastLoginDate').label }} <p-sortIcon field="lastLoginDate"></p-sortIcon></th>
+ </tr>
+ </ng-template>
+
+ <ng-template pTemplate="body" let-expanded="expanded" let-user>
+
+ <tr [pSelectableRow]="user" [ngClass]="{ banned: highlightBannedUsers && user.blocked }">
+ <td class="checkbox-cell">
+ <p-tableCheckbox [value]="user" ariaLabel="Select this row" i18n-ariaLabel></p-tableCheckbox>
+ </td>
+
+ <td class="expand-cell">
+ <span *ngIf="user.blockedReason" class="expander" [pRowToggler]="user">
+ <i [ngClass]="expanded ? 'glyphicon glyphicon-menu-down' : 'glyphicon glyphicon-menu-right'"></i>
+ </span>
+ </td>
+
+ <td class="action-cell">
+ <my-user-moderation-dropdown *ngIf="!isInSelectionMode()" [user]="user" container="body"
+ (userChanged)="onUserChanged()" (userDeleted)="onUserChanged()">
+ </my-user-moderation-dropdown>
+ </td>
+
+ <td *ngIf="isSelected('username')">
+ <a i18n-title title="Open account in a new tab" target="_blank" rel="noopener noreferrer" [routerLink]="[ '/accounts/' + user.username ]">
+ <div class="chip two-lines">
+ <my-account-avatar [account]="user?.account"></my-account-avatar>
+ <div>
+ <span class="user-table-primary-text">{{ user.account.displayName }}</span>
+ <span class="text-muted">{{ user.username }}</span>
+ </div>
+ </div>
+ </a>
+ </td>
+
+ <td *ngIf="isSelected('email')" [title]="user.email">
+ <ng-container *ngIf="!requiresEmailVerification || user.blocked; else emailWithVerificationStatus">
+ <a class="table-email" [href]="'mailto:' + user.email">{{ user.email }}</a>
+ </ng-container>
+ </td>
+
+ <ng-template #emailWithVerificationStatus>
+ <td *ngIf="user.emailVerified === false; else emailVerifiedNotFalse" i18n-title title="User's email must be verified to login">
+ <em>? {{ user.email }}</em>
+ </td>
+ <ng-template #emailVerifiedNotFalse>
+ <td i18n-title title="User's email is verified / User can login without email verification">
+ ✓ {{ user.email }}
+ </td>
+ </ng-template>
+ </ng-template>
+
+ <td *ngIf="isSelected('quota')">
+ <div class="progress" i18n-title title="Total video quota">
+ <div class="progress-bar" role="progressbar" [style]="{ width: getUserVideoQuotaPercentage(user) + '%' }"
+ [attr.aria-valuenow]="user.rawVideoQuotaUsed" aria-valuemin="0" [attr.aria-valuemax]="user.rawVideoQuota">
+ </div>
+ <span>{{ user.videoQuotaUsed }}</span>
+ <span>{{ user.videoQuota }}</span>
+ </div>
+ </td>
+
+ <td *ngIf="isSelected('quotaDaily')">
+ <div class="progress" i18n-title title="Total daily video quota">
+ <div class="progress-bar secondary" role="progressbar" [style]="{ width: getUserVideoQuotaDailyPercentage(user) + '%' }"
+ [attr.aria-valuenow]="user.rawVideoQuotaUsedDaily" aria-valuemin="0" [attr.aria-valuemax]="user.rawVideoQuotaDaily">
+ </div>
+ <span>{{ user.videoQuotaUsedDaily }}</span>
+ <span>{{ user.videoQuotaDaily }}</span>
+ </div>
+ </td>
+
+ <td *ngIf="isSelected('role')">
+ <span *ngIf="user.blocked" class="badge badge-banned" i18n-title title="The user was banned">{{ user.roleLabel }}</span>
+ <span *ngIf="!user.blocked" class="badge" [ngClass]="getRoleClass(user.role)">{{ user.roleLabel }}</span>
+ </td>
+
+ <td *ngIf="isSelected('pluginAuth')">
+ <ng-container *ngIf="user.pluginAuth">{{ user.pluginAuth }}</ng-container>
+ </td>
+
+ <td *ngIf="isSelected('createdAt')" [title]="user.createdAt">{{ user.createdAt | date: 'short' }}</td>
+
+ <td *ngIf="isSelected('lastLoginDate')" [title]="user.lastLoginDate">{{ user.lastLoginDate | date: 'short' }}</td>