1
|
<div id="entities" class="uk-container">
|
2
|
|
3
|
<div class="menubar ">
|
4
|
|
5
|
<div class="entity-title uk-article-title ">Entities</div>
|
6
|
<form target="BSFormPanel_Admin_1" class="search">
|
7
|
<input #inputstring (keyup.enter)="filterBySearch(inputstring.value)" placeholder="Entity name..." type="text" class="uk-input uk-width-medium"/>
|
8
|
<button class="uk-button uk-button-default" type="submit">Search</button>
|
9
|
</form>
|
10
|
<a (click)="showModal()" class="uk-button uk-button-primary uk-float-right"><i></i> New Entity </a>
|
11
|
</div>
|
12
|
|
13
|
<div class="content-wrapper" id="contentWrapper">
|
14
|
<div>
|
15
|
<div class="contentPanel">
|
16
|
<div class="uk-alert-danger" uk-alert style="display: none;" aria-hidden="true">
|
17
|
<span></span><span></span><span></span></div>
|
18
|
<div class="uk-alert-success" uk-alert style="display: none;" aria-hidden="true">
|
19
|
<span></span><span></span><span></span></div>
|
20
|
<div class="uk-alert" uk-alert style="display: none;" aria-hidden="true"><span></span><span></span><span></span></div>
|
21
|
|
22
|
<div class="page-controls">
|
23
|
<div class=" filters ">
|
24
|
<div class="show-options uk-float-right">
|
25
|
<button class="uk-button uk-button-default" type="button"> Bulk Actions</button>
|
26
|
<div uk-dropdown="mode: click">
|
27
|
<ul class="uk-nav uk-dropdown-nav">
|
28
|
<li><a (click)="confirmDeleteSelectedEntities()"><i></i> Delete </a></li>
|
29
|
</ul>
|
30
|
</div>
|
31
|
<!--div class="btn-group"><a href="javascript:;" class="btn dropdown-toggle"
|
32
|
data-toggle="dropdown"><i></i> Bulk Actions <span
|
33
|
class="caret"></span></a>
|
34
|
<ul class="dropdown-menu">
|
35
|
<li><a (click)="confirmDeleteSelectedEntities()"><i></i> Delete </a></li>
|
36
|
</ul>
|
37
|
</div-->
|
38
|
</div>
|
39
|
</div>
|
40
|
</div>
|
41
|
|
42
|
<div>
|
43
|
<div class="gwt-HTML">
|
44
|
<div class="row users-list">
|
45
|
<div class="col-md-12">
|
46
|
|
47
|
<div class="filters marginBottom20">
|
48
|
<div class="links form-group form-inline">
|
49
|
<span>Filter by community:</span>
|
50
|
<select class="uk-select uk-width-medium" (change)="filterByCommunity($event)">
|
51
|
<!--option value="">-- none selected --</option-->
|
52
|
<option *ngFor="let community of communities" value="{{community._id}}">{{community.name}}</option>
|
53
|
</select>
|
54
|
</div>
|
55
|
</div>
|
56
|
<table class="uk-table uk-table-striped">
|
57
|
<thead>
|
58
|
<tr>
|
59
|
<th><input id="allEntityCheckbox" type="checkbox" (change)="toggleCheckBoxes($event)"></th>
|
60
|
<th>Name</th>
|
61
|
<th>State</th>
|
62
|
<th>Actions</th>
|
63
|
</tr>
|
64
|
</thead>
|
65
|
<tbody >
|
66
|
<tr *ngFor="let check of checkboxes; let i=index">
|
67
|
<td><input id="{{check.entity._id}}" class="checkBox" type="checkbox"
|
68
|
name="entitiescb[]" value="{{check.entity._id}}" [(ngModel)]="check.checked">
|
69
|
</td>
|
70
|
<td>
|
71
|
<div class="name" href="#">{{check.entity.name}}</div>
|
72
|
</td>
|
73
|
<td>
|
74
|
<div *ngIf="check.entity.isEnabled" class="activated" >
|
75
|
<input (click)="toggleEntity(false,[check.entity._id])" class="deactivate" src="imgs/check-icon.png" title="Disable" width="20" type="image" height="20">
|
76
|
</div>
|
77
|
<div *ngIf="!check.entity.isEnabled" class="deactivated" >
|
78
|
<input (click)="toggleEntity(true,[check.entity._id])" class="deactivate" src="imgs/x-icon.png" title="Enable" width="20" type="image" height="20">
|
79
|
</div>
|
80
|
</td>
|
81
|
<td>
|
82
|
<div class="actions" href="#">
|
83
|
<input title="Edit" src="imgs/icn_edit.png" class="edit" type="image" (click)="editEntity(i)">
|
84
|
<input title="Delete" src="imgs/icn_trash.png" class="delete" type="image" (click)="confirmDeleteEntity(check.entity._id)">
|
85
|
</div>
|
86
|
</td>
|
87
|
</tr>
|
88
|
</tbody>
|
89
|
</table>
|
90
|
|
91
|
<div *ngIf="checkboxes.length==0" class="col-md-12">
|
92
|
<div class="uk-alert-warning" uk-alert>No entities found</div>
|
93
|
</div>
|
94
|
</div>
|
95
|
</div>
|
96
|
</div>
|
97
|
</div>
|
98
|
</div>
|
99
|
</div>
|
100
|
</div>
|
101
|
</div>
|
102
|
<modal-form #saveModal [saveText]="'Save'" [titleText]="'Add a new Entity'" [formGroup]="formGroup" [type]="'entity'"
|
103
|
[isModalShown]="isModalShown" (emmitObject)="entitySavedSuccessfully($event)" (emmitError)="handleError($event)"
|
104
|
[selectedCommunityId]="selectedCommunityId">
|
105
|
<entity-form [group]="formGroup"></entity-form>
|
106
|
</modal-form>
|
107
|
|
108
|
<modal-form #updateModal [saveText]="'Update'" [titleText]="'Update Entity'" [formGroup]="formGroup" [type]="'entity'"
|
109
|
[isModalShown]="isModalShown" (emmitObject)="entityUpdatedSuccessfully($event)" (emmitError)="handleError($event)"
|
110
|
[selectedCommunityId]="selectedCommunityId">
|
111
|
<entity-form [group]="formGroup"></entity-form>
|
112
|
</modal-form>
|
113
|
|
114
|
<delete-confirmation-dialog #deleteConfirmationModal [isModalShown]="isModalShown" (emmitObject)="confirmedDeleteEntities($event)">
|
115
|
Are you sure you want to delete the selected entity(-ies)?
|
116
|
</delete-confirmation-dialog>
|