Project

General

Profile

1
<div id="communities">
2
        <div class="menubar ">
3
            <div class="community-title uk-text-large">Communities</div>
4
            <div *ngIf="updateErrorMessage" class="uk-alert-danger" uk-alert>
5
              <a class="uk-alert-close" uk-close></a>
6
              {{updateErrorMessage}}
7
            </div>
8
            <form target="BSFormPanel_Admin_1" class="search">
9
                <input #inputstring (keyup.enter)="filterBySearch(inputstring.value)" placeholder="Community name..." type="text" class="uk-input uk-width-medium"/>
10
                <button class="uk-button" type="submit">Search</button>
11
            </form>
12
            <!-- <a (click)="showModal()" class="uk-button uk-button-primary uk-float-right"><i></i> New Community </a> -->
13
        </div>
14

    
15
        <div class="content-wrapper" id="contentWrapper">
16
            <div>
17
                <div class="contentPanel">
18
                    <div *ngIf="errorMessage" class="uk-alert uk-alert-danger  uk-margin-large-top" role="alert">{{errorMessage}}</div>
19
                    <div [style.display]="showLoading ? 'inline' : 'none'" class="uk-animation-fade uk-margin-large-top  uk-width-1-1" role="alert"><img class="uk-align-center loading-gif"></div>
20

    
21
                    <div *ngIf="!errorMessage && !showLoading" class="page-controls">
22
                        <div class="  filters ">
23
                            <div class="show-options uk-float-right">
24
                              <button class="uk-button" type="button">Bulk Actions</button>
25
                              <div uk-dropdown="mode: click">
26
                                <ul class="uk-nav uk-nav-dropdown"
27
                                    [attr.uk-tooltip]="getSelectedCommunities().length == 0 ? 'pos:left; cls: uk-active' : 'cls: uk-invisible'"
28
                                    title="Select at least one community">
29
                                    <li><a [class]="getSelectedCommunities().length == 0 ? 'uk-disabled' : ''" (click)="confirmDeleteSelectedCommunities()"><i></i> Delete </a></li>
30
                                </ul>
31
                              </div>
32
                            </div>
33
                        </div>
34
                    </div>
35

    
36
                    <div *ngIf="!errorMessage && !showLoading">
37
                        <div class="gwt-HTML">
38
                            <div class="users-list">  <!--"row" class removed"-->
39
                                <div class="col-md-12">
40
                                  <table class="uk-table uk-table-striped">
41
                                    <thead>
42
                                        <tr>
43
                                            <th><input id="allCommunityCheckbox" type="checkbox" (change)="toggleCheckBoxes($event)"></th>
44
                                            <th>Name</th>
45
                                            <th>Actions</th>
46
                                        </tr>
47
                                    </thead>
48
                                    <tbody >
49
                                        <tr *ngFor="let check of checkboxes; let i=index">
50
                                            <td><input id="{{check.community._id}}" class="checkBox" type="checkbox"
51
                                                                                name="communitiescb[]" value="{{check.community._id}}" [(ngModel)]="check.checked">
52
                                            </td>
53
                                            <td>
54
                                                <div class="name" href="#">{{check.community.name}}</div>
55
                                            </td>
56
                                            <td>
57
                                                <div class="actions" href="#">
58
                                                    <input title="Edit" src="assets/imgs/icn_edit.png" class="edit" type="image" (click)="editCommunity(i)">
59
                                                    <input title="Delete" src="assets/imgs/icn_trash.png" class="delete" type="image" (click)="confirmDeleteCommunity(check.community._id)">
60
                                                </div>
61
                                            </td>
62
                                        </tr>
63
                                    </tbody>
64
                                </table>
65

    
66
                                    <div *ngIf="checkboxes.length==0" class="col-md-12">
67
                                        <div class="uk-alert-warning" uk-alert>No communities found</div>
68
                                    </div>
69
                                </div>
70
                            </div>
71
                        </div>
72
                    </div>
73
                </div>
74
            </div>
75
        </div>
76
        <!-- <fab (clicked)="showModal()"></fab> -->
77
        <fab (clicked)="newCommunity()"></fab>
78
</div>
79
<!-- <modal-form #saveModal [saveText]="'Save'" [titleText]="'Add a new Community'" [formGroup]="formGroup" [type]="'community'"
80
            [isModalShown]="isModalShown" (emmitObject)="communitySavedSuccessfully($event)" (emmitError)="handleUpdateError($event)">
81
    <community-form [group]="formGroup"></community-form>
82
</modal-form>
83

    
84
<modal-form #updateModal [saveText]="'Update'" [titleText]="'Update Community'" [formGroup]="formGroup" [type]="'community'"
85
            [isModalShown]="isModalShown" (emmitObject)="communityUpdatedSuccessfully($event)" (emmitError)="handleUpdateError($event)">
86
    <community-form [group]="formGroup"></community-form>
87
</modal-form> -->
88

    
89
<modal-alert #AlertModalSaveCommunity (alertOutput)="communitySaveConfirmed($event)">
90
  <div *ngIf="modalErrorMessage" class="uk-alert-danger" uk-alert aria-hidden="true">{{ modalErrorMessage }}</div>
91
  <community-form [group]="formGroup"></community-form>
92
</modal-alert>
93

    
94
<modal-alert #AlertModalUpdateCommunity (alertOutput)="communityUpdateConfirmed($event)">
95
  <div *ngIf="modalErrorMessage" class="uk-alert-danger" uk-alert aria-hidden="true">{{ modalErrorMessage }}</div>
96
  <community-form [group]="formGroup"></community-form>
97
</modal-alert>
98

    
99
<!-- <delete-confirmation-dialog #deleteConfirmationModal [isModalShown]="isModalShown" (emmitObject)="confirmedDeleteCommunities($event)">
100
    Are you sure you want to delete the selected community(-ies)?
101
</delete-confirmation-dialog> -->
102
<modal-alert #AlertModalDeleteCommunities (alertOutput)="confirmedDeleteCommunities($event)"></modal-alert>
(1-1/4)