2022-04-07 20:28:45 +02:00
< div page-content ( stickyEmitter ) = " stickyPageHeader = $event" >
2022-03-22 16:47:38 +01:00
< div header >
2022-03-24 13:56:55 +01:00
< div class = "uk-flex uk-flex-middle uk-margin-top info" [ class . uk-active ] = " stickyPageHeader " >
2022-06-27 14:50:21 +02:00
< ng-container * ngIf = "showLogo" >
2022-06-26 22:30:54 +02:00
< img [ src ] = " entity | logoUrl " class = "uk-margin-right uk-blend-multiply" >
< / ng-container >
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 Entities< / div >
< h1 class = "uk-h4 uk-margin-remove" > {{name?name:'Super Admin'}}< / h1 >
2022-03-24 13:56:55 +01:00
< / div >
2022-03-22 16:47:38 +01:00
< / div >
2022-03-29 15:05:09 +02:00
< div class = "uk-margin uk-margin-remove-bottom" >
2022-03-22 16:47:38 +01:00
< admin-tabs tab = "entity" [ portal ] = " portal " > < / admin-tabs >
< / 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 >
2022-03-22 16:47:38 +01:00
< div * ngIf = "!showLoading" >
2022-06-24 17:20:40 +02:00
< div class = "uk-grid uk-flex-middle uk-margin-top" uk-grid >
2022-06-21 12:17:43 +02:00
< div class = "uk-width-1-1" >
2022-03-24 13:56:55 +01:00
< ul * ngIf = "!isPortalAdministrator" class = "uk-subnav uk-subnav-pill" >
< li [ class . uk-active ] = " filterForm . get ( ' status ' ) . value = == ' all ' " > < a
(click)="filterForm.get('status').setValue('all')">< span
class="title">All entities< / span > < / a > < / li >
< li [ class . uk-active ] = " filterForm . get ( ' status ' ) . value = == ' enabled ' " > < a
(click)="filterForm.get('status').setValue('enabled')">< span class = "title" > Enabled< / span > < / a > < / li >
< li [ class . uk-active ] = " filterForm . get ( ' status ' ) . value = == ' disabled ' " > < a
(click)="filterForm.get('status').setValue('disabled')">< span class = "title" > Disabled< / span > < / a > < / li >
< / ul >
< / div >
2022-06-21 12:41:44 +02: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-grid >
< div search-input [ expandable ] = " true " [ searchControl ] = " filterForm . get ( ' keyword ' ) " searchInputClass = "outer" placeholder = "Search entity"
class="uk-width-1-3@xl uk-width-2-5@l uk-width-1-2@m uk-width-1-1">< / div >
2022-03-24 13:56:55 +01:00
< div * ngIf = "isPortalAdministrator" >
2022-04-09 15:18:30 +02:00
< button class = "uk-button uk-button-default uk-flex uk-flex-middle" ( click ) = " newEntity ( ) " >
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 entity< / span >
< / button >
2022-03-24 13:56:55 +01:00
< / div >
2022-03-22 16:47:38 +01:00
< / 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-3" >
< th * ngIf = "!portal" >
< label >
< input id = "checkAll" type = "checkbox" ( click ) = " selectAll ( ) " class = "uk-checkbox"
[ngModel]="getSelectedEntities().length ==checkboxes.length"/>
< / label >
< span class = "uk-margin-left" >
< button class = "uk-button uk-button-link" [ class . uk-disabled ] = " getSelectedEntities ( ) . length = = 0 " [ disabled ] = " getSelectedEntities ( ) . length = = 0 " >
Bulk Actions ({{getSelectedEntities().length}})
< / button >
< div uk-dropdown = "mode: click" >
< ul class = "uk-nav uk-dropdown-nav"
[attr.uk-tooltip]="getSelectedEntities().length == 0 ? 'pos:left; cls: uk-active' : 'cls: uk-invisible'"
title="Select at least one entity">
< li * ngIf = "isPortalAdministrator" >
< a ( click ) = " confirmDeleteSelectedEntities ( ) " > < i > < / i > Delete< / a >
< / li >
< / ul >
< / div >
< / span >
< / th >
< th > Name< / th >
< th * ngIf = "!isPortalAdministrator" > Status< / th >
< th * ngIf = "isPortalAdministrator" > Actions< / th >
< / tr >
< / thead >
< tbody >
< tr * ngFor = "let check of checkboxes; let i=index" >
< td * ngIf = "!portal" >
< input id = "{{check.entity._id}}" class = "uk-checkbox" type = "checkbox"
name="entitiescb[]" value="{{check.entity._id}}" [(ngModel)]="check.checked">
< / td >
< td >
< div class = "name" href = "#" > {{check.entity.name}}< / div >
< / td >
< td * ngIf = "!isPortalAdministrator" >
< mat-slide-toggle [ checked ] = " check . entity . isEnabled "
(change)="($event.source.checked = check.entity.isEnabled);toggleEntities(!check.entity.isEnabled,[check.entity._id])"
uk-tooltip="title:< div class = 'uk-padding-small uk-width-large' > < div class = 'uk-text-bold ' > Disable an entity to hide it from community dashboard portal.< / div > < div class = ' uk-margin-top' > If an entity is disabled, all related search and advanced search pages will be hidden from the community dashborad and a message 'Can't find that page' will appear in case the url of that page is loaded. If the related page belongs to the menu the link will be removed from menu, too.< / div > < / div > "
>< / mat-slide-toggle >
< / td >
< td * ngIf = "isPortalAdministrator" >
< icon class = "clickable" name = "edit" [ customClass ] = " ' uk-text-primary ' " ( click ) = " editEntity ( i ) " > < / icon >
< icon class = "clickable uk-margin-small-left" [ customClass ] = " ' uk-text-danger ' " name = "delete" ( click ) = " confirmDeleteEntity ( check . entity . _id ) " > < / icon >
< / td >
< / tr >
< / tbody >
< / table >
< div * ngIf = "checkboxes.length == 0"
class="uk-card uk-card-default uk-padding-large uk-text-center uk-margin-top uk-margin-bottom uk-text-bold">
< div > No entities found< / div >
< / div >
< / div >
2019-12-18 16:14:21 +01:00
< / div >
< / div >
< / div >
2021-01-28 17:33:16 +01:00
< modal-alert # editModal ( alertOutput ) = " entitySaveConfirmed ( $ event ) "
2022-06-21 11:22:28 +02:00
[okDisabled]="entityForm & & (entityForm.invalid || !entityForm.dirty)" classTitle="uk-background-primary uk-light">
2021-01-28 17:33:16 +01:00
< form * ngIf = "entityForm" [ formGroup ] = " entityForm " class = "uk-grid uk-child-width-1-1" uk-grid >
2022-04-11 11:27:10 +02:00
< div input [ formInput ] = " entityForm . get ( ' name ' ) " placeholder = "Entity Name" > < / div >
< div input [ formInput ] = " entityForm . get ( ' pid ' ) " placeholder = "Entity Pid" > < / div >
2019-12-18 16:14:21 +01:00
< / form >
< / modal-alert >
2022-06-21 11:22:28 +02:00
< modal-alert # relatedPages [ overflowBody ] = " false " ( alertOutput ) = " continueToggling ( $ event ) " classTitle = "uk-background-primary uk-light" > < / modal-alert >
< modal-alert # deleteModal [ overflowBody ] = " false " ( alertOutput ) = " confirmedDeleteEntities ( $ event ) " classTitle = "uk-background-primary uk-light" > < / modal-alert >