2022-07-13 19:25:19 +02:00
< div page-content >
2022-03-22 16:47:38 +01:00
< div header >
2022-07-15 12:28:55 +02:00
< admin-tabs tab = "entity" [ portal ] = " portal " [ type ] = " type " > < / admin-tabs >
2022-07-13 19:25:19 +02:00
< ul * ngIf = "!isPortalAdministrator" class = "uk-subnav uk-subnav-pill uk-margin-medium-top" >
< 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 >
< div actions >
< div class = "uk-section-xsmall" >
< div class = "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"
[disabled]="showLoading" class="uk-width-1-3@xl uk-width-2-5@l uk-width-1-2@m uk-width-1-1">< / div >
< div * ngIf = "isPortalAdministrator" >
< button class = "uk-button uk-button-default uk-flex uk-flex-middle" ( click ) = " newEntity ( ) "
[disabled]="showLoading" [class.uk-disabled]="showLoading">
< icon name = "add" [ flex ] = " true " > < / icon >
< span class = "uk-margin-small-left uk-text-bold uk-text-uppercase" > Add entity< / span >
< / button >
2022-03-22 16:47:38 +01:00
< / div >
< / div >
2022-06-30 17:22:35 +02:00
< / div >
2022-07-13 19:25:19 +02:00
< / div >
< div inner >
2022-06-30 17:22:35 +02:00
< div class = "uk-section uk-section-small uk-position-relative" style = "min-height: 60vh" >
< div * ngIf = "showLoading" class = "uk-position-center" >
< loading > < / loading >
< / div >
< ng-container * ngIf = "!showLoading" >
< 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 >
2022-06-24 17:20:40 +02:00
< 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" >
2022-06-30 17:22:35 +02:00
< div class = "uk-flex uk-flex-middle" >
< icon class = "clickable" [ flex ] = " true " name = "edit" [ customClass ] = " ' uk-text-primary ' " ( click ) = " editEntity ( i ) " > < / icon >
< icon class = "clickable uk-margin-small-left" [ flex ] = " true " [ customClass ] = " ' uk-text-danger ' " name = "delete" ( click ) = " confirmDeleteEntity ( check . entity . _id ) " > < / icon >
< / div >
2022-06-24 17:20:40 +02:00
< / td >
< / tr >
< / tbody >
< / table >
2022-06-30 17:22:35 +02:00
< / ng-container >
< / div >
2019-12-18 16:14:21 +01:00
< / 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 >