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-04-07 20:28:45 +02:00
< div class = "uk-flex uk-flex-middle uk-margin-top info"
[class.uk-active]="stickyPageHeader">
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-04-07 20:28:45 +02:00
Admin Dashboard < span * ngIf = "selectedPageId && page" > - Manage class help texts of {{page.name}}< / span >
< / div >
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-04-07 20:28:45 +02:00
< div class = "uk-grid uk-flex-middle uk-margin-top uk-margin-medium-bottom" uk-grid >
< div >
< a routerLink = "../pages/" class = "uk-button uk-button-link uk-text-uppercase uk-flex uk-flex-middle" >
2022-06-16 16:24:36 +02:00
< icon name = "west" [ flex ] = " true " > < / icon >
2022-04-07 20:28:45 +02:00
< span class = "uk-margin-small-left" > Back to pages< / span >
< / a >
< / div >
< div class = "uk-width-expand 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 " 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" >
< div >
< a ( click ) = " newPageContent ( ) "
class="uk-flex uk-flex-middle uk-text-uppercase">
< button class = "large uk-icon-button uk-button-secondary" >
< icon name = "add" > < / icon >
< / button >
< button class = "uk-button uk-button-link uk-margin-small-left uk-text-secondary" > Add new class help text
< / button >
< / a >
< / div >
< / div >
< div * ngIf = "showLoading && checkboxes.length > 0"
class="uk-padding uk-padding-remove-bottom uk-padding-remove-top uk-margin-remove-top uk-margin-small-bottom uk-display-inline"
[attr.uk-tooltip]="getSelectedPageHelpContents().length == 0 ? 'pos:left; cls: uk-active' : 'cls: uk-invisible'"
title="Select at least one help text">< input id = "checkAll" type = "checkbox" ( click ) = " selectAll ( ) "
[ngModel]="getSelectedPageHelpContents().length ==checkboxes.length"/>
< span * ngIf = "getSelectedPageHelpContents().length > 0" class = "uk-margin-left uk-text-muted" >
{{getSelectedPageHelpContents().length}} pages selected < / span >
< a class = "uk-margin-left " > Actions < / a >
< div uk-dropdown = "mode: click" >
< ul class = "uk-nav uk-dropdown-nav"
[attr.uk-tooltip]="getSelectedPageHelpContents().length == 0 ? 'pos:left; cls: uk-active' : 'cls: uk-invisible'"
title="Select at least one help text">
< li > < a [ class ] = " getSelectedPageHelpContents ( ) . length = = 0 ? ' uk-disabled ' : ' ' "
(click)="togglePageHelpContents(true,getSelectedPageHelpContents())">< i > < / i > Enable
< / a > < / li >
< li > < a [ class ] = " getSelectedPageHelpContents ( ) . length = = 0 ? ' uk-disabled ' : ' ' "
(click)="togglePageHelpContents(false,getSelectedPageHelpContents())">< i > < / i > Disable
< / a >
< / li >
< li > < a [ class ] = " getSelectedPageHelpContents ( ) . length = = 0 ? ' uk-disabled ' : ' ' "
(click)="confirmDeleteSelectedPageHelpContents()">< i > < / i > Delete < / a > < / li >
< / ul >
< / div >
< / div >
< / div >
< / div >
2021-07-14 13:19:57 +02:00
< div * ngIf = "checkboxes.length > 0" class = "uk-margin-medium-bottom" >
< ul class = "uk-list pages" >
< li * ngFor = "let check of checkboxes; let i=index" class = "uk-card uk-card-default uk-margin-bottom" >
< div class = "uk-grid uk-grid-divider uk-padding" uk-grid >
< div class = "uk-width-4-5 uk-first-column " >
< div class = "uk-grid uk-flex uk-flex-middle" >
2022-06-16 16:24:36 +02:00
< div > < input id = "{{check.divHelpContent._id}}" class = "uk-checkbox" type = "checkbox"
2021-07-14 13:19:57 +02:00
name="entitiescb[]" value="{{check.divHelpContent._id}}"
[(ngModel)]="check.checked">
< / div >
< div class = "uk-width-expand uk-margin-medium-bottom" >
2021-03-31 13:23:24 +02:00
2021-07-14 13:19:57 +02:00
< div class = "content multi-line-ellipsis lines-2" >
< p > {{check.divHelpContent.content|htmlToString}}< / p > < / div >
< / div >
< div class = "uk-grid uk-width-1-1 uk-margin-left" >
< div class = " " >
< span
class="title">Class: < / span > {{check.divHelpContent.divId.name ? check.divHelpContent.divId.name : check.divHelpContent.divId}}
< / div >
< div class = " " >
< span class = "title uk-margin-small-right" > Enable/disable: < / span >
< 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 class = 'uk-padding-small uk-width-large' > < div class = 'uk-text-bold ' > Enable or disable help text to show or hide it from the dashboard< / div > < / div > "
>< / mat-slide-toggle >
< / div >
< / div >
< / div >
2021-03-31 13:23:24 +02:00
2021-07-14 13:19:57 +02:00
< / div >
< div class = "uk-width-1-5 uk-first-column" >
2021-03-31 13:23:24 +02:00
2021-07-14 13:19:57 +02:00
< div class = " uk-flex-center uk-flex" >
< div class = "actions" href = "#" >
2022-06-16 16:24:36 +02:00
< button ( click ) = " editPageHelpContent ( check . divHelpContent . _id ) " class = "uk-button uk-button-secondary uk-margin-top uk-flex uk-flex-middle" >
< icon name = "edit" [ flex ] = " true " > < / icon >
2022-01-13 14:46:22 +01:00
< span class = "uk-margin-small-left" > Edit< / span >
< / button >
< button ( click ) = " confirmDeletePageHelpContent ( check . divHelpContent . _id ) "
2022-06-16 16:24:36 +02:00
class="uk-button uk-button-danger uk-margin-top uk-flex uk-flex-middle">
< icon name = "delete" [ flex ] = " true " > < / icon >
2022-01-13 14:46:22 +01:00
< span class = "uk-margin-small-left" > Delete< / span >
< / button >
2021-03-31 13:23:24 +02:00
< / div >
< / div >
< / div >
< / div >
2021-07-14 13:19:57 +02:00
< / li >
< / ul >
< / div >
< 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 class help texts found< / div >
2021-03-31 13:23:24 +02:00
< / div >
< / div >
< / div >
2021-07-14 13:19:57 +02:00
< / div >
< modal-alert # AlertModalDeletePageHelpContents ( alertOutput ) = " confirmedDeletePageHelpContents ( $ event ) " > < / modal-alert >