2021-02-25 16:55:56 +01:00
< div page-content >
< div header >
< div class = "uk-text-bold" >
< span * ngIf = "selectedPageId && page" > {{page.name}}< / span >
2019-12-20 12:38:13 +01:00
< / div >
2021-02-25 16:55:56 +01:00
< div class = "uk-margin-top" >
2021-03-02 16:52:09 +01:00
< a routerLink = "../pages/" class = "uk-text-secondary uk-text-uppercase uk-text-bold uk-text-small" >
2021-03-18 15:11:41 +01:00
< span class = "uk-icon-button small uk-icon uk-button-secondary" >
2021-03-02 16:52:09 +01:00
< icon name = "arrow_left" > < / icon >
< / span >
< span class = "space" >
2021-03-08 16:32:33 +01:00
Back to pages list
2021-03-02 16:52:09 +01:00
< / span >
< / a >
2021-02-25 16:55:56 +01:00
< / 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 # searchInputComponent search-input [ control ] = " filterForm " [ showSearch ] = " false " placeholder = "Search helptext"
[selected]="selectedKeyword" (closeEmitter)="onSearchClose()" (resetEmitter)="reset()"
2021-03-18 15:11:41 +01:00
[bordered]="true" colorClass="uk-text-secondary"
class="uk-width-1-3@xl uk-width-2-5@l uk-width-1-2@m uk-width-1-1">< / div >
2021-02-25 16:55:56 +01:00
< 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 >
2021-07-14 13:19:57 +02:00
< button class = "uk-button uk-button-link uk-margin-small-left uk-text-secondary" > Add new page help text
< / button >
2021-02-25 16:55:56 +01:00
< / a >
2019-12-20 12:38:13 +01:00
< / div >
< / div >
2021-07-14 13:19:57 +02:00
< div * ngIf = "!showLoading && checkboxes.length > 0"
class="uk-padding uk-flex uk-padding-remove-bottom uk-padding-remove-top uk-margin-remove-top uk-margin-small-bottom uk-display-inline"
2021-02-25 16:55:56 +01:00
[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 >
2021-07-14 13:19:57 +02:00
< a class = "uk-margin-left" > Actions < / a >
2021-02-25 16:55:56 +01:00
< 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 ' : ' ' "
2021-03-18 15:11:41 +01:00
(click)="togglePageHelpContents(true,getSelectedPageHelpContents())">< i > < / i > Enable
2021-02-25 16:55:56 +01:00
< / a > < / li >
< li > < a [ class ] = " getSelectedPageHelpContents ( ) . length = = 0 ? ' uk-disabled ' : ' ' "
2021-03-18 15:11:41 +01:00
(click)="togglePageHelpContents(false,getSelectedPageHelpContents())">< i > < / i > Disable
2021-02-25 16:55:56 +01:00
< / a >
< / li >
< li > < a [ class ] = " getSelectedPageHelpContents ( ) . length = = 0 ? ' uk-disabled ' : ' ' "
2021-03-18 15:11:41 +01:00
(click)="confirmDeleteSelectedPageHelpContents()">< i > < / i > Delete < / a > < / li >
2021-02-25 16:55:56 +01:00
< / ul >
< / div >
2019-12-20 12:38:13 +01:00
< / div >
2021-02-25 16:55:56 +01:00
< / div >
< div inner >
2021-07-14 13:19:57 +02:00
< div * ngIf = "showLoading" class = "uk-position-center" >
< loading > < / loading >
< / div >
< div * ngIf = "!showLoading" >
< 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" >
< div > < input id = "{{check.pageHelpContent._id}}" class = "checkBox" type = "checkbox"
name="entitiescb[]" value="{{check.pageHelpContent._id}}" [(ngModel)]="check.checked">
< / div >
< div class = "uk-width-expand uk-margin-medium-bottom" >
< div * ngIf = "!selectedPageId" >
< div class = "page" href = "#" > {{check.pageHelpContent.page.name}}< / div >
2021-03-18 15:11:41 +01:00
< / div >
2021-07-14 13:19:57 +02:00
< div class = "content multi-line-ellipsis lines-2" >
< p > {{check.pageHelpContent.content|htmlToString}}< / p > < / div >
< / div >
< div class = "uk-grid uk-width-1-1 uk-margin-left" >
< div class = " " >
< span class = "title" > Placement: < / span > {{check.pageHelpContent.placement}}
< / div >
< div class = " " >
< span class = "title" > Order: < / span > {{check.pageHelpContent.order}}
< / div >
< div class = " " >
< span class = "title uk-margin-small-right" > Enable/disable: < / span >
< mat-slide-toggle [ checked ] = " check . pageHelpContent . isActive "
(change)="($event.source.checked = check.pageHelpContent.isActive);togglePageHelpContents(!check.pageHelpContent.isActive,[check.pageHelpContent._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 >
< / div >
< div class = "uk-width-1-5 uk-first-column" >
< div class = " uk-flex-center uk-flex" >
< div class = "actions" href = "#" >
< div class = "" ( click ) = " editPageHelpContent ( check . pageHelpContent . _id ) "
class="uk-button action uk-margin-top uk-flex uk-flex-middle ">
< i class = "clickable" uk-icon = "pencil"
>< / i >
< span class = "uk-margin-small-left" > Edit< / span >
< / div >
< div ( click ) = " confirmDeletePageHelpContent ( check . pageHelpContent . _id ) "
class="uk-button action uk-margin-top uk-flex uk-flex-middle ">
< i class = "clickable " uk-icon = "trash"
>< / i >
< span class = "uk-margin-small-left" >
2021-02-25 16:55:56 +01:00
Delete
< / span >
2019-12-20 12:38:13 +01:00
< / div >
< / div >
2021-07-14 13:19:57 +02:00
< / div >
2019-12-20 12:38:13 +01:00
< / 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 page help texts found< / div >
2019-12-20 12:38:13 +01:00
< / div >
< / div >
< / div >
2021-03-18 15:11:41 +01:00
< / div >
< modal-alert # AlertModalDeletePageHelpContents ( alertOutput ) = " confirmedDeletePageHelpContents ( $ event ) " > < / modal-alert >