2021-01-11 10:21:42 +01:00
< div page-content >
< admin-tabs tab = "entity" [ portal ] = " selectedCommunityPid " header > < / admin-tabs >
< div inner class = "admin-pages" >
< div * ngIf = "!errorMessage && !showLoading" class = "filters" uk-sticky = "offset:150" >
< div class = "show-options uk-float-right" >
< button class = "uk-button uk-button-primary " type = "button" > Bulk Actions< / button >
< div uk-dropdown = "mode: click" >
< ul class = "uk-nav uk-margin-left"
[attr.uk-tooltip]="getSelectedEntities().length == 0 ? 'pos:left; cls: uk-active' : 'cls: uk-invisible'"
title="Select at least one entity">
< li * ngIf = "!isPortalAdministrator" > < a [ class ] = " getSelectedEntities ( ) . length = = 0 ? ' uk-disabled ' : ' ' "
(click)="toggleEntities(true, getSelectedEntities())">< i > < / i > Activate
< / a > < / li >
< li * ngIf = "!isPortalAdministrator" > < a [ class ] = " getSelectedEntities ( ) . length = = 0 ? ' uk-disabled ' : ' ' "
(click)="toggleEntities(false, getSelectedEntities())">< i > < / i > Deactivate
< / a > < / li >
< li * ngIf = "isPortalAdministrator" > < a [ class ] = " getSelectedEntities ( ) . length = = 0 ? ' uk-disabled ' : ' ' "
(click)="confirmDeleteSelectedEntities()">< i > < / i > Delete < / a > < / li >
< / ul >
2019-12-18 16:14:21 +01:00
< / div >
< / div >
2021-01-11 10:21:42 +01:00
< div class = "uk-float-right uk-margin-right uk-width-medium" >
< div dashboard-input [ formInput ] = " filterForm . controls . keyword " placeholder = "search entity" > < / div >
2019-12-18 16:14:21 +01:00
< / div >
2021-01-11 10:21:42 +01:00
< ul * ngIf = "!isPortalAdministrator" class = "uk-subnav uk-subnav-pill subCategoriesTabs ignore admin " >
< 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 >
2019-12-18 16:14:21 +01:00
< / div >
< div class = "content-wrapper" id = "contentWrapper" >
2021-01-11 10:21:42 +01:00
< a * ngIf = "!showLoading && isPortalAdministrator && !errorMessage" ( click ) = " newEntity ( ) "
class="uk-flex uk-flex-right uk-flex-middle uk-margin-small-bottom">
< div class = "uk-button-default large uk-icon-button uk-margin-small-right" uk-icon = "plus" >
< / div >
Add entity
< / a >
< div class = "contentPanel " >
2019-12-18 16:14:21 +01:00
< div * ngIf = "!isPortalAdministrator" class = "uk-alert uk-alert-primary uk-margin-top-large" >
< div >
< span class = "uk-margin-small-right uk-icon" uk-icon = "warning" > < / span >
Disable an entity to hide it from community dashboard portal.
< / div >
< div
class="uk-text-small">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 >
2021-01-11 10:21:42 +01:00
< div * ngIf = "updateErrorMessage" class = "uk-alert-danger" uk-alert >
< a class = "uk-alert-close" uk-close > < / a >
{{updateErrorMessage}}
< / div >
2019-12-18 16:14:21 +01:00
< div * ngIf = "errorMessage" class = "uk-alert uk-alert-danger uk-margin-large-top"
role="alert">{{errorMessage}}< / div >
< div [ style . display ] = " showLoading ? ' inline ' : ' none ' "
class="uk-animation-fade uk-margin-large-top uk-width-1-1" role="alert">< img
class="uk-align-center loading-gif">< / div >
< div class = "md-card uk-margin-medium-bottom" * ngIf = "!errorMessage && !showLoading" >
< div class = "md-card-content" >
< div class = "uk-overflow-container" >
2021-01-11 10:21:42 +01:00
< table class = "uk-table uk-table-striped uk-table-hover uk-table-large" >
< thead class = "form-header" >
2019-12-18 16:14:21 +01:00
< tr >
2021-01-11 10:21:42 +01:00
< th
class="uk-width-small">< input id = "allEntityCheckbox" type = "checkbox"
(change)="toggleCheckBoxes($event)">< / th >
2019-12-18 16:14:21 +01:00
< th > Name< / th >
2021-01-11 10:21:42 +01:00
< th * ngIf = "!isPortalAdministrator" > Status< / th >
< th * ngIf = "!isPortalAdministrator" > Enable/Disable< / th >
2019-12-18 16:14:21 +01:00
< th * ngIf = "isPortalAdministrator" > Actions< / th >
< / tr >
< / thead >
< tbody >
< tr * ngFor = "let check of checkboxes; let i=index" >
< td > < input id = "{{check.entity._id}}" class = "checkBox" type = "checkbox"
name="entitiescb[]" value="{{check.entity._id}}" [(ngModel)]="check.checked">
< / td >
< td >
< div class = "name" href = "#" > {{check.entity.name}}< / div >
< / td >
2021-01-11 10:21:42 +01:00
< td * ngIf = "!isPortalAdministrator" >
< div class = "name" href = "#" > {{check.entity.isEnabled?"Enabled":"Disabled"}}< / div >
< / td >
2019-12-18 16:14:21 +01:00
< td * ngIf = "!isPortalAdministrator" >
< mat-slide-toggle [ checked ] = " check . entity . isEnabled "
(change)="($event.source.checked = check.entity.isEnabled);toggleEntities(!check.entity.isEnabled,[check.entity._id])">< / mat-slide-toggle >
< / td >
< td * ngIf = "isPortalAdministrator" >
< div class = "actions" href = "#" >
2020-10-30 15:01:44 +01:00
< i class = "clickable " uk-icon = "pencil" ( click ) = " editEntity ( i ) " > < / i >
< i class = "clickable uk-text-danger" uk-icon = "trash"
(click)="confirmDeleteEntity(check.entity._id)">< / i >
2019-12-18 16:14:21 +01:00
< / div >
< / td >
< / tr >
< / tbody >
< / table >
< div class = "uk-width-1-1 uk-flex uk-flex-center " * ngIf = "isPortalAdministrator" >
2020-10-30 15:01:44 +01:00
< div class = "uk-width-small uk-button uk-button-default" ( click ) = " newEntity ( ) " >
< i class = "" uk-icon = "plus" > < / i >
2019-12-18 16:14:21 +01:00
< / div >
< / div >
< div * ngIf = "checkboxes.length==0" class = "col-md-12" >
< div class = "uk-alert-warning" uk-alert > No entities found< / div >
< / div >
< / div >
< / div >
< / div >
< / div >
< / div >
< / div >
< / div >
< modal-alert # AlertModalSaveEntity ( alertOutput ) = " entitySaveConfirmed ( $ event ) "
[okDisabled]="myForm & & (myForm.invalid || !myForm.dirty)">
< div * ngIf = "modalErrorMessage" class = "uk-alert-danger" uk-alert aria-hidden = "true" > {{ modalErrorMessage }}< / div >
< form [ formGroup ] = " myForm " >
< div dashboard-input class = "uk-margin-small-left" [ formInput ] = " myForm . controls . name "
type="text"
label="Entity Name">
< / div >
< div dashboard-input class = "uk-margin-small-left" [ formInput ] = " myForm . controls . pid "
type="text"
label="Entity Pid">
< / div >
< input type = "hidden" formControlName = "_id" >
< / form >
< / modal-alert >
< modal-alert # AlertModalRelatedPages ( alertOutput ) = " continueToggling ( $ event ) " > < / modal-alert >
< modal-alert # AlertModalDeleteEntities ( alertOutput ) = " confirmedDeleteEntities ( $ event ) " > < / modal-alert >