|
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 | {{ "Tenants" | 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</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 |
| - |
22 |
| - <table class="table table-hover table-striped"> |
| 27 | + <table class="table table-hover table-striped" |
| 28 | + [busy]="isTableLoading"> |
23 | 29 | <thead>
|
24 | 30 | <tr>
|
| 31 | + <th>{{ "Actions" | localize }}</th> |
25 | 32 | <th>{{ "TenancyName" | localize }}</th>
|
26 | 33 | <th>{{ "Name" | localize }}</th>
|
27 | 34 | <th>
|
28 | 35 | <div style="text-align:center">{{ "IsActive" | localize }}</div>
|
29 | 36 | </th>
|
30 |
| - <th>{{ "Actions" | localize }}</th> |
31 | 37 | </tr>
|
32 | 38 | </thead>
|
33 | 39 | <tbody>
|
34 | 40 | <tr *ngFor="let tenant of tenants | paginate: { id: 'server', itemsPerPage: pageSize, currentPage: pageNumber, totalItems: totalItems }">
|
| 41 | + <td> |
| 42 | + <button mat-icon-button |
| 43 | + [matMenuTriggerFor]="actionsMenu"> |
| 44 | + <mat-icon>menu</mat-icon> |
| 45 | + </button> |
| 46 | + <mat-menu #actionsMenu="matMenu"> |
| 47 | + <button mat-menu-item |
| 48 | + (click)="editTenant(tenant)"> |
| 49 | + <mat-icon>edit</mat-icon> |
| 50 | + <span>{{ 'Edit' | localize }}</span> |
| 51 | + </button> |
| 52 | + <button mat-menu-item |
| 53 | + (click)="delete(tenant)"> |
| 54 | + <mat-icon>delete</mat-icon> |
| 55 | + <span>{{ 'Delete' | localize }}</span> |
| 56 | + </button> |
| 57 | + </mat-menu> |
| 58 | + </td> |
35 | 59 | <td>{{tenant.tenancyName}}</td>
|
36 | 60 | <td>{{tenant.name}}</td>
|
37 | 61 | <td align="center">
|
38 |
| - <i class="material-icons" *ngIf="tenant.isActive" style="color:green;">check_box</i> |
39 |
| - <i class="material-icons" *ngIf="!tenant.isActive" style="color:red;">indeterminate_check_box</i> |
40 |
| - </td> |
41 |
| - <td class="dropdown"> |
42 |
| - <a href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"> |
43 |
| - <i class="material-icons">menu</i> |
44 |
| - </a> |
45 |
| - <ul class="dropdown-menu pull-right"> |
46 |
| - <li><a href="javascript:void(0);" class="waves-effect waves-block" (click)="editTenant(tenant)"><i class="material-icons">create</i>Edit</a></li> |
47 |
| - <li><a href="javascript:void(0);" class="waves-effect waves-block" (click)="delete(tenant)"><i class="material-icons">delete_sweep</i>Delete</a></li> |
48 |
| - </ul> |
| 62 | + <i class="material-icons" |
| 63 | + *ngIf="tenant.isActive" |
| 64 | + style="color:green;">check_box</i> |
| 65 | + <i class="material-icons" |
| 66 | + *ngIf="!tenant.isActive" |
| 67 | + style="color:red;">indeterminate_check_box</i> |
49 | 68 | </td>
|
50 | 69 | </tr>
|
51 | 70 | </tbody>
|
52 | 71 | </table>
|
53 | 72 |
|
54 |
| - <div class="text-align: center;" *ngIf="totalItems > pageSize"> |
55 |
| - <abp-pagination-controls (pageChange)="getDataPage($event)" id="server"></abp-pagination-controls> |
| 73 | + <div class="text-align: center;" |
| 74 | + *ngIf="totalItems > pageSize"> |
| 75 | + <abp-pagination-controls (pageChange)="getDataPage($event)" |
| 76 | + id="server"></abp-pagination-controls> |
56 | 77 | </div>
|
57 | 78 |
|
58 |
| - <button type="button" data-toggle="modal" class="btn btn-primary btn-circle waves-effect waves-circle waves-float pull-right" (click)="createTenant()"> |
| 79 | + <button type="button" |
| 80 | + data-toggle="modal" |
| 81 | + class="btn btn-primary btn-circle waves-effect waves-circle waves-float pull-right" |
| 82 | + (click)="createTenant()"> |
59 | 83 | <i class="material-icons">add</i>
|
60 | 84 | </button>
|
61 | 85 | </div>
|
|
0 commit comments