|
1 |
| -<div class="row clearfix" [@routerTransition]> |
| 1 | +<div class="row clearfix" |
| 2 | + [@routerTransition]> |
2 | 3 | <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
|
3 | 4 | <div class="card main-content">
|
4 | 5 | <div class="header">
|
5 | 6 | <h2>
|
6 | 7 | {{ 'Users' | localize }}
|
7 | 8 | </h2>
|
8 | 9 | <ul class="header-dropdown m-r--5">
|
9 |
| - <i class="fa fa-spin fa-spinner" *ngIf="isTableLoading"></i> |
10 |
| - <li class="dropdown"> |
11 |
| - <a href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"> |
12 |
| - <i class="material-icons">more_vert</i> |
13 |
| - </a> |
14 |
| - <ul class="dropdown-menu pull-right"> |
15 |
| - <li><a href="javascript:void(0);" class=" waves-effect waves-block()" (click)="refresh();"><i class="material-icons">refresh</i> {{ 'Refresh' | localize }}</a></li> |
16 |
| - </ul> |
| 10 | + <li> |
| 11 | + <button mat-icon-button |
| 12 | + [matMenuTriggerFor]="headerMenu" |
| 13 | + style="bottom: 10px;"> |
| 14 | + <mat-icon>more_vert</mat-icon> |
| 15 | + </button> |
| 16 | + <mat-menu #headerMenu="matMenu"> |
| 17 | + <button mat-menu-item |
| 18 | + (click)="refresh()"> |
| 19 | + <mat-icon>refresh</mat-icon> |
| 20 | + <span>{{ 'Refresh' | localize }}</span> |
| 21 | + </button> |
| 22 | + </mat-menu> |
17 | 23 | </li>
|
18 | 24 | </ul>
|
19 | 25 | </div>
|
20 | 26 | <div class="body table-responsive">
|
21 | 27 |
|
22 |
| - <!-- ******************************************************** --> |
23 |
| - <table class="table table-hover table-striped"> |
| 28 | + <!-- ******************************************************** --> |
| 29 | + <table class="table table-hover table-striped" [busy]="isTableLoading"> |
24 | 30 | <thead>
|
25 | 31 | <tr>
|
| 32 | + <th>{{ 'Actions' | localize }}</th> |
26 | 33 | <th>{{ 'UserName' | localize }}</th>
|
27 | 34 | <th>{{ 'FullName' | localize }}</th>
|
28 | 35 | <th>{{ 'EmailAddress' | localize }}</th>
|
29 | 36 | <th>
|
30 | 37 | <div style="text-align:center">{{ 'IsActive' | localize }}</div>
|
31 | 38 | </th>
|
32 |
| - <th>{{ 'Actions' | localize }}</th> |
33 | 39 | </tr>
|
34 | 40 | </thead>
|
35 | 41 | <tbody>
|
36 | 42 | <tr *ngFor="let user of users | paginate: { id: 'server', itemsPerPage: pageSize, currentPage: pageNumber, totalItems: totalItems }">
|
| 43 | + <td> |
| 44 | + <button mat-icon-button |
| 45 | + [matMenuTriggerFor]="actionsMenu"> |
| 46 | + <mat-icon>menu</mat-icon> |
| 47 | + </button> |
| 48 | + <mat-menu #actionsMenu="matMenu"> |
| 49 | + <button mat-menu-item |
| 50 | + (click)="editUser(user)"> |
| 51 | + <mat-icon>edit</mat-icon> |
| 52 | + <span>{{ 'Edit' | localize }}</span> |
| 53 | + </button> |
| 54 | + <button mat-menu-item |
| 55 | + (click)="delete(user)"> |
| 56 | + <mat-icon>delete</mat-icon> |
| 57 | + <span>{{ 'Delete' | localize }}</span> |
| 58 | + </button> |
| 59 | + </mat-menu> |
| 60 | + </td> |
37 | 61 | <td>{{user.userName}}</td>
|
38 | 62 | <td>{{user.fullName}}</td>
|
39 | 63 | <td>{{user.emailAddress}}</td>
|
40 | 64 | <td align="center">
|
41 |
| - <i class="material-icons" *ngIf="user.isActive" style="color:green;">check_box</i> |
42 |
| - <i class="material-icons" *ngIf="!user.isActive" style="color:red;">indeterminate_check_box</i> |
43 |
| - </td> |
44 |
| - <td class="dropdown"> |
45 |
| - <a href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"> |
46 |
| - <i class="material-icons">menu</i> |
47 |
| - </a> |
48 |
| - <ul class="dropdown-menu pull-right"> |
49 |
| - <li><a href="javascript:void(0);" class="waves-effect waves-block" (click)="editUser(user)"><i class="material-icons">create</i>{{ 'Edit' | localize }}</a></li> |
50 |
| - <li><a href="javascript:void(0);" class="waves-effect waves-block" (click)="delete(user)"><i class="material-icons">delete_sweep</i>{{ 'Delete' | localize }}</a></li> |
51 |
| - </ul> |
| 65 | + <i class="material-icons" |
| 66 | + *ngIf="user.isActive" |
| 67 | + style="color:green;">check_box</i> |
| 68 | + <i class="material-icons" |
| 69 | + *ngIf="!user.isActive" |
| 70 | + style="color:red;">indeterminate_check_box</i> |
52 | 71 | </td>
|
53 | 72 | </tr>
|
54 | 73 | </tbody>
|
55 | 74 | </table>
|
56 |
| - <!-- ******************************************************** --> |
| 75 | + <!-- ******************************************************** --> |
57 | 76 |
|
58 |
| - <div class="text-align: center;" *ngIf="totalItems > pageSize"> |
59 |
| - <abp-pagination-controls (pageChange)="getDataPage($event)" id="server"></abp-pagination-controls> |
| 77 | + <div class="text-align: center;" |
| 78 | + *ngIf="totalItems > pageSize"> |
| 79 | + <abp-pagination-controls (pageChange)="getDataPage($event)" |
| 80 | + id="server"></abp-pagination-controls> |
60 | 81 | </div>
|
61 |
| - <button type="button" data-toggle="modal" class="btn btn-primary btn-circle waves-effect waves-circle waves-float pull-right" (click)="createUser()"> |
| 82 | + <button type="button" |
| 83 | + data-toggle="modal" |
| 84 | + class="btn btn-primary btn-circle waves-effect waves-circle waves-float pull-right" |
| 85 | + (click)="createUser()"> |
62 | 86 | <i class="material-icons">add</i>
|
63 | 87 | </button>
|
64 | 88 | </div>
|
65 | 89 | </div>
|
66 | 90 | </div>
|
67 | 91 | </div>
|
68 | 92 |
|
69 |
| -<create-user-modal #createUserModal (modalSave)="refresh()"></create-user-modal> |
70 |
| -<edit-user-modal #editUserModal (modalSave)="refresh()"></edit-user-modal> |
| 93 | +<create-user-modal #createUserModal |
| 94 | + (modalSave)="refresh()"></create-user-modal> |
| 95 | +<edit-user-modal #editUserModal |
| 96 | + (modalSave)="refresh()"></edit-user-modal> |
0 commit comments