aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRigel Kent <sendmemail@rigelk.eu>2020-07-02 08:59:16 +0200
committerRigel Kent <sendmemail@rigelk.eu>2020-07-02 08:59:16 +0200
commitc7b836303c48861cc1681006fd4630d286a3b200 (patch)
tree0d2254e2ecd7ab498fc7e30eef01db80dc42c34d
parent97990c6eb0114033a7cf419b645e2a5abc492f94 (diff)
downloadPeerTube-c7b836303c48861cc1681006fd4630d286a3b200.tar.gz
PeerTube-c7b836303c48861cc1681006fd4630d286a3b200.tar.zst
PeerTube-c7b836303c48861cc1681006fd4630d286a3b200.zip
remove extraneous user-list table attribute
-rw-r--r--client/src/app/+admin/users/user-list/user-list.component.html16
-rw-r--r--client/src/app/+admin/users/user-list/user-list.component.ts6
2 files changed, 5 insertions, 17 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 ea5aca024..27d4a5787 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
@@ -1,12 +1,3 @@
1<div class="admin-sub-header">
2 <h1 i18n class="form-sub-title">Users list</h1>
3
4 <a class="add-button" routerLink="/admin/users/create">
5 <my-global-icon iconName="add" aria-hidden="true"></my-global-icon>
6 <ng-container i18n>Create user</ng-container>
7 </a>
8</div>
9
10<p-table 1<p-table
11 [value]="users" [lazy]="true" [paginator]="totalRecords > 0" [totalRecords]="totalRecords" [rows]="rowsPerPage" [rowsPerPageOptions]="rowsPerPageOptions" 2 [value]="users" [lazy]="true" [paginator]="totalRecords > 0" [totalRecords]="totalRecords" [rows]="rowsPerPage" [rowsPerPageOptions]="rowsPerPageOptions"
12 [sortField]="sort.field" [sortOrder]="sort.order" (onLazyLoad)="loadLazy($event)" dataKey="id" [resizableColumns]="true" 3 [sortField]="sort.field" [sortOrder]="sort.order" (onLazyLoad)="loadLazy($event)" dataKey="id" [resizableColumns]="true"
@@ -14,7 +5,6 @@
14 [showCurrentPageReport]="true" i18n-currentPageReportTemplate 5 [showCurrentPageReport]="true" i18n-currentPageReportTemplate
15 currentPageReportTemplate="Showing {{'{first}'}} to {{'{last}'}} of {{'{totalRecords}'}} users" 6 currentPageReportTemplate="Showing {{'{first}'}} to {{'{last}'}} of {{'{totalRecords}'}} users"
16 (onPage)="onPage($event)" [expandedRowKeys]="expandedRows" 7 (onPage)="onPage($event)" [expandedRowKeys]="expandedRows"
17 [rowStyleClass]="getRowClasses"
18> 8>
19 <ng-template pTemplate="caption"> 9 <ng-template pTemplate="caption">
20 <div class="caption"> 10 <div class="caption">
@@ -26,7 +16,7 @@
26 </my-action-dropdown> 16 </my-action-dropdown>
27 </div> 17 </div>
28 18
29 <div class="has-feedback has-clear"> 19 <div class="ml-auto has-feedback has-clear">
30 <input 20 <input
31 type="text" name="table-filter" id="table-filter" i18n-placeholder placeholder="Filter..." 21 type="text" name="table-filter" id="table-filter" i18n-placeholder placeholder="Filter..."
32 (keyup)="onSearch($event)" 22 (keyup)="onSearch($event)"
@@ -34,6 +24,10 @@
34 <a class="glyphicon glyphicon-remove-sign form-control-feedback form-control-clear" (click)="resetSearch()"></a> 24 <a class="glyphicon glyphicon-remove-sign form-control-feedback form-control-clear" (click)="resetSearch()"></a>
35 <span class="sr-only" i18n>Clear filters</span> 25 <span class="sr-only" i18n>Clear filters</span>
36 </div> 26 </div>
27 <a class="ml-2 add-button" routerLink="/admin/users/create">
28 <my-global-icon iconName="add" aria-hidden="true"></my-global-icon>
29 <ng-container i18n>Create user</ng-container>
30 </a>
37 </div> 31 </div>
38 </ng-template> 32 </ng-template>
39 33
diff --git a/client/src/app/+admin/users/user-list/user-list.component.ts b/client/src/app/+admin/users/user-list/user-list.component.ts
index e167d1432..8f01c7d51 100644
--- a/client/src/app/+admin/users/user-list/user-list.component.ts
+++ b/client/src/app/+admin/users/user-list/user-list.component.ts
@@ -87,12 +87,6 @@ export class UserListComponent extends RestTable implements OnInit {
87 return 'UserListComponent' 87 return 'UserListComponent'
88 } 88 }
89 89
90 getRowClasses (rowData: User) {
91 return {
92 banned: rowData.blocked
93 }
94 }
95
96 openBanUserModal (users: User[]) { 90 openBanUserModal (users: User[]) {
97 for (const user of users) { 91 for (const user of users) {
98 if (user.username === 'root') { 92 if (user.username === 'root') {