1
|
<div id="communities" class="uk-container">
|
2
|
|
3
|
<div class="menubar ">
|
4
|
|
5
|
<div class="community-title uk-article-title">Communities</div>
|
6
|
<form target="BSFormPanel_Admin_1" class="search">
|
7
|
<input #inputstring (keyup.enter)="filterBySearch(inputstring.value)" placeholder="Community 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 Community </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)="confirmDeleteSelectedCommunities()"><i></i> Delete </a></li>
|
29
|
</ul>
|
30
|
</div>
|
31
|
</div>
|
32
|
</div>
|
33
|
</div>
|
34
|
|
35
|
<div>
|
36
|
<div class="gwt-HTML">
|
37
|
<div class="row users-list">
|
38
|
<div class="col-md-12">
|
39
|
<table class="uk-table uk-table-striped">
|
40
|
<thead>
|
41
|
<tr>
|
42
|
<th><input id="allCommunityCheckbox" type="checkbox" (change)="toggleCheckBoxes($event)"></th>
|
43
|
<th>Name</th>
|
44
|
<th>Actions</th>
|
45
|
</tr>
|
46
|
</thead>
|
47
|
<tbody >
|
48
|
<tr *ngFor="let check of checkboxes; let i=index">
|
49
|
<td><input id="{{check.community._id}}" class="checkBox" type="checkbox"
|
50
|
name="communitiescb[]" value="{{check.community._id}}" [(ngModel)]="check.checked">
|
51
|
</td>
|
52
|
<td>
|
53
|
<div class="name" href="#">{{check.community.name}}</div>
|
54
|
</td>
|
55
|
<td>
|
56
|
<div class="actions" href="#">
|
57
|
<input title="Edit" src="imgs/icn_edit.png" class="edit" type="image" (click)="editCommunity(i)">
|
58
|
<input title="Delete" src="imgs/icn_trash.png" class="delete" type="image" (click)="confirmDeleteCommunity(check.community._id)">
|
59
|
</div>
|
60
|
</td>
|
61
|
</tr>
|
62
|
</tbody>
|
63
|
</table>
|
64
|
|
65
|
<div *ngIf="checkboxes.length==0" class="col-md-12">
|
66
|
<div class="uk-alert-warning" uk-alert>No communities found</div>
|
67
|
</div>
|
68
|
</div>
|
69
|
</div>
|
70
|
</div>
|
71
|
</div>
|
72
|
</div>
|
73
|
</div>
|
74
|
</div>
|
75
|
</div>
|
76
|
<modal-form #saveModal [saveText]="'Save'" [titleText]="'Add a new Community'" [formGroup]="formGroup" [type]="'community'"
|
77
|
[isModalShown]="isModalShown" (emmitObject)="communitySavedSuccessfully($event)" (emmitError)="handleError($event)">
|
78
|
<community-form [group]="formGroup"></community-form>
|
79
|
</modal-form>
|
80
|
|
81
|
<modal-form #updateModal [saveText]="'Update'" [titleText]="'Update Community'" [formGroup]="formGroup" [type]="'community'"
|
82
|
[isModalShown]="isModalShown" (emmitObject)="communityUpdatedSuccessfully($event)" (emmitError)="handleError($event)">
|
83
|
<community-form [group]="formGroup"></community-form>
|
84
|
</modal-form>
|
85
|
|
86
|
<delete-confirmation-dialog #deleteConfirmationModal [isModalShown]="isModalShown" (emmitObject)="confirmedDeleteCommunities($event)">
|
87
|
Are you sure you want to delete the selected community(-ies)?
|
88
|
</delete-confirmation-dialog>
|