diff options
Diffstat (limited to 'client/src/app')
-rw-r--r-- | client/src/app/+admin/users/user-list/user-list.component.html | 16 | ||||
-rw-r--r-- | client/src/app/+admin/users/user-list/user-list.component.ts | 6 |
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') { |