connect-admin/app/pages/divId/divIds.component.html

105 lines
6.4 KiB
HTML

<div id="divIds" class="uk-container">
<div class="menubar ">
<div class="divId-title uk-article-title">Predefined classes for contents</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>
</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 class="uk-alert-danger" uk-alert style="display: none;" aria-hidden="true">
<span></span><span></span><span></span></div>
<div class="uk-alert-success" uk-alert style="display: none;" aria-hidden="true">
<span></span><span></span><span></span></div>
<div class="uk-alert" uk-alert style="display: none;" aria-hidden="true"><span></span><span></span><span></span></div>
<div 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-dropdown-nav">
<li><a (click)="confirmDeleteSelectedCommunities()"><i></i> Delete </a></li>
</ul>
</div>
</div>
</div>
</div>
<div>
<div class="gwt-HTML">
<div class="row users-list">
<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 value="">-- none selected --</option-->
<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>
</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>
</td>
<td>
<div class="actions" href="#">
<input title="Edit" src="imgs/icn_edit.png" class="edit" type="image" (click)="editDivId(i)">
<input title="Delete" src="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>
</div>
<modal-form #saveModal [saveText]="'Save'" [titleText]="'Add a new Class'" [formGroup]="formGroup" [type]="'divId'"
[isModalShown]="isModalShown" (emmitObject)="divIdSavedSuccessfully($event)" (emmitError)="handleError($event)">
<divId-form [group]="formGroup" [communityPid]="selectedCommunityPid" [availablePages]="pages"></divId-form>
</modal-form>
<modal-form #updateModal [saveText]="'Update'" [titleText]="'Update Class'" [formGroup]="formGroup" [type]="'divId'"
[isModalShown]="isModalShown" (emmitObject)="divIdUpdatedSuccessfully($event)" (emmitError)="handleError($event)">
<divId-form [group]="formGroup" [communityPid]="selectedCommunityPid" [availablePages]="pages"></divId-form>
</modal-form>
<delete-confirmation-dialog #deleteConfirmationModal [isModalShown]="isModalShown" (emmitObject)="confirmedDeleteDivIds($event)">
Are you sure you want to delete the selected class(-es)?
</delete-confirmation-dialog>