<div id="divIds">
        <div class="menubar ">
            <div class="divId-title uk-text-large">Predefined classes for contents</div>
            <div *ngIf="updateErrorMessage" class="uk-alert-danger" uk-alert>
              <a class="uk-alert-close" uk-close></a>
              {{updateErrorMessage}}
            </div>
            <form target="BSFormPanel_Admin_1" class="search">
                <!-- <input #inputstring (keyup.enter)="filterBySearch(inputstring.value)" placeholder="Class name..." type="text" class="uk-input uk-width-medium"/>
                <button class="uk-button" type="submit">Search</button> -->
                <input type="text" class="uk-input uk-width-medium" placeholder="Class name..." aria-describedby="sizing-addon2"  [(ngModel)]="keyword"  name="keyword" >
                <button (click)="filterBySearch(keyword)"  type="submit" class=" uk-button">
                   <span class="uk-icon">
                   <svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="search" ratio="1"><circle fill="none" stroke="#000" stroke-width="1.1" cx="9" cy="9" r="7"></circle><path fill="none" stroke="#000" stroke-width="1.1" d="M14,14 L18,18 L14,14 Z"></path></svg>
                   </span>Search
                 </button>
            </form>
            <!-- <a (click)="showModal()" class="uk-button uk-button-primary uk-float-right"><i></i> New Class </a> -->
        </div>

        <div class="content-wrapper" id="contentWrapper">
            <div>
                <div class="contentPanel">
                    <div *ngIf="errorMessage" class="uk-alert uk-alert-danger  uk-margin-large-top" role="alert">{{errorMessage}}</div>
                    <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>

                    <div *ngIf="!errorMessage && !showLoading" class="page-controls">
                        <div class="  filters ">
                            <div class="show-options uk-float-right">
                              <button class="uk-button" type="button">Bulk Actions</button>
                              <div uk-dropdown="mode: click">
                                <ul class="uk-nav uk-navbar-dropdown-nav"
                                    [attr.uk-tooltip]="getSelectedDivIds().length == 0 ? 'pos:left; cls: uk-active' : 'cls: uk-invisible'"
                                    title="Select at least one class">
                                    <li><a [class]="getSelectedDivIds().length == 0 ? 'uk-disabled' : ''" (click)="confirmDeleteSelectedCommunities()"><i></i> Delete </a></li>
                                </ul>
                              </div>
                            </div>
                        </div>
                    </div>

                    <div *ngIf="!errorMessage && !showLoading">
                        <div class="gwt-HTML">
                            <div class="users-list"> <!--"row" class removed"-->
                                <div class="col-md-12">
                                  <!-- <div class="filters marginBottom20">
                                      <div class="links form-group form-inline">
                                          <span>Filter by community:</span>
                                          <select class="uk-select uk-width-medium" (change)="filterByCommunity($event)">
                                              <option *ngFor="let community of communities" value="{{community.pid}}">{{community.name}}</option>
                                          </select>
                                      </div>
                                  </div> -->
                                  <table class="uk-table uk-table-striped">
                                    <thead>
                                        <tr>
                                            <th><input id="allDivIdCheckbox" type="checkbox" (change)="toggleCheckBoxes($event)"></th>
                                            <th>Name</th>
                                            <!-- <th>Community</th> -->
                                            <th>Page</th>
                                            <th>Actions</th>
                                        </tr>
                                    </thead>
                                    <tbody >
                                        <tr *ngFor="let check of checkboxes; let i=index">
                                            <td><input id="{{check.divId._id}}" class="checkBox" type="checkbox"
                                                                                name="divIdscb[]" value="{{check.divId._id}}" [(ngModel)]="check.checked">
                                            </td>
                                            <td>
                                                <div class="name" href="#">{{check.divId.name}}</div>
                                            </td>
                                            <!-- <td>
                                                <div class="community" href="#">{{check.divId.community.name}}</div>
                                            </td> -->
                                            <td>
                                                <!-- <div class="page" href="#">{{check.divId.page.name}}</div> -->
                                                <div class="pages" href="#">
                                                  <span *ngFor="let page of check.divId.pages let i=index">{{page.name}}<span *ngIf="i<(check.divId.pages.length-1)">, </span></span>
                                                </div>
                                            </td>
                                            <td>
                                                <div class="actions" href="#">
                                                    <input title="Edit" src="assets/imgs/icn_edit.png" class="edit uk-margin-small-right" type="image" (click)="editDivId(i)">
                                                    <input title="Delete" src="assets/imgs/icn_trash.png" class="delete" type="image" (click)="confirmDeleteDivId(check.divId._id)">
                                                </div>
                                            </td>
                                        </tr>
                                    </tbody>
                                </table>

                                    <div *ngIf="checkboxes.length==0" class="col-md-12">
                                        <div class="uk-alert-warning" uk-alert>No classes found</div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <!-- <fab (clicked)="showModal()"></fab> -->
        <fab (clicked)="newDivId()"></fab>
</div>
<!-- <modal-form #saveModal [saveText]="'Save'" [titleText]="'Add a new Class'" [formGroup]="formGroup" [type]="'divId'"
            [isModalShown]="isModalShown" (emmitObject)="divIdSavedSuccessfully($event)" (emmitError)="handleUpdateError($event)">
    <divId-form [group]="formGroup"></divId-form>
</modal-form>

<modal-form #updateModal [saveText]="'Update'" [titleText]="'Update Class'" [formGroup]="formGroup" [type]="'divId'"
            [isModalShown]="isModalShown" (emmitObject)="divIdUpdatedSuccessfully($event)" (emmitError)="handleUpdateError($event)">
    <divId-form [group]="formGroup" [formPages]="formPages"></divId-form>
</modal-form> -->

<modal-alert #AlertModalSaveDivId (alertOutput)="divIdSaveConfirmed($event)">
  <div *ngIf="modalErrorMessage" class="uk-alert-danger" uk-alert aria-hidden="true">{{ modalErrorMessage }}</div>
  <divId-form [group]="formGroup" [formPages]="formPages"></divId-form>
</modal-alert>

<modal-alert #AlertModalUpdateDivId (alertOutput)="divIdUpdateConfirmed($event)">
  <div *ngIf="modalErrorMessage" class="uk-alert-danger" uk-alert aria-hidden="true">{{ modalErrorMessage }}</div>
  <divId-form [group]="formGroup" [formPages]="formPages"></divId-form>
</modal-alert>

<!-- <delete-confirmation-dialog #deleteConfirmationModal [isModalShown]="isModalShown" (emmitObject)="confirmedDeleteDivIds($event)">
    Are you sure you want to delete the selected class(-es)?
</delete-confirmation-dialog> -->
<modal-alert #AlertModalDeleteDivIds (alertOutput)="confirmedDeleteDivIds($event)"></modal-alert>
