2021-01-28 17:55:09 +01:00
< div page-content >
2021-01-11 19:33:24 +01:00
< div header >
2021-01-26 18:00:40 +01:00
< admin-tabs tab = "page" [ portal ] = " portal " > < / admin-tabs >
2021-03-18 15:11:41 +01:00
< div * ngIf = "!showLoading" class = "uk-grid" uk-grid >
2021-01-11 19:33:24 +01:00
< div class = "uk-width-1-1" >
< ul class = "uk-subnav uk-subnav-pill" >
< li [ class . uk-active ] = " filterForm . get ( ' type ' ) . value = == ' all ' " > < a
2021-01-28 17:55:09 +01:00
(click)="filterForm.get('type').setValue('all')">< span > All pages< / span > < / a > < / li >
2021-01-11 19:33:24 +01:00
< li * ngFor = "let type of typeOptions; let i=index"
[class.uk-active]="filterForm.get('type').value === type.value">< a
2021-01-28 17:55:09 +01:00
(click)="filterForm.get('type').setValue(type.value)">< span > {{type.label}}< / span > < / a > < / li >
2021-01-11 19:33:24 +01:00
< / ul >
2019-12-20 12:38:13 +01:00
< / div >
2021-03-18 15:11:41 +01:00
< div
class="uk-width-1-1 uk-flex uk-flex-right@m uk-flex-center uk-flex-wrap uk-flex-middle uk-grid uk-margin-remove-top"
uk-grid>
< div # searchInputComponent search-input [ control ] = " filterForm . controls . keyword " [ showSearch ] = " false "
placeholder="Search page"
2021-02-02 13:29:18 +01:00
[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
2021-01-12 11:23:26 +01:00
< div * ngIf = "isPortalAdministrator" >
2021-01-11 19:33:24 +01:00
< a ( click ) = " newPage ( ) "
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 page< / button >
< / a >
< / div >
2021-01-11 10:21:42 +01:00
< / div >
2019-12-20 12:38:13 +01:00
< / div >
2021-03-02 16:52:09 +01:00
< 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]="getSelectedPages().length == 0 ? 'pos:left; cls: uk-active' : null"
title="Select at least one page">< input id = "checkAll" type = "checkbox" ( click ) = " selectAll ( ) "
2021-03-18 15:11:41 +01:00
[ngModel]="getSelectedPages().length ==checkboxes.length"/>
2021-02-25 16:55:56 +01:00
< span * ngIf = "getSelectedPages().length > 0" class = "uk-margin-left uk-text-muted" >
{{getSelectedPages().length}} pages selected < / span >
2021-03-18 15:11:41 +01: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]="getSelectedPages().length == 0 ? 'pos:left; cls: uk-active' : 'cls: uk-invisible'"
2021-03-02 16:52:09 +01:00
title="Select at least one page">
2021-02-25 16:55:56 +01:00
< li * ngIf = "!isPortalAdministrator" > < a [ class ] = " getSelectedPages ( ) . length = = 0 ? ' uk-disabled ' : ' ' "
2021-03-18 15:11:41 +01:00
(click)="togglePages(true,getSelectedPages())">< i > < / i > Enable
2021-02-25 16:55:56 +01:00
< / a > < / li >
< li * ngIf = "!isPortalAdministrator" > < a [ class ] = " getSelectedPages ( ) . length = = 0 ? ' uk-disabled ' : ' ' "
2021-03-18 15:11:41 +01:00
(click)="togglePages(false,getSelectedPages())">< i > < / i > Disable
2021-02-25 16:55:56 +01:00
< / a >
< / li >
< li * ngIf = "isPortalAdministrator" > < a [ class ] = " getSelectedPages ( ) . length = = 0 ? ' uk-disabled ' : ' ' "
2021-03-18 15:11:41 +01:00
(click)="confirmDeleteSelectedPages()">< i > < / i > Delete < / a > < / li >
2021-02-25 16:55:56 +01:00
< / ul >
< / div >
< / div >
2021-01-11 19:33:24 +01:00
< / div >
< div inner >
2021-02-25 16:55:56 +01:00
< div * ngIf = "showLoading" class = "uk-position-center" >
2021-03-18 15:11:41 +01:00
< loading > < / loading >
2021-02-25 16:55:56 +01:00
< / div >
2021-02-01 20:17:55 +01:00
< div * ngIf = "!showLoading" >
2021-03-18 15:11:41 +01:00
< ul * ngIf = "checkboxes.length > 0" 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-padding" >
< div class = "" > < input id = "{{check.page._id}}" class = "checkBox" type = "checkbox"
name="pagescb[]" value="{{check.page._id}}" [(ngModel)]="check.checked">
< / div >
< div class = "uk-width-expand" >
< div class = "title uk-margin-medium-bottom" > Name< / div >
< div class = "name uk-margin-medium-bottom" href = "#" > {{check.page.name}}< / div >
< div * ngIf = "check.page.entities && check.page.entities.length > 0" > < span
class="title">Entities: < / span >
{{getEntitiesAsString(check.page)}}< / div >
< div class = " uk-margin-small-bottom" > < span class = "title" > Route: < / span > {{check.page.route}}< / div >
< div * ngIf = "!pagesType" class = " uk-margin-small-bottom" > < span
class="title">Type: < / span > {{check.page.type}}< / div >
< div * ngIf = "!portal" class = " uk-margin-small-bottom" >
< span class = "title" > Portal type: < / span > {{check.page.portalType}}
< / div >
< / div >
2022-01-11 11:05:40 +01:00
< div * ngIf = "isPortalAdministrator || (check.page.portalType == properties.adminToolsPortalType && check.page.portalPid == portal)" class = "uk-width-1-4" >
2021-03-18 15:11:41 +01:00
< div class = "title uk-margin-medium-bottom" > Actions< / div >
< div class = "actions" href = "#" >
< i class = "clickable " ( click ) = " editPage ( i ) " uk-icon = "pencil" > < / i >
< i class = "clickable uk-text-danger"
(click)="confirmDeletePage(check.page._id)" uk-icon="trash">< / i >
< / div >
< / div >
< div * ngIf = "!isPortalAdministrator & & ( ( check . page . top | | check . page . bottom | | check . page . left | |
2021-02-25 16:55:56 +01:00
check.page.right) || pageWithDivIds.includes(check.page._id) )" class="uk-width-1-4">
2021-07-14 13:19:57 +02:00
< div class = "title uk-margin-medium-bottom" > Help texts< / div >
2021-03-18 15:11:41 +01:00
< div class = " uk-margin-small-bottom" >
< a * ngIf = "check.page.top || check.page.bottom || check.page.left || check.page.right"
class="helpContents"
[queryParams]="{pageId: check.page._id}"
routerLink="../helptexts">
2021-07-14 13:19:57 +02:00
Manage page help texts
2021-03-31 13:23:24 +02:00
< span * ngIf = "pageHelpContentsCount[check.page._id]" > ({{pageHelpContentsCount[check.page._id]}})< / span >
2021-03-18 15:11:41 +01:00
< / a >
< / div >
< div >
< a * ngIf = "pageWithDivIds.includes(check.page._id)"
[queryParams]="{ pageId: check.page._id}"
2021-07-14 13:19:57 +02:00
routerLink="../classContents">Manage class help texts
2021-03-31 13:23:24 +02:00
< span * ngIf = "pageClassContentsCount[check.page._id]" > ({{pageClassContentsCount[check.page._id]}})< / span >
< / a >
2021-03-18 15:11:41 +01:00
< / div >
< / div >
< div * ngIf = "!isPortalAdministrator" class = "uk-width-1-4" >
< div class = "title uk-margin-medium-bottom" > Enable/disable< / div >
< mat-slide-toggle [ checked ] = " check . page . isEnabled "
(change)="($event.source.checked = check.page.isEnabled);togglePages(!check.page.isEnabled,[check.page._id])"
uk-tooltip="title:< div class = 'uk-padding-small uk-width-large' > < div class = 'uk-text-bold ' > Disable a page to hide it from community dashboard portal.< / div > < div class = ' uk-margin-top' > If the page is disabled, a message 'Can't find that page' will appear in case the url of that page is loaded. If the disabled page belongs to the menu, the link will be removed from menu, too.< / div > < / div > ">
< / mat-slide-toggle >
2021-01-11 19:33:24 +01:00
< / div >
2019-12-20 12:38:13 +01:00
< / div >
2021-03-18 15:11:41 +01:00
< / li >
< / ul >
< 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 pages found< / div >
2019-12-20 12:38:13 +01:00
< / div >
< / div >
< / div >
< / div >
2021-01-28 17:33:16 +01:00
< modal-alert # editModal ( alertOutput ) = " pageSaveConfirmed ( $ event ) "
[okDisabled]="pageForm & & (pageForm.invalid || !pageForm.dirty)">
< form * ngIf = "pageForm" [ formGroup ] = " pageForm " class = "uk-grid uk-child-width-1-1" uk-grid >
2021-03-18 15:11:41 +01:00
< div dashboard-input [ formInput ] = " pageForm . get ( ' route ' ) "
2021-01-28 17:33:16 +01:00
type="text" label="Page route" placeholder="Write a route">
2019-12-20 12:38:13 +01:00
< / div >
2021-01-28 17:33:16 +01:00
< div dashboard-input [ formInput ] = " pageForm . get ( ' name ' ) "
type="text" placeholder="Write a name"
2019-12-20 12:38:13 +01:00
label="Page Name">
< / div >
2022-01-11 12:15:37 +01:00
< ng-container * ngIf = "isPortalAdministrator" >
2022-01-11 11:05:40 +01:00
< div dashboard-input [ formInput ] = " pageForm . get ( ' type ' ) "
type="select" placeholder="Choose a page Type"
label="Type" [options]="typeOptions">
< / div >
< div dashboard-input [ formInput ] = " pageForm . get ( ' entities ' ) " placeholder = "Add an entity"
type="chips" [options]="allEntities" label="Entities">
< / div >
< div dashboard-input type = "select" label = "Portal Type" placeholder = "Choose a type"
[formInput]="pageForm.get('portalType')" [options]="portalUtils.portalTypes">
< / div >
< div class = "form-group" >
< div class = "uk-form-label uk-text-bold uk-margin-small-bottom" > Select if this page have helptext at:< / div >
< div class = "uk-grid uk-grid-small uk-child-width-1-4" uk-grid >
< div dashboard-input [ formInput ] = " pageForm . get ( ' top ' ) "
type="checkbox"
label="Top">
< / div >
< div dashboard-input [ formInput ] = " pageForm . get ( ' right ' ) "
type="checkbox"
label="Right">
< / div >
< div dashboard-input [ formInput ] = " pageForm . get ( ' bottom ' ) "
type="checkbox"
label="Bottom">
< / div >
< div dashboard-input [ formInput ] = " pageForm . get ( ' left ' ) "
type="checkbox"
label="Left">
< / div >
< / div >
< label class = "uk-text-danger" >
By disabling a position, all contents in this position will be deleted.
< / label >
< / div >
2022-01-11 12:15:37 +01:00
< / ng-container >
2019-12-20 12:38:13 +01:00
< / form >
< / modal-alert >
2021-01-28 17:33:16 +01:00
< modal-alert # deleteModal ( alertOutput ) = " confirmedDeletePages ( $ event ) " > < / modal-alert >