2022-04-07 20:28:45 +02:00
|
|
|
<div page-content (stickyEmitter)="stickyPageHeader = $event">
|
2021-03-31 13:23:24 +02:00
|
|
|
<div header>
|
2022-06-26 22:30:54 +02:00
|
|
|
<div *ngIf="!showLoading" class="uk-flex uk-flex-middle uk-margin-top info"
|
2022-04-07 20:28:45 +02:00
|
|
|
[class.uk-active]="stickyPageHeader">
|
2022-06-26 22:30:54 +02:00
|
|
|
<a routerLink="../pages/" class="uk-button uk-button-link uk-margin-right">
|
|
|
|
<icon name="west" ratio="2" [flex]="true"></icon>
|
|
|
|
</a>
|
2021-03-31 13:23:24 +02:00
|
|
|
<div>
|
2022-04-14 11:50:59 +02:00
|
|
|
<div class="uk-margin-remove uk-text-background uk-text-bold uk-h6">
|
2022-06-26 22:30:54 +02:00
|
|
|
Admin Dashboard <span *ngIf="selectedPageId && page"> - Manage class help texts</span>
|
2022-04-07 20:28:45 +02:00
|
|
|
</div>
|
2022-06-26 22:30:54 +02:00
|
|
|
<h1 class="uk-h4 uk-margin-remove">{{page.name}}</h1>
|
2021-03-31 13:23:24 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div inner>
|
2021-07-14 13:19:57 +02:00
|
|
|
<div *ngIf="showLoading" class="uk-position-center">
|
|
|
|
<loading></loading>
|
|
|
|
</div>
|
|
|
|
<div *ngIf="!showLoading">
|
2022-06-26 22:30:54 +02:00
|
|
|
<div class="uk-margin-top uk-margin-medium-bottom uk-flex-right@m uk-flex-center uk-flex-middle uk-grid" uk-grid>
|
|
|
|
<div search-input [expandable]="true" [searchControl]="filterForm" searchInputClass="outer" placeholder="Search helptext" class="uk-width-1-3@xl uk-width-2-5@l uk-width-1-2@m uk-width-1-1">
|
2022-04-07 20:28:45 +02:00
|
|
|
</div>
|
2022-06-26 22:30:54 +02:00
|
|
|
<div>
|
|
|
|
<a (click)="newPageContent()"
|
|
|
|
class="uk-flex uk-flex-middle uk-button uk-button-default">
|
|
|
|
<icon [flex]="true" name="add"></icon>
|
|
|
|
<span class="uk-margin-small-left">Add class help text</span>
|
|
|
|
</a>
|
2022-04-07 20:28:45 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
2022-06-26 22:30:54 +02:00
|
|
|
<div class="uk-section">
|
|
|
|
<div *ngIf="checkboxes.length > 0">
|
|
|
|
<div class="uk-grid uk-child-width-1-2@l uk-child-width-1-1" uk-height-match=".uk-card-body" uk-grid>
|
|
|
|
<div *ngFor="let check of checkboxes; let i=index">
|
|
|
|
<div class="uk-card uk-card-default uk-margin-bottom">
|
|
|
|
<div class="uk-card-body">
|
|
|
|
<div class="uk-margin-medium-bottom">
|
|
|
|
<div class="multi-line-ellipsis lines-2">
|
|
|
|
<p>{{check.divHelpContent.content | htmlToString}}</p>
|
2021-07-14 13:19:57 +02:00
|
|
|
</div>
|
2022-06-26 22:30:54 +02:00
|
|
|
<div class="uk-text-small">
|
|
|
|
<span class="uk-text-meta">Class: </span>{{check.divHelpContent.divId.name ? check.divHelpContent.divId.name : check.divHelpContent.divId}}
|
2021-07-14 13:19:57 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2022-06-26 22:30:54 +02:00
|
|
|
<div class="uk-card-footer uk-padding-remove-vertical">
|
|
|
|
<div class="uk-grid uk-grid-small uk-flex-nowrap uk-grid-divider uk-flex-right" uk-grid>
|
|
|
|
<div>
|
|
|
|
<div class="uk-padding-small uk-padding-remove-horizontal">
|
|
|
|
<mat-slide-toggle [checked]="check.divHelpContent.isActive"
|
|
|
|
(change)="($event.source.checked = check.divHelpContent.isActive);togglePageHelpContents(!check.divHelpContent.isActive,[check.divHelpContent._id])"
|
|
|
|
uk-tooltip="title:<div><div class='uk-text-bold '> Enable or disable help text to show or hide it from the dashboard</div></div>">
|
|
|
|
<span class="uk-text-small">Enable</span>
|
|
|
|
</mat-slide-toggle>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div><div class="uk-padding-small uk-padding-remove-horizontal">
|
|
|
|
<button class="uk-button uk-button-link uk-flex uk-flex-middle" (click)="editPageHelpContent(check.divHelpContent._id)">
|
|
|
|
<icon name="edit" [flex]="true"></icon>
|
|
|
|
<span class="uk-margin-xsmall-left"> Edit</span>
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
<div class="uk-padding-small uk-padding-remove-horizontal">
|
|
|
|
<button class="uk-button uk-button-link uk-flex uk-flex-middle"
|
|
|
|
(click)="confirmDeletePageHelpContent(check.divHelpContent._id)">
|
|
|
|
<icon name="delete" [flex]="true"></icon>
|
|
|
|
<span class="uk-margin-xsmall-left"> Delete</span>
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
2021-03-31 13:23:24 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2022-06-26 22:30:54 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div *ngIf="checkboxes.length == 0"
|
|
|
|
class="uk-card uk-card-default uk-padding-large uk-text-center uk-text-bold">
|
|
|
|
<div>No class help texts found</div>
|
|
|
|
</div>
|
2021-03-31 13:23:24 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2021-07-14 13:19:57 +02:00
|
|
|
</div>
|
2022-06-21 12:41:44 +02:00
|
|
|
<modal-alert #AlertModalDeletePageHelpContents [overflowBody]="false" classTitle="uk-background-primary uk-light"
|
|
|
|
(alertOutput)="confirmedDeletePageHelpContents($event)"></modal-alert>
|