2022-04-07 20:28:45 +02:00
|
|
|
<div page-content (stickyEmitter)="stickyPageHeader = $event">
|
2021-01-11 19:33:24 +01:00
|
|
|
<div header>
|
2022-04-07 20:28:45 +02:00
|
|
|
<div class="uk-flex uk-flex-middle uk-margin-top info" [class.uk-active]="stickyPageHeader">
|
2022-06-24 17:20:40 +02:00
|
|
|
<img src="assets/common-assets/placeholder.png" class="uk-margin-right">
|
2022-04-07 20:28:45 +02:00
|
|
|
<div>
|
2022-06-24 17:20:40 +02:00
|
|
|
<div class="uk-margin-remove uk-text-background uk-text-bold uk-h6">Admin Dashboard - Manage Classes</div>
|
|
|
|
<h1 class="uk-h4 uk-margin-remove">Super Admin</h1>
|
2021-01-11 19:33:24 +01:00
|
|
|
</div>
|
2019-12-18 16:14:21 +01:00
|
|
|
</div>
|
2022-04-07 20:28:45 +02:00
|
|
|
<div class="uk-margin uk-margin-remove-bottom">
|
|
|
|
<admin-tabs tab="class"></admin-tabs>
|
|
|
|
</div>
|
2019-12-18 16:14:21 +01:00
|
|
|
</div>
|
2021-01-11 19:33:24 +01:00
|
|
|
<div inner>
|
2021-03-18 15:11:41 +01:00
|
|
|
<div *ngIf="showLoading" class="uk-position-center">
|
|
|
|
<loading></loading>
|
|
|
|
</div>
|
2022-04-07 20:28:45 +02:00
|
|
|
<ng-container *ngIf="!showLoading">
|
2022-06-24 17:20:40 +02:00
|
|
|
<div class="uk-grid uk-flex-middle uk-margin-top" uk-grid>
|
2022-04-07 20:28:45 +02:00
|
|
|
<div class="uk-width-1-1">
|
|
|
|
<ul class="uk-subnav uk-subnav-pill">
|
|
|
|
<li [class.uk-active]="filterForm.get('type').value === 'all'" class="uk-margin-small-bottom"><a
|
|
|
|
(click)="filterForm.get('type').setValue('all')"><span
|
|
|
|
class="title">All portals</span></a></li>
|
|
|
|
<li *ngFor="let type of portalUtils.portalTypes; let i=index"
|
|
|
|
[class.uk-active]="filterForm.get('type').value === type.value" class="uk-margin-small-bottom"><a
|
|
|
|
(click)="filterForm.get('type').setValue(type.value)"><span
|
|
|
|
class="title">{{type.label}}</span></a></li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
<div class="uk-width-1-1 uk-flex uk-flex-right@m uk-flex-center uk-flex-wrap uk-flex-middle uk-grid" uk-grid>
|
|
|
|
<div search-input [expandable]="true" [searchControl]="filterForm.get('keyword')" searchInputClass="outer" placeholder="Search class" class="uk-width-1-3@xl uk-width-2-5@l uk-width-1-2@m uk-width-1-1"></div>
|
|
|
|
<div>
|
2022-04-09 15:18:30 +02:00
|
|
|
<button class="uk-button uk-button-default uk-flex uk-flex-middle" (click)="newDivId()">
|
2022-04-07 20:28:45 +02:00
|
|
|
<icon name="add" [flex]="true"></icon>
|
|
|
|
<span class="uk-margin-small-left uk-text-bold uk-text-uppercase">Add class</span>
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2022-06-24 17:20:40 +02:00
|
|
|
<div class="uk-section">
|
|
|
|
<table *ngIf="checkboxes.length > 0"class="uk-table uk-table-striped uk-table-large">
|
|
|
|
<thead>
|
|
|
|
<tr class="uk-child-width-1-5">
|
|
|
|
<th>
|
|
|
|
<label>
|
|
|
|
<input id="checkAll" type="checkbox" (click)="toggleCheckBoxes($event)" class="uk-checkbox"
|
|
|
|
[ngModel]="getSelectedDivIds().length ==checkboxes.length"/>
|
|
|
|
</label>
|
|
|
|
<span class="uk-margin-left">
|
|
|
|
<button class="uk-button uk-button-link" [class.uk-disabled]="getSelectedDivIds().length == 0" [disabled]="getSelectedDivIds().length == 0">
|
|
|
|
Bulk Actions ({{getSelectedDivIds().length}})
|
|
|
|
</button>
|
|
|
|
<div uk-dropdown="mode: click">
|
|
|
|
<ul class="uk-nav uk-dropdown-nav"
|
|
|
|
[attr.uk-tooltip]="getSelectedDivIds().length == 0 ? 'pos:left; cls: uk-active' : 'cls: uk-invisible'"
|
|
|
|
title="Select at least one entity">
|
|
|
|
<li>
|
|
|
|
<a (click)="confirmDeleteSelectedDivIds()"><i></i>Delete</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</span>
|
|
|
|
</th>
|
|
|
|
<th>Name</th>
|
|
|
|
<th *ngIf="!selectedCommunityPid">Portal Type</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="uk-checkbox" type="checkbox"
|
|
|
|
name="divIdscb[]" value="{{check.divId._id}}" [(ngModel)]="check.checked">
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<div class="name" href="#">{{check.divId.name}}</div>
|
|
|
|
</td>
|
|
|
|
<td *ngIf="!selectedCommunityPid">
|
|
|
|
<div class="portalType" href="#">{{check.divId.portalType}}</div>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<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>
|
|
|
|
<icon class="clickable" name="edit" [customClass]="'uk-text-primary'" (click)="editDivId(i)"></icon>
|
2022-04-09 15:18:30 +02:00
|
|
|
<icon class="clickable uk-margin-small-left" [customClass]="'uk-text-danger'" name="delete" (click)="confirmDeleteDivId(check.divId._id)"></icon>
|
2022-06-24 17:20:40 +02:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
<div *ngIf="checkboxes.length == 0"
|
|
|
|
class="uk-card uk-card-default uk-padding-large uk-text-center uk-margin-bottom uk-text-bold">
|
|
|
|
<div>No classes found</div>
|
|
|
|
</div>
|
2019-12-18 16:14:21 +01:00
|
|
|
</div>
|
2022-04-07 20:28:45 +02:00
|
|
|
</ng-container>
|
2019-12-18 16:14:21 +01:00
|
|
|
</div>
|
2021-01-11 19:33:24 +01:00
|
|
|
</div>
|
2021-01-28 17:33:16 +01:00
|
|
|
<modal-alert #editModal (alertOutput)="divIdSaveConfirmed($event)"
|
2022-06-21 11:22:28 +02:00
|
|
|
[okDisabled]="classForm && (classForm.invalid || !classForm.dirty)" classTitle="uk-background-primary uk-light">
|
2021-01-28 17:33:16 +01:00
|
|
|
<form *ngIf="classForm" [formGroup]="classForm" class="uk-grid uk-child-width-1-1" uk-grid>
|
2022-04-11 11:27:10 +02:00
|
|
|
<div input [formInput]="classForm.get('name')" placeholder="Class Name"></div>
|
|
|
|
<div input [formInput]="classForm.get('pages')" placeholder="Pages" [options]="allPages" type="chips"></div>
|
|
|
|
<div input [formInput]="classForm.get('portalType')" placeholder="Portal Type" [options]="portalUtils.portalTypes" type="select"></div>
|
2019-12-18 16:14:21 +01:00
|
|
|
</form>
|
|
|
|
</modal-alert>
|
2022-06-21 11:22:28 +02:00
|
|
|
<modal-alert #deleteModal [overflowBody]="false" (alertOutput)="confirmedDeleteDivIds($event)" classTitle="uk-background-primary uk-light"></modal-alert>
|