[Library | Trunk]: Dashboard: Admin tools pages: Fix no rasults card and loading. Add notifications on actions and errors.
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@60666 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
4e00cd1caa
commit
4ec2c7c124
|
@ -1,7 +1,7 @@
|
||||||
<div page-content class="admin-pages">
|
<div page-content class="admin-pages">
|
||||||
<div header>
|
<div header>
|
||||||
<admin-tabs tab="class" header></admin-tabs>
|
<admin-tabs tab="class" header></admin-tabs>
|
||||||
<div *ngIf="!errorMessage && !showLoading" class="uk-grid" uk-grid>
|
<div *ngIf="!showLoading" class="uk-grid" uk-grid>
|
||||||
<div class="uk-width-1-1">
|
<div class="uk-width-1-1">
|
||||||
<ul class="uk-subnav uk-subnav-pill">
|
<ul class="uk-subnav uk-subnav-pill">
|
||||||
<li [class.uk-active]="filterForm.get('type').value === 'all'" class="uk-margin-small-bottom"><a
|
<li [class.uk-active]="filterForm.get('type').value === 'all'" class="uk-margin-small-bottom"><a
|
||||||
|
@ -14,9 +14,11 @@
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</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 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.controls.keyword" [showSearch]="false" placeholder="Search class"
|
<div #searchInputComponent search-input [control]="filterForm.controls.keyword" [showSearch]="false"
|
||||||
|
placeholder="Search class"
|
||||||
[selected]="selectedKeyword" (closeEmitter)="onSearchClose()" (resetEmitter)="reset()"
|
[selected]="selectedKeyword" (closeEmitter)="onSearchClose()" (resetEmitter)="reset()"
|
||||||
[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>
|
[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>
|
||||||
<div class="show-options">
|
<div class="show-options">
|
||||||
<button class="uk-button uk-button-secondary">Bulk Actions</button>
|
<button class="uk-button uk-button-secondary">Bulk Actions</button>
|
||||||
<div uk-dropdown="mode: click">
|
<div uk-dropdown="mode: click">
|
||||||
|
@ -41,70 +43,59 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div inner>
|
<div inner>
|
||||||
<loading *ngIf="showLoading" class="uk-margin-large-top"></loading>
|
<div *ngIf="showLoading" class="uk-position-center">
|
||||||
|
<loading></loading>
|
||||||
|
</div>
|
||||||
<div *ngIf="!showLoading">
|
<div *ngIf="!showLoading">
|
||||||
<div *ngIf="updateErrorMessage" class="uk-alert-danger" uk-alert>
|
<table *ngIf="checkboxes.length > 0"class="uk-table uk-table-striped uk-table-large">
|
||||||
<a class="uk-alert-close" uk-close></a>
|
<thead class="uk-card-header">
|
||||||
{{updateErrorMessage}}
|
<tr>
|
||||||
</div>
|
<th
|
||||||
<div *ngIf="errorMessage" class="uk-alert uk-alert-danger uk-margin-large-top"
|
class="uk-width-small"><input id="allDivIdCheckbox" type="checkbox"
|
||||||
role="alert">{{errorMessage}}</div>
|
(change)="toggleCheckBoxes($event)"></th>
|
||||||
<div class="md-card uk-margin-medium-bottom" *ngIf="!errorMessage">
|
<th>Name</th>
|
||||||
<div class="md-card-content">
|
<th *ngIf="!selectedCommunityPid">Portal Type</th>
|
||||||
<div class="uk-overflow-container">
|
<th>Page</th>
|
||||||
|
<th>Actions</th>
|
||||||
<table class="uk-table uk-table-striped uk-table-large">
|
</tr>
|
||||||
<thead class="uk-card-header">
|
</thead>
|
||||||
<tr>
|
<tbody>
|
||||||
<th
|
<tr *ngFor="let check of checkboxes; let i=index">
|
||||||
class="uk-width-small"><input id="allDivIdCheckbox" type="checkbox"
|
<td><input id="{{check.divId._id}}" class="checkBox" type="checkbox"
|
||||||
(change)="toggleCheckBoxes($event)"></th>
|
name="divIdscb[]" value="{{check.divId._id}}" [(ngModel)]="check.checked">
|
||||||
<th>Name</th>
|
</td>
|
||||||
<th *ngIf="!selectedCommunityPid">Portal Type</th>
|
<td>
|
||||||
<th>Page</th>
|
<div class="name" href="#">{{check.divId.name}}</div>
|
||||||
<th>Actions</th>
|
</td>
|
||||||
</tr>
|
<td *ngIf="!selectedCommunityPid">
|
||||||
</thead>
|
<div class="portalType" href="#">{{check.divId.portalType}}</div>
|
||||||
<tbody>
|
</td>
|
||||||
<tr *ngFor="let check of checkboxes; let i=index">
|
<td>
|
||||||
<td><input id="{{check.divId._id}}" class="checkBox" type="checkbox"
|
<div class="pages" href="#">
|
||||||
name="divIdscb[]" value="{{check.divId._id}}" [(ngModel)]="check.checked">
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<div class="name" href="#">{{check.divId.name}}</div>
|
|
||||||
</td>
|
|
||||||
<td *ngIf="!selectedCommunityPid">
|
|
||||||
<div class="portalType" href="#">{{check.divId.portalType}}</div>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<div class="pages" href="#">
|
|
||||||
<span *ngFor="let page of check.divId.pages let i=index">{{page.name}}<span
|
<span *ngFor="let page of check.divId.pages let i=index">{{page.name}}<span
|
||||||
*ngIf="i<(check.divId.pages.length-1)">, </span></span>
|
*ngIf="i<(check.divId.pages.length-1)">, </span></span>
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
|
|
||||||
<div class="actions" href="#">
|
|
||||||
<i class="clickable" uk-icon="pencil" (click)="editDivId(i)"></i>
|
|
||||||
<i class="clickable uk-text-danger" uk-icon="trash"
|
|
||||||
(click)="confirmDeleteDivId(check.divId._id)"></i>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
<div *ngIf="checkboxes.length==0" class="col-md-12">
|
|
||||||
<div class="uk-alert-warning uk-alert">No classes found</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</td>
|
||||||
</div>
|
<td>
|
||||||
|
|
||||||
|
<div class="actions" href="#">
|
||||||
|
<i class="clickable" uk-icon="pencil" (click)="editDivId(i)"></i>
|
||||||
|
<i class="clickable uk-text-danger" uk-icon="trash"
|
||||||
|
(click)="confirmDeleteDivId(check.divId._id)"></i>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<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 classes found</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<modal-alert #editModal (alertOutput)="divIdSaveConfirmed($event)"
|
<modal-alert #editModal (alertOutput)="divIdSaveConfirmed($event)"
|
||||||
[okDisabled]="classForm && (classForm.invalid || !classForm.dirty)">
|
[okDisabled]="classForm && (classForm.invalid || !classForm.dirty)">
|
||||||
<div *ngIf="modalErrorMessage" class="uk-alert-danger" uk-alert aria-hidden="true">{{ modalErrorMessage }}</div>
|
|
||||||
<form *ngIf="classForm" [formGroup]="classForm" class="uk-grid uk-child-width-1-1" uk-grid>
|
<form *ngIf="classForm" [formGroup]="classForm" class="uk-grid uk-child-width-1-1" uk-grid>
|
||||||
<div dashboard-input [formInput]="classForm.get('name')"
|
<div dashboard-input [formInput]="classForm.get('name')"
|
||||||
type="text" label="Class Name" placeholder="Write a name">
|
type="text" label="Class Name" placeholder="Write a name">
|
||||||
|
|
|
@ -37,9 +37,6 @@ export class DivIdsComponent implements OnInit {
|
||||||
public properties: EnvProperties = properties;
|
public properties: EnvProperties = properties;
|
||||||
public formPages: Page[] = [];
|
public formPages: Page[] = [];
|
||||||
public showLoading: boolean = true;
|
public showLoading: boolean = true;
|
||||||
public errorMessage: string = '';
|
|
||||||
public updateErrorMessage: string = '';
|
|
||||||
public modalErrorMessage: string = '';
|
|
||||||
public filterForm: FormGroup;
|
public filterForm: FormGroup;
|
||||||
private subscriptions: any[] = [];
|
private subscriptions: any[] = [];
|
||||||
public allPages: Option[] = [];
|
public allPages: Option[] = [];
|
||||||
|
@ -93,9 +90,6 @@ export class DivIdsComponent implements OnInit {
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.showLoading = true;
|
this.showLoading = true;
|
||||||
this.updateErrorMessage = "";
|
|
||||||
this.errorMessage = "";
|
|
||||||
|
|
||||||
this.subscriptions.push(this._helpContentService.getAllDivIdsFull( this.properties.adminToolsAPIURL).subscribe(
|
this.subscriptions.push(this._helpContentService.getAllDivIdsFull( this.properties.adminToolsAPIURL).subscribe(
|
||||||
divIds => {
|
divIds => {
|
||||||
this.divIds = divIds;
|
this.divIds = divIds;
|
||||||
|
@ -174,7 +168,6 @@ export class DivIdsComponent implements OnInit {
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.showLoading = true;
|
this.showLoading = true;
|
||||||
this.updateErrorMessage = "";
|
|
||||||
this.subscriptions.push(this._helpContentService.deleteDivIds(this.selectedDivIds, this.properties.adminToolsAPIURL).subscribe(
|
this.subscriptions.push(this._helpContentService.deleteDivIds(this.selectedDivIds, this.properties.adminToolsAPIURL).subscribe(
|
||||||
_ => {
|
_ => {
|
||||||
this.deleteDivIdsFromArray(this.selectedDivIds);
|
this.deleteDivIdsFromArray(this.selectedDivIds);
|
||||||
|
@ -219,7 +212,6 @@ export class DivIdsComponent implements OnInit {
|
||||||
pages: this.pagesCtrl,
|
pages: this.pagesCtrl,
|
||||||
portalType: this._fb.control('', Validators.required)
|
portalType: this._fb.control('', Validators.required)
|
||||||
});
|
});
|
||||||
this.modalErrorMessage = "";
|
|
||||||
this.divIdsModalOpen("Create class", "Create");
|
this.divIdsModalOpen("Create class", "Create");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -252,7 +244,6 @@ export class DivIdsComponent implements OnInit {
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
if (!this.classForm.value._id) {
|
if (!this.classForm.value._id) {
|
||||||
this.modalErrorMessage = "";
|
|
||||||
this.subscriptions.push(this._helpContentService.saveDivId(<DivId>this.classForm.value, this.properties.adminToolsAPIURL).subscribe(
|
this.subscriptions.push(this._helpContentService.saveDivId(<DivId>this.classForm.value, this.properties.adminToolsAPIURL).subscribe(
|
||||||
divId => {
|
divId => {
|
||||||
this.divIdSavedSuccessfully(divId);
|
this.divIdSavedSuccessfully(divId);
|
||||||
|
@ -317,27 +308,28 @@ export class DivIdsComponent implements OnInit {
|
||||||
if (error == null) {
|
if (error == null) {
|
||||||
// this.formComponent.reset();
|
// this.formComponent.reset();
|
||||||
} else {
|
} else {
|
||||||
this.updateErrorMessage = message;
|
UIkit.notification(message, {
|
||||||
|
status: 'danger',
|
||||||
|
timeout: 6000,
|
||||||
|
pos: 'bottom-right'
|
||||||
|
});
|
||||||
console.log('Server responded: ' + error);
|
console.log('Server responded: ' + error);
|
||||||
}
|
}
|
||||||
UIkit.notification('An error has occurred. Please try again later', {
|
|
||||||
status: 'danger',
|
|
||||||
timeout: 6000,
|
|
||||||
pos: 'bottom-right'
|
|
||||||
});
|
|
||||||
this.showLoading = false;
|
this.showLoading = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
handleError(message: string, error) {
|
handleError(message: string, error) {
|
||||||
this.errorMessage = message;
|
UIkit.notification(message, {
|
||||||
|
status: 'danger',
|
||||||
|
timeout: 6000,
|
||||||
|
pos: 'bottom-right'
|
||||||
|
});
|
||||||
console.log('Server responded: ' + error);
|
console.log('Server responded: ' + error);
|
||||||
|
|
||||||
this.showLoading = false;
|
this.showLoading = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
getPages() {
|
getPages() {
|
||||||
this.showLoading = true;
|
this.showLoading = true;
|
||||||
this.errorMessage = "";
|
|
||||||
this.subscriptions.push(this._helpContentService.getAllPages(this.properties.adminToolsAPIURL).subscribe(
|
this.subscriptions.push(this._helpContentService.getAllPages(this.properties.adminToolsAPIURL).subscribe(
|
||||||
pages => {
|
pages => {
|
||||||
this.allPages = [];
|
this.allPages = [];
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<div page-content class="admin-pages">
|
<div page-content class="admin-pages">
|
||||||
<div header>
|
<div header>
|
||||||
<admin-tabs tab="entity" [portal]="portal"></admin-tabs>
|
<admin-tabs tab="entity" [portal]="portal"></admin-tabs>
|
||||||
<div *ngIf="!errorMessage && !showLoading" class="uk-grid" uk-grid>
|
<div *ngIf="!showLoading" class="uk-grid" uk-grid>
|
||||||
<div class="uk-width-1-1">
|
<div class="uk-width-1-1">
|
||||||
<ul *ngIf="!isPortalAdministrator" class="uk-subnav uk-subnav-pill">
|
<ul *ngIf="!isPortalAdministrator" class="uk-subnav uk-subnav-pill">
|
||||||
<li [class.uk-active]="filterForm.get('status').value === 'all'"><a
|
<li [class.uk-active]="filterForm.get('status').value === 'all'"><a
|
||||||
|
@ -14,30 +14,12 @@
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</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-margin-remove-top"
|
<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>
|
uk-grid>
|
||||||
<div #searchInputComponent search-input [control]="filterForm.controls.keyword" [showSearch]="false" placeholder="Search entity"
|
<div #searchInputComponent search-input [control]="filterForm.controls.keyword" [showSearch]="false"
|
||||||
|
placeholder="Search entity"
|
||||||
[selected]="selectedKeyword" (closeEmitter)="onSearchClose()" (resetEmitter)="reset()"
|
[selected]="selectedKeyword" (closeEmitter)="onSearchClose()" (resetEmitter)="reset()"
|
||||||
[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>
|
[bordered]="true" colorClass="uk-text-secondary"
|
||||||
<!--<div class="show-options">
|
class="uk-width-1-3@xl uk-width-2-5@l uk-width-1-2@m uk-width-1-1"></div>
|
||||||
<button class="uk-button uk-button-secondary">Bulk Actions</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 [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>
|
|
||||||
</div>
|
|
||||||
</div>-->
|
|
||||||
|
|
||||||
<div *ngIf="isPortalAdministrator">
|
<div *ngIf="isPortalAdministrator">
|
||||||
<a (click)="newEntity()"
|
<a (click)="newEntity()"
|
||||||
class="uk-flex uk-flex-middle uk-text-uppercase">
|
class="uk-flex uk-flex-middle uk-text-uppercase">
|
||||||
|
@ -48,29 +30,15 @@
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!--<div *ngIf="checkboxes.length > 0" class=" uk-margin-remove-top uk-margin-small-left"
|
|
||||||
[attr.uk-tooltip]="getSelectedEntities().length == 0 ? 'pos:left; cls: uk-active' : 'cls: uk-invisible'"
|
|
||||||
title="Select at least one entity">
|
|
||||||
<input id="checkAll" type="checkbox" (click)="selectAll()"
|
|
||||||
[ngModel]="getSelectedEntities().length ==checkboxes.length"/>
|
|
||||||
<a *ngIf="!isPortalAdministrator" class="uk-margin-left" [class.uk-disabled]="getSelectedEntities().length
|
|
||||||
== 0"
|
|
||||||
(click)="toggleEntities(true, getSelectedEntities())"><i></i> Activate </a>
|
|
||||||
<a *ngIf="!isPortalAdministrator" class="uk-margin-left" [class.uk-disabled]="getSelectedEntities().length == 0"
|
|
||||||
(click)="toggleEntities(false, getSelectedEntities())"><i></i> Deactivate </a>
|
|
||||||
<a *ngIf="isPortalAdministrator" class="uk-margin-left" [class.uk-disabled]="getSelectedEntities().length == 0"
|
|
||||||
(click)="confirmDeleteSelectedEntities()"><i></i> Delete </a>
|
|
||||||
|
|
||||||
</div>-->
|
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="!showLoading && checkboxes.length > 0"
|
<div *ngIf="!showLoading && checkboxes.length > 0"
|
||||||
class="uk-margin-remove-top uk-margin-small-left uk-margin-small-bottom uk-display-inline"
|
class="uk-margin-remove-top uk-margin-small-left uk-margin-small-bottom uk-display-inline"
|
||||||
[attr.uk-tooltip]="getSelectedEntities().length == 0 ? 'pos:left; cls: uk-active' : null"
|
[attr.uk-tooltip]="getSelectedEntities().length == 0 ? 'pos:left; cls: uk-active' : null"
|
||||||
title="Select at least one entity"><input id="checkAll" type="checkbox" (click)="selectAll()"
|
title="Select at least one entity"><input id="checkAll" type="checkbox" (click)="selectAll()"
|
||||||
[ngModel]="getSelectedEntities().length ==checkboxes.length"/>
|
[ngModel]="getSelectedEntities().length ==checkboxes.length"/>
|
||||||
<span *ngIf="getSelectedEntities().length > 0" class="uk-margin-left uk-text-muted">
|
<span *ngIf="getSelectedEntities().length > 0" class="uk-margin-left uk-text-muted">
|
||||||
{{getSelectedEntities().length}} entities selected </span>
|
{{getSelectedEntities().length}} entities selected </span>
|
||||||
<a class="uk-margin-left ">Actions </a>
|
<a class="uk-margin-left ">Actions </a>
|
||||||
<div uk-dropdown="mode: click">
|
<div uk-dropdown="mode: click">
|
||||||
<ul class="uk-nav uk-dropdown-nav"
|
<ul class="uk-nav uk-dropdown-nav"
|
||||||
[attr.uk-tooltip]="getSelectedEntities().length == 0 ? 'pos:left; cls: uk-active' : 'cls: uk-invisible'"
|
[attr.uk-tooltip]="getSelectedEntities().length == 0 ? 'pos:left; cls: uk-active' : 'cls: uk-invisible'"
|
||||||
|
@ -90,85 +58,56 @@
|
||||||
</div>
|
</div>
|
||||||
<div inner>
|
<div inner>
|
||||||
<div *ngIf="showLoading" class="uk-position-center">
|
<div *ngIf="showLoading" class="uk-position-center">
|
||||||
<loading *ngIf="showLoading"></loading>
|
<loading></loading>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="!showLoading">
|
<div *ngIf="!showLoading">
|
||||||
<!--<div *ngIf="!isPortalAdministrator" class="uk-alert uk-alert-primary uk-margin-top-large">
|
<table *ngIf="checkboxes.length > 0 " class="uk-table uk-table-striped uk-table-hover uk-table-large">
|
||||||
<div>
|
<thead class="uk-card-header">
|
||||||
<span class="uk-margin-small-right uk-icon" uk-icon="warning"></span>
|
<tr>
|
||||||
Disable an entity to hide it from community dashboard portal.
|
<th class="uk-width-small"></th>
|
||||||
</div>
|
<th>Name</th>
|
||||||
<div
|
<th *ngIf="!isPortalAdministrator">Status</th>
|
||||||
class="uk-text-small">If an entity is disabled, all related search and advanced search pages will be
|
<th *ngIf="!isPortalAdministrator">Enable/Disable</th>
|
||||||
hidden from the community dashborad and a message "Can't find that page" will appear in case the url of that
|
<th *ngIf="isPortalAdministrator">Actions</th>
|
||||||
page is loaded. If the related page belongs to the menu the link will be removed from menu, too.
|
</tr>
|
||||||
</div>
|
</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>
|
||||||
|
<td *ngIf="!isPortalAdministrator">
|
||||||
|
<div class="name" href="#">{{check.entity.isEnabled ? "Enabled" : "Disabled"}}</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>
|
||||||
|
|
||||||
</div>-->
|
<td *ngIf="isPortalAdministrator">
|
||||||
<div *ngIf="updateErrorMessage" class="uk-alert-danger" uk-alert>
|
<div class="actions" href="#">
|
||||||
<a class="uk-alert-close" uk-close></a>
|
<i class="clickable " uk-icon="pencil" (click)="editEntity(i)"></i>
|
||||||
{{updateErrorMessage}}
|
<i class="clickable uk-text-danger" uk-icon="trash"
|
||||||
</div>
|
(click)="confirmDeleteEntity(check.entity._id)"></i>
|
||||||
<div *ngIf="errorMessage" class="uk-alert uk-alert-danger uk-margin-large-top"
|
|
||||||
role="alert">{{errorMessage}}</div>
|
|
||||||
<div class="md-card uk-margin-medium-bottom" *ngIf="!errorMessage">
|
|
||||||
<div class="md-card-content">
|
|
||||||
<div class="uk-overflow-container">
|
|
||||||
<table class="uk-table uk-table-striped uk-table-hover uk-table-large">
|
|
||||||
<thead class="uk-card-header">
|
|
||||||
<tr>
|
|
||||||
<th class="uk-width-small">
|
|
||||||
<!--<input id="allEntityCheckbox" type="checkbox"
|
|
||||||
(change)="toggleCheckBoxes($event)">-->
|
|
||||||
</th>
|
|
||||||
<th>Name</th>
|
|
||||||
<th *ngIf="!isPortalAdministrator">Status</th>
|
|
||||||
<th *ngIf="!isPortalAdministrator">Enable/Disable</th>
|
|
||||||
<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>
|
|
||||||
<td *ngIf="!isPortalAdministrator">
|
|
||||||
<div class="name" href="#">{{check.entity.isEnabled ? "Enabled" : "Disabled"}}</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">
|
|
||||||
<div class="actions" href="#">
|
|
||||||
<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>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
<div *ngIf="checkboxes.length ==0 ">
|
|
||||||
<div class="uk-alert-warning" uk-alert>No entities found</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</td>
|
||||||
</div>
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<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 entities found</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<modal-alert #editModal (alertOutput)="entitySaveConfirmed($event)"
|
<modal-alert #editModal (alertOutput)="entitySaveConfirmed($event)"
|
||||||
[okDisabled]="entityForm && (entityForm.invalid || !entityForm.dirty)">
|
[okDisabled]="entityForm && (entityForm.invalid || !entityForm.dirty)">
|
||||||
<div *ngIf="modalErrorMessage" class="uk-alert-danger" uk-alert aria-hidden="true">{{ modalErrorMessage }}</div>
|
|
||||||
<form *ngIf="entityForm" [formGroup]="entityForm" class="uk-grid uk-child-width-1-1" uk-grid>
|
<form *ngIf="entityForm" [formGroup]="entityForm" class="uk-grid uk-child-width-1-1" uk-grid>
|
||||||
<div dashboard-input [formInput]="entityForm.get('name')"
|
<div dashboard-input [formInput]="entityForm.get('name')"
|
||||||
type="text" placeholder="Write a name"
|
type="text" placeholder="Write a name"
|
||||||
|
@ -180,7 +119,6 @@
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</modal-alert>
|
</modal-alert>
|
||||||
|
|
||||||
<modal-alert #relatedPages (alertOutput)="continueToggling($event)"></modal-alert>
|
<modal-alert #relatedPages (alertOutput)="continueToggling($event)"></modal-alert>
|
||||||
|
|
||||||
<modal-alert #deleteModal (alertOutput)="confirmedDeleteEntities($event)"></modal-alert>
|
<modal-alert #deleteModal (alertOutput)="confirmedDeleteEntities($event)"></modal-alert>
|
||||||
|
|
|
@ -44,9 +44,6 @@ export class EntitiesComponent implements OnInit {
|
||||||
public properties: EnvProperties = properties;
|
public properties: EnvProperties = properties;
|
||||||
|
|
||||||
public showLoading = true;
|
public showLoading = true;
|
||||||
public errorMessage = '';
|
|
||||||
public updateErrorMessage = '';
|
|
||||||
public modalErrorMessage = '';
|
|
||||||
public isPortalAdministrator = null;
|
public isPortalAdministrator = null;
|
||||||
public filterForm: FormGroup;
|
public filterForm: FormGroup;
|
||||||
private subscriptions: any[] = [];
|
private subscriptions: any[] = [];
|
||||||
|
@ -98,8 +95,6 @@ export class EntitiesComponent implements OnInit {
|
||||||
{queryParams: {'errorCode': LoginErrorCodes.NOT_VALID, 'redirectUrl': this._router.url}});
|
{queryParams: {'errorCode': LoginErrorCodes.NOT_VALID, 'redirectUrl': this._router.url}});
|
||||||
} else {
|
} else {
|
||||||
this.showLoading = true;
|
this.showLoading = true;
|
||||||
this.updateErrorMessage = '';
|
|
||||||
this.errorMessage = '';
|
|
||||||
if (portal) {
|
if (portal) {
|
||||||
this._helpContentService.getCommunityEntities(portal, this.properties.adminToolsAPIURL).subscribe(
|
this._helpContentService.getCommunityEntities(portal, this.properties.adminToolsAPIURL).subscribe(
|
||||||
entities => {
|
entities => {
|
||||||
|
@ -185,8 +180,6 @@ export class EntitiesComponent implements OnInit {
|
||||||
{queryParams: {'errorCode': LoginErrorCodes.NOT_VALID, 'redirectUrl': this._router.url}});
|
{queryParams: {'errorCode': LoginErrorCodes.NOT_VALID, 'redirectUrl': this._router.url}});
|
||||||
} else {
|
} else {
|
||||||
this.showLoading = true;
|
this.showLoading = true;
|
||||||
this.updateErrorMessage = '';
|
|
||||||
|
|
||||||
this._helpContentService.deleteEntities(this.selectedEntities, this.properties.adminToolsAPIURL).subscribe(
|
this._helpContentService.deleteEntities(this.selectedEntities, this.properties.adminToolsAPIURL).subscribe(
|
||||||
_ => {
|
_ => {
|
||||||
this.deleteEntitiesFromArray(this.selectedEntities);
|
this.deleteEntitiesFromArray(this.selectedEntities);
|
||||||
|
@ -210,7 +203,6 @@ export class EntitiesComponent implements OnInit {
|
||||||
_id: this._fb.control(entity._id),
|
_id: this._fb.control(entity._id),
|
||||||
pid: this._fb.control(entity.pid, Validators.required)
|
pid: this._fb.control(entity.pid, Validators.required)
|
||||||
});
|
});
|
||||||
this.modalErrorMessage = '';
|
|
||||||
this.entitiesModalOpen('Edit Entity', 'Save Changes');
|
this.entitiesModalOpen('Edit Entity', 'Save Changes');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -220,7 +212,6 @@ export class EntitiesComponent implements OnInit {
|
||||||
name: this._fb.control('', Validators.required),
|
name: this._fb.control('', Validators.required),
|
||||||
pid: this._fb.control('', Validators.required)
|
pid: this._fb.control('', Validators.required)
|
||||||
});
|
});
|
||||||
this.modalErrorMessage = '';
|
|
||||||
this.entitiesModalOpen('Create Entity', 'Create');
|
this.entitiesModalOpen('Create Entity', 'Create');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -244,7 +235,6 @@ export class EntitiesComponent implements OnInit {
|
||||||
this._router.navigate(['/user-info'],
|
this._router.navigate(['/user-info'],
|
||||||
{queryParams: {'errorCode': LoginErrorCodes.NOT_VALID, 'redirectUrl': this._router.url}});
|
{queryParams: {'errorCode': LoginErrorCodes.NOT_VALID, 'redirectUrl': this._router.url}});
|
||||||
} else {
|
} else {
|
||||||
this.modalErrorMessage = '';
|
|
||||||
if (this.entityForm.value._id) {
|
if (this.entityForm.value._id) {
|
||||||
this._helpContentService.updateEntity(
|
this._helpContentService.updateEntity(
|
||||||
<Entity>this.entityForm.value, this.properties.adminToolsAPIURL).subscribe(
|
<Entity>this.entityForm.value, this.properties.adminToolsAPIURL).subscribe(
|
||||||
|
@ -308,9 +298,12 @@ export class EntitiesComponent implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
handleError(message: string, error) {
|
handleError(message: string, error) {
|
||||||
this.errorMessage = message;
|
UIkit.notification(message, {
|
||||||
|
status: 'danger',
|
||||||
|
timeout: 6000,
|
||||||
|
pos: 'bottom-right'
|
||||||
|
});
|
||||||
console.log('Server responded: ' + error);
|
console.log('Server responded: ' + error);
|
||||||
|
|
||||||
this.showLoading = false;
|
this.showLoading = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -323,14 +316,13 @@ export class EntitiesComponent implements OnInit {
|
||||||
_id: ''
|
_id: ''
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.updateErrorMessage = message;
|
UIkit.notification(message, {
|
||||||
|
status: 'danger',
|
||||||
|
timeout: 6000,
|
||||||
|
pos: 'bottom-right'
|
||||||
|
});
|
||||||
console.log('Server responded: ' + error);
|
console.log('Server responded: ' + error);
|
||||||
}
|
}
|
||||||
UIkit.notification('An error has occurred. Please try again later', {
|
|
||||||
status: 'danger',
|
|
||||||
timeout: 6000,
|
|
||||||
pos: 'bottom-right'
|
|
||||||
});
|
|
||||||
this.showLoading = false;
|
this.showLoading = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -364,7 +356,6 @@ export class EntitiesComponent implements OnInit {
|
||||||
this._router.navigate(['/user-info'],
|
this._router.navigate(['/user-info'],
|
||||||
{queryParams: {'errorCode': LoginErrorCodes.NOT_VALID, 'redirectUrl': this._router.url}});
|
{queryParams: {'errorCode': LoginErrorCodes.NOT_VALID, 'redirectUrl': this._router.url}});
|
||||||
} else {
|
} else {
|
||||||
this.updateErrorMessage = '';
|
|
||||||
this._helpContentService.toggleEntities(
|
this._helpContentService.toggleEntities(
|
||||||
this.portal, this.toggleIds, this.toggleStatus, this.properties.adminToolsAPIURL).subscribe(
|
this.portal, this.toggleIds, this.toggleStatus, this.properties.adminToolsAPIURL).subscribe(
|
||||||
() => {
|
() => {
|
||||||
|
|
|
@ -27,18 +27,14 @@
|
||||||
class="uk-button uk-button-secondary outlined uk-margin-small-right">Reset
|
class="uk-button uk-button-secondary outlined uk-margin-small-right">Reset
|
||||||
</button>
|
</button>
|
||||||
<button (click)="saveCustom()" class="uk-button uk-button-secondary uk-margin-small-right"
|
<button (click)="saveCustom()" class="uk-button uk-button-secondary uk-margin-small-right"
|
||||||
[disabled]="showLoading || !myForm.dirty || !myForm.valid ">Save
|
[disabled]="showLoading || !myForm.dirty || myForm.invalid ">Save
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="uk-card uk-card-default uk-position-relative " style="min-height: 60vh">
|
<div class="uk-card uk-card-default uk-position-relative " style="min-height: 60vh">
|
||||||
<div style="max-height: 60vh" class="uk-padding-large uk-overflow-auto">
|
<div style="max-height: 60vh" class="uk-padding-large uk-overflow-auto">
|
||||||
|
|
||||||
<div *ngIf="errorMessage" class="uk-alert uk-alert-danger" role="alert">{{errorMessage}}</div>
|
|
||||||
<div class="uk-animation-fade uk-width-1-1" role="alert">
|
<div class="uk-animation-fade uk-width-1-1" role="alert">
|
||||||
<div *ngIf="updateErrorMessage" class="uk-alert uk-alert-danger" role="alert">{{updateErrorMessage}}</div>
|
|
||||||
|
|
||||||
<div *ngIf="showLoading" class="uk-position-center">
|
<div *ngIf="showLoading" class="uk-position-center">
|
||||||
<loading *ngIf="showLoading"></loading>
|
<loading *ngIf="showLoading"></loading>
|
||||||
</div>
|
</div>
|
||||||
|
@ -57,17 +53,15 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group uk-margin-top">
|
<div class="form-group uk-margin-top">
|
||||||
<span class="uk-text-bold uk-margin-small-right">Select Status (Enable/ disable)</span>
|
<div class="uk-text-bold uk-margin-medium-bottom">Select Status (Enable/ disable)</div>
|
||||||
|
|
||||||
<mat-slide-toggle [checked]="myForm.get('isActive').value"
|
<mat-slide-toggle [checked]="myForm.get('isActive').value"
|
||||||
(change)="changeStatus()"
|
(change)="changeStatus()"
|
||||||
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>"
|
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>
|
></mat-slide-toggle>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group uk-margin-large-top"
|
<div class="form-group uk-margin-medium-top"
|
||||||
[ngClass]="{'has-error':!myForm.controls.content.valid &&
|
[ngClass]="{'has-error':!myForm.controls.content.valid &&
|
||||||
myForm.controls.content.dirty}"
|
myForm.controls.content.dirty}">
|
||||||
>
|
|
||||||
<label class="uk-text-bold">Content</label>
|
<label class="uk-text-bold">Content</label>
|
||||||
<div class="uk-margin-top">
|
<div class="uk-margin-top">
|
||||||
<ckeditor (change)="contentChanged()"
|
<ckeditor (change)="contentChanged()"
|
||||||
|
|
|
@ -13,6 +13,8 @@ import {HelperFunctions} from '../../utils/HelperFunctions.class';
|
||||||
import {PageHelpContent} from '../../utils/entities/adminTool/page-help-content';
|
import {PageHelpContent} from '../../utils/entities/adminTool/page-help-content';
|
||||||
import {ConnectHelper} from "../../connect/connectHelper";
|
import {ConnectHelper} from "../../connect/connectHelper";
|
||||||
|
|
||||||
|
declare var UIkit;
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'page-content-form',
|
selector: 'page-content-form',
|
||||||
templateUrl: './page-help-content-form.component.html',
|
templateUrl: './page-help-content-form.component.html',
|
||||||
|
@ -28,14 +30,9 @@ export class PageContentFormComponent implements OnInit {
|
||||||
orderOptions = [];
|
orderOptions = [];
|
||||||
|
|
||||||
private availablePages: Page[] = [];
|
private availablePages: Page[] = [];
|
||||||
//private errorMessage: string;
|
|
||||||
|
|
||||||
private ckeditorContent: string;
|
private ckeditorContent: string;
|
||||||
public properties: EnvProperties = null;
|
public properties: EnvProperties = null;
|
||||||
|
|
||||||
public showLoading: boolean = true;
|
public showLoading: boolean = true;
|
||||||
public errorMessage: string = '';
|
|
||||||
@Input() updateErrorMessage: string = '';
|
|
||||||
private subs: Subscription[] = [];
|
private subs: Subscription[] = [];
|
||||||
public pageHelpContent: PageHelpContent;
|
public pageHelpContent: PageHelpContent;
|
||||||
|
|
||||||
|
@ -157,8 +154,6 @@ export class PageContentFormComponent implements OnInit {
|
||||||
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
||||||
} else {
|
} else {
|
||||||
this.showLoading = true;
|
this.showLoading = true;
|
||||||
this.errorMessage = "";
|
|
||||||
this.updateErrorMessage = "";
|
|
||||||
|
|
||||||
this.subs.push(this._helpContentService.getPageHelpContent(pageContentId as string, this.properties.adminToolsAPIURL, this.communityPid).subscribe(
|
this.subs.push(this._helpContentService.getPageHelpContent(pageContentId as string, this.properties.adminToolsAPIURL, this.communityPid).subscribe(
|
||||||
pageHelpContent => {
|
pageHelpContent => {
|
||||||
|
@ -244,7 +239,11 @@ export class PageContentFormComponent implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
handleError(message: string, error) {
|
handleError(message: string, error) {
|
||||||
this.errorMessage = message;
|
UIkit.notification(message, {
|
||||||
|
status: 'danger',
|
||||||
|
timeout: 6000,
|
||||||
|
pos: 'bottom-right'
|
||||||
|
});
|
||||||
console.error('Server responded: ' + error);
|
console.error('Server responded: ' + error);
|
||||||
|
|
||||||
this.showLoading = false;
|
this.showLoading = false;
|
||||||
|
@ -259,16 +258,18 @@ export class PageContentFormComponent implements OnInit {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
//this.errorMessage = null;
|
|
||||||
|
|
||||||
if (this.myForm.valid) {
|
if (this.myForm.valid) {
|
||||||
this.showLoading = true;
|
this.showLoading = true;
|
||||||
this.updateErrorMessage = "";
|
|
||||||
this.myForm.get('order').enable();
|
this.myForm.get('order').enable();
|
||||||
this.myForm.get('placement').enable();
|
this.myForm.get('placement').enable();
|
||||||
let pageHelpContent: PageHelpContent = this.myForm.value;
|
let pageHelpContent: PageHelpContent = this.myForm.value;
|
||||||
this.subs.push(this._helpContentService.savePageHelpContent(pageHelpContent, this.properties.adminToolsAPIURL, this.portal).subscribe(
|
this.subs.push(this._helpContentService.savePageHelpContent(pageHelpContent, this.properties.adminToolsAPIURL, this.portal).subscribe(
|
||||||
_ => {
|
_ => {
|
||||||
|
UIkit.notification('Page content has been <b>successfully ' + (this.pageContentId?'updated':'created') + '</b>', {
|
||||||
|
status: 'success',
|
||||||
|
timeout: 6000,
|
||||||
|
pos: 'bottom-right'
|
||||||
|
});
|
||||||
this._router.navigate(['../'], {queryParams: {"pageId": this.pageId}, relativeTo: this.route});
|
this._router.navigate(['../'], {queryParams: {"pageId": this.pageId}, relativeTo: this.route});
|
||||||
this.showLoading = false;
|
this.showLoading = false;
|
||||||
},
|
},
|
||||||
|
@ -276,7 +277,6 @@ export class PageContentFormComponent implements OnInit {
|
||||||
));
|
));
|
||||||
} else {
|
} else {
|
||||||
this.showLoading = false;
|
this.showLoading = false;
|
||||||
this.errorMessage = "Please fill all required fields";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -292,8 +292,11 @@ export class PageContentFormComponent implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
handleUpdateError(message: string, error) {
|
handleUpdateError(message: string, error) {
|
||||||
|
UIkit.notification(message, {
|
||||||
this.updateErrorMessage = message;
|
status: 'danger',
|
||||||
|
timeout: 6000,
|
||||||
|
pos: 'bottom-right'
|
||||||
|
});
|
||||||
console.error('Server responded: ' + error);
|
console.error('Server responded: ' + error);
|
||||||
|
|
||||||
this.showLoading = false;
|
this.showLoading = false;
|
||||||
|
|
|
@ -1,15 +1,11 @@
|
||||||
<div page-content>
|
<div page-content>
|
||||||
<div header>
|
<div header>
|
||||||
<div *ngIf="updateErrorMessage" class="uk-alert-danger" uk-alert>
|
|
||||||
<a class="uk-alert-close" uk-close></a>
|
|
||||||
{{updateErrorMessage}}
|
|
||||||
</div>
|
|
||||||
<div class="uk-text-bold">
|
<div class="uk-text-bold">
|
||||||
<span *ngIf="selectedPageId && page">{{page.name}}</span>
|
<span *ngIf="selectedPageId && page">{{page.name}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="uk-margin-top">
|
<div class="uk-margin-top">
|
||||||
<a routerLink="../pages/" class="uk-text-secondary uk-text-uppercase uk-text-bold uk-text-small">
|
<a routerLink="../pages/" class="uk-text-secondary uk-text-uppercase uk-text-bold uk-text-small">
|
||||||
<span class="uk-icon-button small uk-icon uk-button-secondary">
|
<span class="uk-icon-button small uk-icon uk-button-secondary">
|
||||||
<icon name="arrow_left"></icon>
|
<icon name="arrow_left"></icon>
|
||||||
</span>
|
</span>
|
||||||
<span class="space">
|
<span class="space">
|
||||||
|
@ -20,7 +16,8 @@
|
||||||
<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 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"
|
<div #searchInputComponent search-input [control]="filterForm" [showSearch]="false" placeholder="Search helptext"
|
||||||
[selected]="selectedKeyword" (closeEmitter)="onSearchClose()" (resetEmitter)="reset()"
|
[selected]="selectedKeyword" (closeEmitter)="onSearchClose()" (resetEmitter)="reset()"
|
||||||
[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>
|
[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>
|
||||||
<div>
|
<div>
|
||||||
<a (click)="newPageContent()"
|
<a (click)="newPageContent()"
|
||||||
class="uk-flex uk-flex-middle uk-text-uppercase">
|
class="uk-flex uk-flex-middle uk-text-uppercase">
|
||||||
|
@ -38,111 +35,95 @@
|
||||||
[ngModel]="getSelectedPageHelpContents().length ==checkboxes.length"/>
|
[ngModel]="getSelectedPageHelpContents().length ==checkboxes.length"/>
|
||||||
<span *ngIf="getSelectedPageHelpContents().length > 0" class="uk-margin-left uk-text-muted">
|
<span *ngIf="getSelectedPageHelpContents().length > 0" class="uk-margin-left uk-text-muted">
|
||||||
{{getSelectedPageHelpContents().length}} pages selected </span>
|
{{getSelectedPageHelpContents().length}} pages selected </span>
|
||||||
<a class="uk-margin-left ">Actions </a>
|
<a class="uk-margin-left ">Actions </a>
|
||||||
<div uk-dropdown="mode: click">
|
<div uk-dropdown="mode: click">
|
||||||
<ul class="uk-nav uk-dropdown-nav"
|
<ul class="uk-nav uk-dropdown-nav"
|
||||||
[attr.uk-tooltip]="getSelectedPageHelpContents().length == 0 ? 'pos:left; cls: uk-active' : 'cls: uk-invisible'"
|
[attr.uk-tooltip]="getSelectedPageHelpContents().length == 0 ? 'pos:left; cls: uk-active' : 'cls: uk-invisible'"
|
||||||
title="Select at least one help text">
|
title="Select at least one help text">
|
||||||
<li><a [class]="getSelectedPageHelpContents().length == 0 ? 'uk-disabled' : ''"
|
<li><a [class]="getSelectedPageHelpContents().length == 0 ? 'uk-disabled' : ''"
|
||||||
(click)="togglePageHelpContents(true,getSelectedPageHelpContents())"><i></i> Enable
|
(click)="togglePageHelpContents(true,getSelectedPageHelpContents())"><i></i> Enable
|
||||||
</a></li>
|
</a></li>
|
||||||
<li><a [class]="getSelectedPageHelpContents().length == 0 ? 'uk-disabled' : ''"
|
<li><a [class]="getSelectedPageHelpContents().length == 0 ? 'uk-disabled' : ''"
|
||||||
(click)="togglePageHelpContents(false,getSelectedPageHelpContents())"><i></i> Disable
|
(click)="togglePageHelpContents(false,getSelectedPageHelpContents())"><i></i> Disable
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li><a [class]="getSelectedPageHelpContents().length == 0 ? 'uk-disabled' : ''"
|
<li><a [class]="getSelectedPageHelpContents().length == 0 ? 'uk-disabled' : ''"
|
||||||
(click)="confirmDeleteSelectedPageHelpContents()"><i></i> Delete </a></li>
|
(click)="confirmDeleteSelectedPageHelpContents()"><i></i> Delete </a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div inner>
|
<div inner>
|
||||||
|
|
||||||
<div class="content-wrapper" id="contentWrapper">
|
<div class="content-wrapper" id="contentWrapper">
|
||||||
<div>
|
<div>
|
||||||
<div class="contentPanel">
|
<div class="contentPanel">
|
||||||
<div *ngIf="errorMessage" class="uk-alert uk-alert-danger uk-margin-large-top"
|
<div *ngIf="!showLoading">
|
||||||
role="alert">{{errorMessage}}</div>
|
<ul *ngIf="checkboxes.length > 0" class="uk-list pages">
|
||||||
<div *ngIf="showLoading" class="uk-position-center">
|
<li *ngFor="let check of checkboxes; let i=index" class="uk-card uk-card-default uk-margin-bottom">
|
||||||
<loading *ngIf="showLoading"></loading>
|
<div class="uk-grid uk-grid-divider uk-padding" uk-grid>
|
||||||
</div>
|
<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"
|
||||||
<div *ngIf="!errorMessage && !showLoading">
|
name="entitiescb[]" value="{{check.pageHelpContent._id}}" [(ngModel)]="check.checked">
|
||||||
<div class="md-card uk-margin-medium-bottom" *ngIf="!errorMessage && !showLoading">
|
</div>
|
||||||
<div class="md-card-content">
|
<div class="uk-width-expand uk-margin-medium-bottom">
|
||||||
<div class="uk-overflow-container">
|
<div *ngIf="!selectedPageId">
|
||||||
<div class="uk-overflow-container">
|
<div class="page" href="#">{{check.pageHelpContent.page.name}}</div>
|
||||||
<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>
|
|
||||||
</div>
|
|
||||||
<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>
|
||||||
<div class="uk-width-1-5 uk-first-column">
|
<div class="content multi-line-ellipsis lines-2">
|
||||||
|
<p>{{check.pageHelpContent.content|htmlToString}}</p></div>
|
||||||
<div class=" uk-flex-center uk-flex">
|
</div>
|
||||||
<div class="actions" href="#">
|
<div class="uk-grid uk-width-1-1 uk-margin-left">
|
||||||
<div class="" (click)="editPageHelpContent(check.pageHelpContent._id)" class="uk-button action uk-margin-top uk-flex uk-flex-middle ">
|
<div class=" ">
|
||||||
<i class="clickable" uk-icon="pencil"
|
<span class="title">Placement: </span>{{check.pageHelpContent.placement}}
|
||||||
></i>
|
</div>
|
||||||
<span class="uk-margin-small-left">
|
<div class=" ">
|
||||||
Edit
|
<span class="title">Order: </span>{{check.pageHelpContent.order}}
|
||||||
</span>
|
</div>
|
||||||
</div>
|
<div class=" ">
|
||||||
<div (click)="confirmDeletePageHelpContent(check.pageHelpContent._id)" class="uk-button action uk-margin-top uk-flex uk-flex-middle ">
|
<span class="title uk-margin-small-right">Enable/disable: </span>
|
||||||
<i class="clickable " uk-icon="trash"
|
<mat-slide-toggle [checked]="check.pageHelpContent.isActive"
|
||||||
></i>
|
(change)="($event.source.checked = check.pageHelpContent.isActive);togglePageHelpContents(!check.pageHelpContent.isActive,[check.pageHelpContent._id])"
|
||||||
<span class="uk-margin-small-left">
|
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>"
|
||||||
Delete
|
></mat-slide-toggle>
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</div>
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div *ngIf="checkboxes.length==0" class="col-md-12">
|
|
||||||
<div class="uk-alert-warning" uk-alert>No page contents found</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">
|
||||||
|
Delete
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</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 page contents found</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<modal-alert #AlertModalDeletePageHelpContents (alertOutput)="confirmedDeletePageHelpContents($event)"></modal-alert>
|
<modal-alert #AlertModalDeletePageHelpContents (alertOutput)="confirmedDeletePageHelpContents($event)"></modal-alert>
|
||||||
|
|
|
@ -19,45 +19,30 @@ import {DomSanitizer} from '@angular/platform-browser';
|
||||||
import {SearchInputComponent} from '../../sharedComponents/search-input/search-input.component';
|
import {SearchInputComponent} from '../../sharedComponents/search-input/search-input.component';
|
||||||
import {ConnectHelper} from '../../connect/connectHelper';
|
import {ConnectHelper} from '../../connect/connectHelper';
|
||||||
|
|
||||||
|
declare var UIkit;
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'page-help-contents',
|
selector: 'page-help-contents',
|
||||||
templateUrl: './page-help-contents.component.html',
|
templateUrl: './page-help-contents.component.html',
|
||||||
})
|
})
|
||||||
export class PageHelpContentsComponent implements OnInit {
|
export class PageHelpContentsComponent implements OnInit {
|
||||||
|
|
||||||
@ViewChild('AlertModalDeletePageHelpContents') alertModalDeletePageHelpContents;
|
@ViewChild('AlertModalDeletePageHelpContents') alertModalDeletePageHelpContents;
|
||||||
private selectedPageContents: string[] = [];
|
private selectedPageContents: string[] = [];
|
||||||
|
|
||||||
public checkboxes: CheckPageHelpContent[] = [];
|
public checkboxes: CheckPageHelpContent[] = [];
|
||||||
|
|
||||||
public pageHelpContents: PageHelpContent[] = [];
|
public pageHelpContents: PageHelpContent[] = [];
|
||||||
|
|
||||||
public formGroup: FormGroup;
|
public formGroup: FormGroup;
|
||||||
|
|
||||||
public pages: Page[];
|
public pages: Page[];
|
||||||
|
|
||||||
public checkboxAll: boolean = false;
|
public checkboxAll: boolean = false;
|
||||||
|
|
||||||
public filters: PageHelpContentFilterOptions = {id: '', active: null, text: new RegExp('')};
|
public filters: PageHelpContentFilterOptions = {id: '', active: null, text: new RegExp('')};
|
||||||
public keyword: string = "";
|
public keyword: string = "";
|
||||||
|
|
||||||
public counter = {all: 0, active: 0, inactive: 0};
|
public counter = {all: 0, active: 0, inactive: 0};
|
||||||
|
|
||||||
public communities: Portal[] = [];
|
public communities: Portal[] = [];
|
||||||
|
|
||||||
public portal: string;
|
public portal: string;
|
||||||
|
|
||||||
public selectedPageId: string;
|
public selectedPageId: string;
|
||||||
|
|
||||||
public community: Portal;
|
public community: Portal;
|
||||||
|
|
||||||
public page: Page;
|
public page: Page;
|
||||||
public properties: EnvProperties = null;
|
public properties: EnvProperties = properties;
|
||||||
|
|
||||||
public showLoading: boolean = true;
|
public showLoading: boolean = true;
|
||||||
public errorMessage: string = '';
|
|
||||||
public updateErrorMessage: string = '';
|
|
||||||
public filterForm: FormControl;
|
public filterForm: FormControl;
|
||||||
public selectForm: FormControl;
|
public selectForm: FormControl;
|
||||||
public selectOptions = [];
|
public selectOptions = [];
|
||||||
|
@ -74,8 +59,6 @@ export class PageHelpContentsComponent implements OnInit {
|
||||||
this.subscriptions.push(this.selectForm.valueChanges.subscribe(value => {
|
this.subscriptions.push(this.selectForm.valueChanges.subscribe(value => {
|
||||||
this.filterByPage(value);
|
this.filterByPage(value);
|
||||||
}));
|
}));
|
||||||
|
|
||||||
this.properties = properties;
|
|
||||||
this.subscriptions.push(this.route.params.subscribe(params => {
|
this.subscriptions.push(this.route.params.subscribe(params => {
|
||||||
this.portal = (this.route.snapshot.data.portal) ? this.route.snapshot.data.portal : this.route.snapshot.params[this.route.snapshot.data.param];
|
this.portal = (this.route.snapshot.data.portal) ? this.route.snapshot.data.portal : this.route.snapshot.params[this.route.snapshot.data.param];
|
||||||
ConnectHelper.setPortalTypeFromPid(this.portal);
|
ConnectHelper.setPortalTypeFromPid(this.portal);
|
||||||
|
@ -85,8 +68,8 @@ export class PageHelpContentsComponent implements OnInit {
|
||||||
if (this.portal && this.selectedPageId) {
|
if (this.portal && this.selectedPageId) {
|
||||||
this.getPage(this.selectedPageId);
|
this.getPage(this.selectedPageId);
|
||||||
}
|
}
|
||||||
if(!this.selectedPageId) {
|
if (!this.selectedPageId) {
|
||||||
this.router.navigate(['../pages'], {relativeTo: this.route });
|
this.router.navigate(['../pages'], {relativeTo: this.route});
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
}));
|
}));
|
||||||
|
@ -94,6 +77,7 @@ export class PageHelpContentsComponent implements OnInit {
|
||||||
|
|
||||||
constructor(private element: ElementRef, private route: ActivatedRoute, private router: Router, private _helpService: HelpContentService, private _fb: FormBuilder, private sanitizer: DomSanitizer) {
|
constructor(private element: ElementRef, private route: ActivatedRoute, private router: Router, private _helpService: HelpContentService, private _fb: FormBuilder, private sanitizer: DomSanitizer) {
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnDestroy(): void {
|
ngOnDestroy(): void {
|
||||||
this.subscriptions.forEach(value => {
|
this.subscriptions.forEach(value => {
|
||||||
if (value instanceof Subscriber) {
|
if (value instanceof Subscriber) {
|
||||||
|
@ -103,9 +87,7 @@ export class PageHelpContentsComponent implements OnInit {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
init(){
|
|
||||||
|
|
||||||
}
|
|
||||||
getPage(pageId: string) {
|
getPage(pageId: string) {
|
||||||
if (!Session.isLoggedIn()) {
|
if (!Session.isLoggedIn()) {
|
||||||
this.router.navigate(['/user-info'], {
|
this.router.navigate(['/user-info'], {
|
||||||
|
@ -116,12 +98,10 @@ export class PageHelpContentsComponent implements OnInit {
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.showLoading = true;
|
this.showLoading = true;
|
||||||
this.updateErrorMessage = "";
|
|
||||||
this.errorMessage = "";
|
|
||||||
this.subscriptions.push(this._helpService.getPageByPortal(pageId, this.properties.adminToolsAPIURL, this.portal).subscribe(
|
this.subscriptions.push(this._helpService.getPageByPortal(pageId, this.properties.adminToolsAPIURL, this.portal).subscribe(
|
||||||
page => {
|
page => {
|
||||||
if (this.properties.adminToolsPortalType != page.portalType) {
|
if (this.properties.adminToolsPortalType != page.portalType) {
|
||||||
this.router.navigate(['./pageContents'], {queryParams: {"communityId": this.portal}});
|
this.router.navigate(['./pageContents']);
|
||||||
} else {
|
} else {
|
||||||
this.page = page;
|
this.page = page;
|
||||||
this.getPageHelpContents(this.portal);
|
this.getPageHelpContents(this.portal);
|
||||||
|
@ -141,17 +121,14 @@ export class PageHelpContentsComponent implements OnInit {
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.showLoading = true;
|
this.showLoading = true;
|
||||||
this.updateErrorMessage = "";
|
|
||||||
this.errorMessage = "";
|
|
||||||
|
|
||||||
//this._helpService.getCommunityPages(community_pid, "", this.properties.adminToolsAPIURL).subscribe(
|
//this._helpService.getCommunityPages(community_pid, "", this.properties.adminToolsAPIURL).subscribe(
|
||||||
this.subscriptions.push(this._helpService.getCommunityPagesWithPositions(community_pid,this.properties.adminToolsAPIURL).subscribe(
|
this.subscriptions.push(this._helpService.getCommunityPagesWithPositions(community_pid, this.properties.adminToolsAPIURL).subscribe(
|
||||||
pages => {
|
pages => {
|
||||||
this.pages = pages;
|
this.pages = pages;
|
||||||
this.getPageHelpContents(this.portal);
|
this.getPageHelpContents(this.portal);
|
||||||
this.selectOptions = [{label:'All pages', value: ''}];
|
this.selectOptions = [{label: 'All pages', value: ''}];
|
||||||
for (let page of this.pages) {
|
for (let page of this.pages) {
|
||||||
this.selectOptions.push({label:page.name, value: page._id})
|
this.selectOptions.push({label: page.name, value: page._id})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
error => this.handleError('System error retrieving pages', error)));
|
error => this.handleError('System error retrieving pages', error)));
|
||||||
|
@ -187,10 +164,10 @@ export class PageHelpContentsComponent implements OnInit {
|
||||||
this.checkboxes = [];
|
this.checkboxes = [];
|
||||||
|
|
||||||
for (let i = this.pageHelpContents.length - 1; i >= 0; i -= 1) {
|
for (let i = this.pageHelpContents.length - 1; i >= 0; i -= 1) {
|
||||||
this.checkboxes.unshift(<CheckPageHelpContent>{
|
this.checkboxes.unshift(<CheckPageHelpContent>{
|
||||||
pageHelpContent: this.pageHelpContents[i],
|
pageHelpContent: this.pageHelpContents[i],
|
||||||
checked: false
|
checked: false
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
this.countPageHelpContents();
|
this.countPageHelpContents();
|
||||||
|
@ -201,10 +178,6 @@ export class PageHelpContentsComponent implements OnInit {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// public showModal():void {
|
|
||||||
// this.modal.showModal();
|
|
||||||
// }
|
|
||||||
|
|
||||||
public toggleCheckBoxes(event) {
|
public toggleCheckBoxes(event) {
|
||||||
this.checkboxes.forEach(_ => _.checked = event.target.checked);
|
this.checkboxes.forEach(_ => _.checked = event.target.checked);
|
||||||
this.checkboxAll = event.target.checked;
|
this.checkboxAll = event.target.checked;
|
||||||
|
@ -262,11 +235,14 @@ export class PageHelpContentsComponent implements OnInit {
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.showLoading = true;
|
this.showLoading = true;
|
||||||
this.updateErrorMessage = "";
|
|
||||||
|
|
||||||
this.subscriptions.push(this._helpService.deletePageHelpContents(this.selectedPageContents, this.properties.adminToolsAPIURL, this.portal).subscribe(
|
this.subscriptions.push(this._helpService.deletePageHelpContents(this.selectedPageContents, this.properties.adminToolsAPIURL, this.portal).subscribe(
|
||||||
_ => {
|
_ => {
|
||||||
this.deletePageHelpContentsFromArray(this.selectedPageContents);
|
this.deletePageHelpContentsFromArray(this.selectedPageContents);
|
||||||
|
UIkit.notification('Page content(s) has been <b>successfully deleted</b>', {
|
||||||
|
status: 'success',
|
||||||
|
timeout: 6000,
|
||||||
|
pos: 'bottom-right'
|
||||||
|
});
|
||||||
this.showLoading = false;
|
this.showLoading = false;
|
||||||
},
|
},
|
||||||
error => this.handleUpdateError('System error deleting the selected page content(s)', error)
|
error => this.handleUpdateError('System error deleting the selected page content(s)', error)
|
||||||
|
@ -290,15 +266,13 @@ export class PageHelpContentsComponent implements OnInit {
|
||||||
this.router.navigate(['edit/'], {
|
this.router.navigate(['edit/'], {
|
||||||
queryParams: {
|
queryParams: {
|
||||||
"pageContentId": id,
|
"pageContentId": id,
|
||||||
"communityId": this.portal,
|
|
||||||
"pageId": this.selectedPageId
|
"pageId": this.selectedPageId
|
||||||
}, relativeTo: this.route
|
}, relativeTo: this.route
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.router.navigate(['edit/'], {
|
this.router.navigate(['edit/'], {
|
||||||
queryParams: {
|
queryParams: {
|
||||||
"pageContentId": id,
|
"pageContentId": id``
|
||||||
"communityId": this.portal
|
|
||||||
}, relativeTo: this.route
|
}, relativeTo: this.route
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -313,14 +287,17 @@ export class PageHelpContentsComponent implements OnInit {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.updateErrorMessage = "";
|
|
||||||
|
|
||||||
this.subscriptions.push(this._helpService.togglePageHelpContents(ids, status, this.properties.adminToolsAPIURL, this.portal).subscribe(
|
this.subscriptions.push(this._helpService.togglePageHelpContents(ids, status, this.properties.adminToolsAPIURL, this.portal).subscribe(
|
||||||
() => {
|
() => {
|
||||||
for (let id of ids) {
|
for (let id of ids) {
|
||||||
let i = this.checkboxes.findIndex(_ => _.pageHelpContent._id == id);
|
let i = this.checkboxes.findIndex(_ => _.pageHelpContent._id == id);
|
||||||
this.checkboxes[i].pageHelpContent.isActive = status;
|
this.checkboxes[i].pageHelpContent.isActive = status;
|
||||||
}
|
}
|
||||||
|
UIkit.notification('Page content(s) has been <b>successfully updated</b>', {
|
||||||
|
status: 'success',
|
||||||
|
timeout: 6000,
|
||||||
|
pos: 'bottom-right'
|
||||||
|
});
|
||||||
this.countPageHelpContents();
|
this.countPageHelpContents();
|
||||||
this.applyCheck(false);
|
this.applyCheck(false);
|
||||||
},
|
},
|
||||||
|
@ -365,7 +342,7 @@ export class PageHelpContentsComponent implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
public filterByPage(event: any) {
|
public filterByPage(event: any) {
|
||||||
if(event.target && event.target.value) {
|
if (event.target && event.target.value) {
|
||||||
this.filters.id = event.target.value;
|
this.filters.id = event.target.value;
|
||||||
this.applyFilter();
|
this.applyFilter();
|
||||||
}
|
}
|
||||||
|
@ -392,25 +369,31 @@ export class PageHelpContentsComponent implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
handleError(message: string, error) {
|
handleError(message: string, error) {
|
||||||
this.errorMessage = message;
|
UIkit.notification(message, {
|
||||||
|
status: 'danger',
|
||||||
|
timeout: 6000,
|
||||||
|
pos: 'bottom-right'
|
||||||
|
});
|
||||||
console.log('Server responded: ' + error);
|
console.log('Server responded: ' + error);
|
||||||
|
|
||||||
this.showLoading = false;
|
this.showLoading = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
handleUpdateError(message: string, error) {
|
handleUpdateError(message: string, error) {
|
||||||
this.updateErrorMessage = message;
|
UIkit.notification(message, {
|
||||||
|
status: 'danger',
|
||||||
|
timeout: 6000,
|
||||||
|
pos: 'bottom-right'
|
||||||
|
});
|
||||||
console.log('Server responded: ' + error);
|
console.log('Server responded: ' + error);
|
||||||
|
|
||||||
this.showLoading = false;
|
this.showLoading = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public newPageContent() {
|
public newPageContent() {
|
||||||
this.router.navigate(['edit'], {
|
this.router.navigate(['edit'], {
|
||||||
queryParams: {
|
queryParams: {
|
||||||
pageId: this.selectedPageId
|
pageId: this.selectedPageId
|
||||||
}, relativeTo: this.route
|
}, relativeTo: this.route
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public onSearchClose() {
|
public onSearchClose() {
|
||||||
|
@ -421,10 +404,11 @@ export class PageHelpContentsComponent implements OnInit {
|
||||||
this.selectedKeyword = null;
|
this.selectedKeyword = null;
|
||||||
this.searchInputComponent.reset()
|
this.searchInputComponent.reset()
|
||||||
}
|
}
|
||||||
selectAll(){
|
|
||||||
let checked = !!(this.getSelectedPageHelpContents().length != this.checkboxes.length);
|
selectAll() {
|
||||||
for (let check of this.checkboxes) {
|
let checked = (this.getSelectedPageHelpContents().length != this.checkboxes.length);
|
||||||
check.checked = checked;
|
for (let check of this.checkboxes) {
|
||||||
}
|
check.checked = checked;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<div page-content>
|
<div page-content>
|
||||||
<div header>
|
<div header>
|
||||||
<admin-tabs tab="page" [portal]="portal"></admin-tabs>
|
<admin-tabs tab="page" [portal]="portal"></admin-tabs>
|
||||||
<div *ngIf="!errorMessage && !showLoading" class="uk-grid" uk-grid>
|
<div *ngIf="!showLoading" class="uk-grid" uk-grid>
|
||||||
<div class="uk-width-1-1">
|
<div class="uk-width-1-1">
|
||||||
<ul class="uk-subnav uk-subnav-pill">
|
<ul class="uk-subnav uk-subnav-pill">
|
||||||
<li [class.uk-active]="filterForm.get('type').value === 'all'"><a
|
<li [class.uk-active]="filterForm.get('type').value === 'all'"><a
|
||||||
|
@ -11,11 +11,14 @@
|
||||||
(click)="filterForm.get('type').setValue(type.value)"><span>{{type.label}}</span></a></li>
|
(click)="filterForm.get('type').setValue(type.value)"><span>{{type.label}}</span></a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</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-margin-remove-top"
|
<div
|
||||||
uk-grid>
|
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"
|
||||||
<div #searchInputComponent search-input [control]="filterForm.controls.keyword" [showSearch]="false" placeholder="Search page"
|
uk-grid>
|
||||||
|
<div #searchInputComponent search-input [control]="filterForm.controls.keyword" [showSearch]="false"
|
||||||
|
placeholder="Search page"
|
||||||
[selected]="selectedKeyword" (closeEmitter)="onSearchClose()" (resetEmitter)="reset()"
|
[selected]="selectedKeyword" (closeEmitter)="onSearchClose()" (resetEmitter)="reset()"
|
||||||
[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>
|
[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>
|
||||||
|
|
||||||
<div *ngIf="isPortalAdministrator">
|
<div *ngIf="isPortalAdministrator">
|
||||||
<a (click)="newPage()"
|
<a (click)="newPage()"
|
||||||
|
@ -32,117 +35,99 @@
|
||||||
class="uk-padding uk-padding-remove-bottom uk-padding-remove-top uk-margin-remove-top uk-margin-small-bottom uk-display-inline"
|
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"
|
[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()"
|
title="Select at least one page"><input id="checkAll" type="checkbox" (click)="selectAll()"
|
||||||
[ngModel]="getSelectedPages().length ==checkboxes.length"/>
|
[ngModel]="getSelectedPages().length ==checkboxes.length"/>
|
||||||
<span *ngIf="getSelectedPages().length > 0" class="uk-margin-left uk-text-muted">
|
<span *ngIf="getSelectedPages().length > 0" class="uk-margin-left uk-text-muted">
|
||||||
{{getSelectedPages().length}} pages selected </span>
|
{{getSelectedPages().length}} pages selected </span>
|
||||||
<a class="uk-margin-left">Actions</a>
|
<a class="uk-margin-left">Actions</a>
|
||||||
<div uk-dropdown="mode: click">
|
<div uk-dropdown="mode: click">
|
||||||
<ul class="uk-nav uk-dropdown-nav"
|
<ul class="uk-nav uk-dropdown-nav"
|
||||||
[attr.uk-tooltip]="getSelectedPages().length == 0 ? 'pos:left; cls: uk-active' : 'cls: uk-invisible'"
|
[attr.uk-tooltip]="getSelectedPages().length == 0 ? 'pos:left; cls: uk-active' : 'cls: uk-invisible'"
|
||||||
title="Select at least one page">
|
title="Select at least one page">
|
||||||
<li *ngIf="!isPortalAdministrator"><a [class]="getSelectedPages().length == 0 ? 'uk-disabled' : ''"
|
<li *ngIf="!isPortalAdministrator"><a [class]="getSelectedPages().length == 0 ? 'uk-disabled' : ''"
|
||||||
(click)="togglePages(true,getSelectedPages())"><i></i> Enable
|
(click)="togglePages(true,getSelectedPages())"><i></i> Enable
|
||||||
</a></li>
|
</a></li>
|
||||||
<li *ngIf="!isPortalAdministrator"><a [class]="getSelectedPages().length == 0 ? 'uk-disabled' : ''"
|
<li *ngIf="!isPortalAdministrator"><a [class]="getSelectedPages().length == 0 ? 'uk-disabled' : ''"
|
||||||
(click)="togglePages(false,getSelectedPages())"><i></i> Disable
|
(click)="togglePages(false,getSelectedPages())"><i></i> Disable
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li *ngIf="isPortalAdministrator"><a [class]="getSelectedPages().length == 0 ? 'uk-disabled' : ''"
|
<li *ngIf="isPortalAdministrator"><a [class]="getSelectedPages().length == 0 ? 'uk-disabled' : ''"
|
||||||
(click)="confirmDeleteSelectedPages()"><i></i> Delete </a></li>
|
(click)="confirmDeleteSelectedPages()"><i></i> Delete </a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div inner>
|
<div inner>
|
||||||
<div *ngIf="showLoading" class="uk-position-center">
|
<div *ngIf="showLoading" class="uk-position-center">
|
||||||
<loading *ngIf="showLoading"></loading>
|
<loading></loading>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="!showLoading">
|
<div *ngIf="!showLoading">
|
||||||
|
<ul *ngIf="checkboxes.length > 0" class="uk-list pages">
|
||||||
<div *ngIf="updateErrorMessage" class="uk-alert-danger" uk-alert>
|
<li *ngFor="let check of checkboxes; let i=index" class="uk-card uk-card-default uk-margin-bottom">
|
||||||
<a class="uk-alert-close" uk-close></a>
|
<div class="uk-grid uk-padding">
|
||||||
{{updateErrorMessage}}
|
<div class=""><input id="{{check.page._id}}" class="checkBox" type="checkbox"
|
||||||
</div>
|
name="pagescb[]" value="{{check.page._id}}" [(ngModel)]="check.checked">
|
||||||
<div *ngIf="errorMessage" class="uk-alert uk-alert-danger uk-margin-large-top"
|
</div>
|
||||||
role="alert">{{errorMessage}}</div>
|
<div class="uk-width-expand">
|
||||||
<div class="uk-margin-medium-bottom" *ngIf="!errorMessage">
|
<div class="title uk-margin-medium-bottom">Name</div>
|
||||||
<div class="md-card-content">
|
<div class="name uk-margin-medium-bottom" href="#">{{check.page.name}}</div>
|
||||||
<div class="uk-overflow-container">
|
<div *ngIf="check.page.entities && check.page.entities.length > 0"><span
|
||||||
<ul class="uk-list pages">
|
class="title">Entities: </span>
|
||||||
<li *ngFor="let check of checkboxes; let i=index" class="uk-card uk-card-default uk-margin-bottom">
|
{{getEntitiesAsString(check.page)}}</div>
|
||||||
<div class="uk-grid uk-padding">
|
<div class=" uk-margin-small-bottom"><span class="title">Route: </span> {{check.page.route}}</div>
|
||||||
<div class=""><input id="{{check.page._id}}" class="checkBox" type="checkbox"
|
<div *ngIf="!pagesType" class=" uk-margin-small-bottom"><span
|
||||||
name="pagescb[]" value="{{check.page._id}}" [(ngModel)]="check.checked">
|
class="title">Type: </span> {{check.page.type}}</div>
|
||||||
</div>
|
<div *ngIf="!portal" class=" uk-margin-small-bottom">
|
||||||
<div class="uk-width-expand">
|
<span class="title">Portal type: </span>{{check.page.portalType}}
|
||||||
<div class="title uk-margin-medium-bottom">Name</div>
|
</div>
|
||||||
<div class="name uk-margin-medium-bottom" href="#">{{check.page.name}}</div>
|
</div>
|
||||||
<div *ngIf="check.page.entities && check.page.entities.length > 0"><span
|
<div *ngIf="isPortalAdministrator" class="uk-width-1-4">
|
||||||
class="title">Entities: </span>
|
<div class="title uk-margin-medium-bottom">Actions</div>
|
||||||
{{getEntitiesAsString(check.page)}}</div>
|
<div class="actions" href="#">
|
||||||
<div class=" uk-margin-small-bottom"><span class="title">Route: </span> {{check.page.route}}</div>
|
<i class="clickable " (click)="editPage(i)" uk-icon="pencil"></i>
|
||||||
<div *ngIf="!pagesType" class=" uk-margin-small-bottom"><span
|
<i class="clickable uk-text-danger"
|
||||||
class="title">Type: </span> {{check.page.type}}</div>
|
(click)="confirmDeletePage(check.page._id)" uk-icon="trash"></i>
|
||||||
<div *ngIf="!portal" class=" uk-margin-small-bottom">
|
</div>
|
||||||
<span class="title">Portal type: </span>{{check.page.portalType}}
|
</div>
|
||||||
</div>
|
<div *ngIf="!isPortalAdministrator && ((check.page.top || check.page.bottom || check.page.left ||
|
||||||
</div>
|
|
||||||
<div *ngIf="isPortalAdministrator" class="uk-width-1-4">
|
|
||||||
<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 ||
|
|
||||||
check.page.right) || pageWithDivIds.includes(check.page._id) )" class="uk-width-1-4">
|
check.page.right) || pageWithDivIds.includes(check.page._id) )" class="uk-width-1-4">
|
||||||
<div class="title uk-margin-medium-bottom">Helptexts</div>
|
<div class="title uk-margin-medium-bottom">Helptexts</div>
|
||||||
<div class=" uk-margin-small-bottom">
|
<div class=" uk-margin-small-bottom">
|
||||||
<a *ngIf="check.page.top || check.page.bottom || check.page.left || check.page.right"
|
<a *ngIf="check.page.top || check.page.bottom || check.page.left || check.page.right"
|
||||||
class="helpContents"
|
class="helpContents"
|
||||||
[queryParams]="{pageId: check.page._id}"
|
[queryParams]="{pageId: check.page._id}"
|
||||||
routerLink="../helptexts">
|
routerLink="../helptexts">
|
||||||
manage help texts
|
Manage page contents
|
||||||
<span *ngIf="pageHelpContents[check.page._id]">({{pageHelpContents[check.page._id]}})</span>
|
<span *ngIf="pageHelpContents[check.page._id]">({{pageHelpContents[check.page._id]}})</span>
|
||||||
</a>
|
</a>
|
||||||
<span *ngIf="!(check.page.top || check.page.bottom || check.page.left || check.page.right)"
|
</div>
|
||||||
class="helpContents">
|
<div>
|
||||||
no helptexts available
|
<a *ngIf="pageWithDivIds.includes(check.page._id)"
|
||||||
</span>
|
[queryParams]="{ pageId: check.page._id}"
|
||||||
</div>
|
routerLink="../classContents">Manage class contents</a>
|
||||||
<div>
|
</div>
|
||||||
<a *ngIf="pageWithDivIds.includes(check.page._id)" class="classHelpContents"
|
</div>
|
||||||
[queryParams]="{ pageId: check.page._id}"
|
<div *ngIf="!isPortalAdministrator" class="uk-width-1-4">
|
||||||
routerLink="../classContents">manage class contents</a>
|
<div class="title uk-margin-medium-bottom">Enable/disable</div>
|
||||||
</div>
|
<mat-slide-toggle [checked]="check.page.isEnabled"
|
||||||
</div>
|
(change)="($event.source.checked = check.page.isEnabled);togglePages(!check.page.isEnabled,[check.page._id])"
|
||||||
<div *ngIf="!isPortalAdministrator" class="uk-width-1-4">
|
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>">
|
||||||
<div class="title uk-margin-medium-bottom">Enable/disable</div>
|
</mat-slide-toggle>
|
||||||
<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>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
</ul>
|
|
||||||
<div *ngIf="checkboxes.length==0">
|
|
||||||
<div class="uk-alert-warning" uk-alert>No pages found</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</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>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<modal-alert #editModal (alertOutput)="pageSaveConfirmed($event)"
|
<modal-alert #editModal (alertOutput)="pageSaveConfirmed($event)"
|
||||||
[okDisabled]="pageForm && (pageForm.invalid || !pageForm.dirty)">
|
[okDisabled]="pageForm && (pageForm.invalid || !pageForm.dirty)">
|
||||||
<div *ngIf="modalErrorMessage" class="uk-alert-danger" uk-alert aria-hidden="true">{{ modalErrorMessage }}</div>
|
|
||||||
<form *ngIf="pageForm" [formGroup]="pageForm" class="uk-grid uk-child-width-1-1" uk-grid>
|
<form *ngIf="pageForm" [formGroup]="pageForm" class="uk-grid uk-child-width-1-1" uk-grid>
|
||||||
<div dashboard-input [formInput]="pageForm.get('route')"
|
<div dashboard-input [formInput]="pageForm.get('route')"
|
||||||
type="text" label="Page route" placeholder="Write a route">
|
type="text" label="Page route" placeholder="Write a route">
|
||||||
</div>
|
</div>
|
||||||
<div dashboard-input [formInput]="pageForm.get('name')"
|
<div dashboard-input [formInput]="pageForm.get('name')"
|
||||||
|
@ -159,23 +144,23 @@
|
||||||
<div dashboard-input type="select" label="Portal Type" placeholder="Choose a type"
|
<div dashboard-input type="select" label="Portal Type" placeholder="Choose a type"
|
||||||
[formInput]="pageForm.get('portalType')" [options]="portalUtils.portalTypes"></div>
|
[formInput]="pageForm.get('portalType')" [options]="portalUtils.portalTypes"></div>
|
||||||
<div class="form-group">
|
<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-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 class="uk-grid uk-grid-small uk-child-width-1-4" uk-grid>
|
||||||
<div dashboard-input [formInput]="pageForm.get('top')"
|
<div dashboard-input [formInput]="pageForm.get('top')"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
label="Top">
|
label="Top">
|
||||||
</div>
|
</div>
|
||||||
<div dashboard-input [formInput]="pageForm.get('right')"
|
<div dashboard-input [formInput]="pageForm.get('right')"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
label="Right">
|
label="Right">
|
||||||
</div>
|
</div>
|
||||||
<div dashboard-input [formInput]="pageForm.get('bottom')"
|
<div dashboard-input [formInput]="pageForm.get('bottom')"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
label="Bottom">
|
label="Bottom">
|
||||||
</div>
|
</div>
|
||||||
<div dashboard-input [formInput]="pageForm.get('left')"
|
<div dashboard-input [formInput]="pageForm.get('left')"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
label="Left">
|
label="Left">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<label class="uk-text-danger">
|
<label class="uk-text-danger">
|
||||||
|
|
|
@ -47,9 +47,6 @@ export class PagesComponent implements OnInit {
|
||||||
public properties: EnvProperties = properties;
|
public properties: EnvProperties = properties;
|
||||||
|
|
||||||
public showLoading: boolean = true;
|
public showLoading: boolean = true;
|
||||||
public errorMessage: string = '';
|
|
||||||
public updateErrorMessage: string = '';
|
|
||||||
public modalErrorMessage: string = '';
|
|
||||||
public isPortalAdministrator = null;
|
public isPortalAdministrator = null;
|
||||||
public filterForm: FormGroup;
|
public filterForm: FormGroup;
|
||||||
public typeOptions = [{label: 'Search', value: 'search'}, {
|
public typeOptions = [{label: 'Search', value: 'search'}, {
|
||||||
|
@ -135,8 +132,6 @@ export class PagesComponent implements OnInit {
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.showLoading = true;
|
this.showLoading = true;
|
||||||
this.updateErrorMessage = '';
|
|
||||||
this.errorMessage = '';
|
|
||||||
this.pageWithDivIds = [];
|
this.pageWithDivIds = [];
|
||||||
let parameters = '';
|
let parameters = '';
|
||||||
if (this.pagesType) {
|
if (this.pagesType) {
|
||||||
|
@ -270,8 +265,6 @@ export class PagesComponent implements OnInit {
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.showLoading = true;
|
this.showLoading = true;
|
||||||
this.updateErrorMessage = '';
|
|
||||||
|
|
||||||
this.subscriptions.push(this._helpContentService.deletePages(this.selectedPages, this.properties.adminToolsAPIURL).subscribe(
|
this.subscriptions.push(this._helpContentService.deletePages(this.selectedPages, this.properties.adminToolsAPIURL).subscribe(
|
||||||
_ => {
|
_ => {
|
||||||
this.deletePagesFromArray(this.selectedPages);
|
this.deletePagesFromArray(this.selectedPages);
|
||||||
|
@ -308,7 +301,6 @@ export class PagesComponent implements OnInit {
|
||||||
for (let i = 0; i < page.entities.length; i++) {
|
for (let i = 0; i < page.entities.length; i++) {
|
||||||
this.entitiesCtrl.push(this._fb.control(page.entities[i]));
|
this.entitiesCtrl.push(this._fb.control(page.entities[i]));
|
||||||
}
|
}
|
||||||
this.modalErrorMessage = '';
|
|
||||||
this.pagesModalOpen('Edit Page', 'Save changes');
|
this.pagesModalOpen('Edit Page', 'Save changes');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -330,7 +322,6 @@ export class PagesComponent implements OnInit {
|
||||||
type: this._fb.control(this.typeOptions[0].value, Validators.required),
|
type: this._fb.control(this.typeOptions[0].value, Validators.required),
|
||||||
entities: this.entitiesCtrl,
|
entities: this.entitiesCtrl,
|
||||||
});
|
});
|
||||||
this.modalErrorMessage = '';
|
|
||||||
this.pagesModalOpen('Create Page', 'Create');
|
this.pagesModalOpen('Create Page', 'Create');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -363,7 +354,6 @@ export class PagesComponent implements OnInit {
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
if (!this.pageForm.value._id) {
|
if (!this.pageForm.value._id) {
|
||||||
this.modalErrorMessage = '';
|
|
||||||
this.subscriptions.push(this._helpContentService.savePage(<Page>this.pageForm.value, this.properties.adminToolsAPIURL).subscribe(
|
this.subscriptions.push(this._helpContentService.savePage(<Page>this.pageForm.value, this.properties.adminToolsAPIURL).subscribe(
|
||||||
page => {
|
page => {
|
||||||
this.pageSavedSuccessfully(page, true);
|
this.pageSavedSuccessfully(page, true);
|
||||||
|
@ -423,13 +413,12 @@ export class PagesComponent implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
handleError(message: string, error) {
|
handleError(message: string, error) {
|
||||||
// if(error == null) {
|
UIkit.notification(message, {
|
||||||
// this.formComponent.reset();
|
status: 'danger',
|
||||||
// } else {
|
timeout: 6000,
|
||||||
this.errorMessage = message;// + ' (Server responded: ' + error + ')';
|
pos: 'bottom-right'
|
||||||
|
});
|
||||||
console.log('Server responded: ' + error);
|
console.log('Server responded: ' + error);
|
||||||
//}
|
|
||||||
|
|
||||||
this.showLoading = false;
|
this.showLoading = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -450,14 +439,12 @@ export class PagesComponent implements OnInit {
|
||||||
_id: this._fb.control(''),
|
_id: this._fb.control(''),
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.updateErrorMessage = message;// + ' (Server responded: ' + error + ')';
|
UIkit.notification(message, {
|
||||||
console.log('Server responded: ' + error);
|
status: 'danger',
|
||||||
|
timeout: 6000,
|
||||||
|
pos: 'bottom-right'
|
||||||
|
});
|
||||||
}
|
}
|
||||||
UIkit.notification('An error has occurred. Please try again later', {
|
|
||||||
status: 'danger',
|
|
||||||
timeout: 6000,
|
|
||||||
pos: 'bottom-right'
|
|
||||||
});
|
|
||||||
this.showLoading = false;
|
this.showLoading = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -486,8 +473,6 @@ export class PagesComponent implements OnInit {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.updateErrorMessage = '';
|
|
||||||
|
|
||||||
this.subscriptions.push(this._helpContentService.togglePages(this.portal, ids, status, this.properties.adminToolsAPIURL).subscribe(
|
this.subscriptions.push(this._helpContentService.togglePages(this.portal, ids, status, this.properties.adminToolsAPIURL).subscribe(
|
||||||
() => {
|
() => {
|
||||||
for (let id of ids) {
|
for (let id of ids) {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<div page-content class="admin-pages">
|
<div page-content class="admin-pages">
|
||||||
<div header>
|
<div header>
|
||||||
<admin-tabs tab="portal"></admin-tabs>
|
<admin-tabs tab="portal"></admin-tabs>
|
||||||
<div *ngIf="!errorMessage && !showLoading" class="uk-grid" uk-grid>
|
<div *ngIf="!showLoading" class="uk-grid" uk-grid>
|
||||||
<div class="uk-width-1-1">
|
<div class="uk-width-1-1">
|
||||||
<ul class="uk-subnav uk-subnav-pill">
|
<ul class="uk-subnav uk-subnav-pill">
|
||||||
<li [class.uk-active]="filterForm.get('type').value === 'all'" class="uk-margin-small-bottom"><a
|
<li [class.uk-active]="filterForm.get('type').value === 'all'" class="uk-margin-small-bottom"><a
|
||||||
|
@ -14,9 +14,11 @@
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</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 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.controls.keyword" [showSearch]="false" placeholder="Search portal"
|
<div #searchInputComponent search-input [control]="filterForm.controls.keyword" [showSearch]="false"
|
||||||
|
placeholder="Search portal"
|
||||||
[selected]="selectedKeyword" (closeEmitter)="onSearchClose()" (resetEmitter)="reset()"
|
[selected]="selectedKeyword" (closeEmitter)="onSearchClose()" (resetEmitter)="reset()"
|
||||||
[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>
|
[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>
|
||||||
<div class="show-options">
|
<div class="show-options">
|
||||||
<button class="uk-button uk-button-secondary">Bulk Actions</button>
|
<button class="uk-button uk-button-secondary">Bulk Actions</button>
|
||||||
<div uk-dropdown="mode: click">
|
<div uk-dropdown="mode: click">
|
||||||
|
@ -41,57 +43,45 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div inner>
|
<div inner>
|
||||||
<loading *ngIf="showLoading" class="uk-margin-large-top"></loading>
|
<div *ngIf="showLoading" class="uk-position-center">
|
||||||
|
<loading></loading>
|
||||||
|
</div>
|
||||||
<div *ngIf="!showLoading">
|
<div *ngIf="!showLoading">
|
||||||
<div *ngIf="updateErrorMessage" class="uk-alert-danger" uk-alert>
|
<table *ngIf="checkboxes.length > 0" class="uk-table uk-table-striped uk-table-hover">
|
||||||
<a class="uk-alert-close" uk-close></a>
|
<thead class="uk-card-header">
|
||||||
{{updateErrorMessage}}
|
<tr>
|
||||||
</div>
|
<th><input id="allCommunityCheckbox" type="checkbox" (change)="toggleCheckBoxes($event)"></th>
|
||||||
<div *ngIf="errorMessage" class="uk-alert uk-alert-danger uk-margin-large-top"
|
<th>Name</th>
|
||||||
role="alert">{{errorMessage}}</div>
|
<th>Type</th>
|
||||||
<div class=" uk-margin-medium-bottom" *ngIf="!errorMessage">
|
<th>Actions</th>
|
||||||
<div class="uk-overflow-container">
|
</tr>
|
||||||
<table class="uk-table uk-table-striped uk-table-hover">
|
</thead>
|
||||||
<thead class="uk-card-header">
|
<tbody>
|
||||||
<tr>
|
<tr *ngFor="let check of checkboxes; let i=index">
|
||||||
<th><input id="allCommunityCheckbox" type="checkbox" (change)="toggleCheckBoxes($event)"></th>
|
<td><input id="{{check.portal._id}}" class="checkBox" type="checkbox"
|
||||||
<th>Name</th>
|
name="communitiescb[]" value="{{check.portal._id}}" [(ngModel)]="check.checked">
|
||||||
<th>Type</th>
|
</td>
|
||||||
<th>Actions</th>
|
<td>
|
||||||
</tr>
|
<div class="name" href="#">{{check.portal.name}}</div>
|
||||||
</thead>
|
</td>
|
||||||
<tbody>
|
<td>
|
||||||
<tr *ngFor="let check of checkboxes; let i=index">
|
<div class="type" href="#">{{check.portal.type}}</div>
|
||||||
<td><input id="{{check.portal._id}}" class="checkBox" type="checkbox"
|
</td>
|
||||||
name="communitiescb[]" value="{{check.portal._id}}" [(ngModel)]="check.checked">
|
<td>
|
||||||
</td>
|
<div class="actions" href="#">
|
||||||
<td>
|
<i class="clickable" uk-icon="pencil" (click)="editPortal(i)"></i>
|
||||||
<div class="name" href="#">{{check.portal.name}}</div>
|
<i class="clickable uk-text-danger" uk-icon="trash"
|
||||||
</td>
|
(click)="confirmDeletePortal(check.portal._id)"></i>
|
||||||
<td>
|
|
||||||
<div class="type" href="#">{{check.portal.type}}</div>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<div class="actions" href="#">
|
|
||||||
<i class="clickable" uk-icon="pencil" (click)="editPortal(i)"></i>
|
|
||||||
<i class="clickable uk-text-danger" uk-icon="trash"
|
|
||||||
(click)="confirmDeletePortal(check.portal._id)"></i>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
<div *ngIf="checkboxes.length==0" class="col-md-12">
|
|
||||||
<div class="uk-alert-warning" uk-alert>No portals found</div>
|
|
||||||
</div>
|
</div>
|
||||||
<!--<div class="uk-width-1-1 uk-flex uk-flex-center ">
|
</td>
|
||||||
<div class="uk-width-small uk-button-default uk-button" (click)="newCommunity()">
|
|
||||||
<i class="" uk-icon="plus"></i>
|
</tr>
|
||||||
</div>
|
|
||||||
</div>-->
|
</tbody>
|
||||||
</div>
|
</table>
|
||||||
|
<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 portals found</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -99,11 +89,12 @@
|
||||||
|
|
||||||
<modal-alert #editModal (alertOutput)="portalSaveConfirmed($event)"
|
<modal-alert #editModal (alertOutput)="portalSaveConfirmed($event)"
|
||||||
[okDisabled]="portalForm && (portalForm.invalid || !portalForm.dirty)">
|
[okDisabled]="portalForm && (portalForm.invalid || !portalForm.dirty)">
|
||||||
<div *ngIf="modalErrorMessage" class="uk-alert-danger" uk-alert aria-hidden="true">{{ modalErrorMessage }}</div>
|
|
||||||
<form *ngIf="portalForm" [formGroup]="portalForm" class="uk-grid uk-child-width-1-1" uk-grid>
|
<form *ngIf="portalForm" [formGroup]="portalForm" class="uk-grid uk-child-width-1-1" uk-grid>
|
||||||
<div dashboard-input [formInput]="portalForm.get('name')" type="text" label="Portal Name" placeholder="Write a name">
|
<div dashboard-input [formInput]="portalForm.get('name')" type="text" label="Portal Name"
|
||||||
|
placeholder="Write a name">
|
||||||
</div>
|
</div>
|
||||||
<div dashboard-input type="select" label="Portal Type" placeholder="Choose a type" [formInput]="portalForm.get('type')" [options]="portalUtils.portalTypes"></div>
|
<div dashboard-input type="select" label="Portal Type" placeholder="Choose a type"
|
||||||
|
[formInput]="portalForm.get('type')" [options]="portalUtils.portalTypes"></div>
|
||||||
<div dashboard-input [formInput]="portalForm.get('pid')"
|
<div dashboard-input [formInput]="portalForm.get('pid')"
|
||||||
type="text" placeholder="Write pid of portal"
|
type="text" placeholder="Write pid of portal"
|
||||||
label="Portal persistent id for portal">
|
label="Portal persistent id for portal">
|
||||||
|
|
|
@ -40,9 +40,6 @@ export class PortalsComponent implements OnInit {
|
||||||
public properties: EnvProperties = null;
|
public properties: EnvProperties = null;
|
||||||
|
|
||||||
public showLoading = true;
|
public showLoading = true;
|
||||||
public errorMessage = '';
|
|
||||||
public updateErrorMessage = '';
|
|
||||||
public modalErrorMessage = '';
|
|
||||||
public portalUtils: PortalUtils = new PortalUtils();
|
public portalUtils: PortalUtils = new PortalUtils();
|
||||||
private index: number;
|
private index: number;
|
||||||
public selectedKeyword: string;
|
public selectedKeyword: string;
|
||||||
|
@ -89,10 +86,6 @@ export class PortalsComponent implements OnInit {
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.showLoading = true;
|
this.showLoading = true;
|
||||||
this.updateErrorMessage = '';
|
|
||||||
this.errorMessage = '';
|
|
||||||
|
|
||||||
|
|
||||||
this.subscriptions.push(this._helpContentService.getPortalsFull(this.properties.adminToolsAPIURL).subscribe(
|
this.subscriptions.push(this._helpContentService.getPortalsFull(this.properties.adminToolsAPIURL).subscribe(
|
||||||
portals => {
|
portals => {
|
||||||
this.portals = portals;
|
this.portals = portals;
|
||||||
|
@ -164,8 +157,6 @@ export class PortalsComponent implements OnInit {
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.showLoading = true;
|
this.showLoading = true;
|
||||||
this.updateErrorMessage = '';
|
|
||||||
|
|
||||||
this.subscriptions.push(this._helpContentService.deleteCommunities(this.selectedPortals, this.properties.adminToolsAPIURL).subscribe(
|
this.subscriptions.push(this._helpContentService.deleteCommunities(this.selectedPortals, this.properties.adminToolsAPIURL).subscribe(
|
||||||
_ => {
|
_ => {
|
||||||
this.deletePortalsFromArray(this.selectedPortals);
|
this.deletePortalsFromArray(this.selectedPortals);
|
||||||
|
@ -192,7 +183,6 @@ export class PortalsComponent implements OnInit {
|
||||||
type: this._fb.control(portal.type, Validators.required),
|
type: this._fb.control(portal.type, Validators.required),
|
||||||
});
|
});
|
||||||
this.portalForm.get('type').disable();
|
this.portalForm.get('type').disable();
|
||||||
this.modalErrorMessage = '';
|
|
||||||
this.portalModalOpen('Edit Portal', 'Save');
|
this.portalModalOpen('Edit Portal', 'Save');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -207,7 +197,6 @@ export class PortalsComponent implements OnInit {
|
||||||
piwik: this._fb.control(''),
|
piwik: this._fb.control(''),
|
||||||
type: this._fb.control('', Validators.required),
|
type: this._fb.control('', Validators.required),
|
||||||
});
|
});
|
||||||
this.modalErrorMessage = '';
|
|
||||||
this.portalModalOpen('Create Portal', 'Create');
|
this.portalModalOpen('Create Portal', 'Create');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -239,7 +228,6 @@ export class PortalsComponent implements OnInit {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.modalErrorMessage = '';
|
|
||||||
if (this.portalForm.value._id) {
|
if (this.portalForm.value._id) {
|
||||||
this.portalForm.get('type').enable();
|
this.portalForm.get('type').enable();
|
||||||
this.subscriptions.push(this._helpContentService.updateCommunity(<Portal>this.portalForm.value,
|
this.subscriptions.push(this._helpContentService.updateCommunity(<Portal>this.portalForm.value,
|
||||||
|
@ -313,19 +301,22 @@ export class PortalsComponent implements OnInit {
|
||||||
type: ''
|
type: ''
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.updateErrorMessage = message;
|
UIkit.notification(message, {
|
||||||
|
status: 'danger',
|
||||||
|
timeout: 6000,
|
||||||
|
pos: 'bottom-right'
|
||||||
|
});
|
||||||
console.log('Server responded: ' + error);
|
console.log('Server responded: ' + error);
|
||||||
}
|
}
|
||||||
UIkit.notification('An error has occurred. Please try again later', {
|
|
||||||
status: 'danger',
|
|
||||||
timeout: 6000,
|
|
||||||
pos: 'bottom-right'
|
|
||||||
});
|
|
||||||
this.showLoading = false;
|
this.showLoading = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
handleError(message: string, error) {
|
handleError(message: string, error) {
|
||||||
this.errorMessage = message;
|
UIkit.notification(message, {
|
||||||
|
status: 'danger',
|
||||||
|
timeout: 6000,
|
||||||
|
pos: 'bottom-right'
|
||||||
|
});
|
||||||
console.log('Server responded: ' + error);
|
console.log('Server responded: ' + error);
|
||||||
this.showLoading = false;
|
this.showLoading = false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,14 +31,14 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div inner>
|
<div inner>
|
||||||
<div *ngIf="loadActive || loadPending" class="uk-margin-large-top">
|
<div *ngIf="loadActive || loadPending" class="uk-position-center">
|
||||||
<loading></loading>
|
<loading></loading>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="!loadActive && !loadPending">
|
<div *ngIf="!loadActive && !loadPending">
|
||||||
<div *ngIf="(showActive && active.length == 0) || (!showActive && pending.length == 0)"
|
<div *ngIf="(showActive && active.length == 0) || (!showActive && pending.length == 0)"
|
||||||
class="uk-card uk-card-default uk-padding-large uk-text-center uk-margin-bottom uk-text-bold">
|
class="uk-card uk-card-default uk-padding-large uk-text-center uk-margin-bottom uk-text-bold">
|
||||||
<div *ngIf="showActive">No {{role}}s for {{name}}</div>
|
<div *ngIf="showActive">No {{role}}s found</div>
|
||||||
<div *ngIf="!showActive">No pending {{role}} invitations for {{name}}</div>
|
<div *ngIf="!showActive">No pending {{role}} invitations found</div>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="(showActive && active.length > 0) || (!showActive && pending.length > 0)">
|
<div *ngIf="(showActive && active.length > 0) || (!showActive && pending.length > 0)">
|
||||||
<div class="uk-card uk-card-default uk-card-body uk-text-small uk-margin-bottom"
|
<div class="uk-card uk-card-default uk-card-body uk-text-small uk-margin-bottom"
|
||||||
|
|
|
@ -24,13 +24,13 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div inner>
|
<div inner>
|
||||||
<div *ngIf="loading" class="uk-margin-large-top">
|
<div *ngIf="loading" class="uk-position-center">
|
||||||
<loading></loading>
|
<loading></loading>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="!loading">
|
<div *ngIf="!loading">
|
||||||
<div *ngIf="showSubscribers.length == 0"
|
<div *ngIf="showSubscribers.length == 0"
|
||||||
class="uk-card uk-card-default uk-padding-large uk-text-center uk-margin-bottom uk-text-bold">
|
class="uk-card uk-card-default uk-padding-large uk-text-center uk-margin-bottom uk-text-bold">
|
||||||
<div>No subscribers for {{name}}</div>
|
<div>No subscribers found</div>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="showSubscribers.length > 0">
|
<div *ngIf="showSubscribers.length > 0">
|
||||||
<no-load-paging [type]="(subscribers.length > 1)?'subscribers':'subscriber'"
|
<no-load-paging [type]="(subscribers.length > 1)?'subscribers':'subscriber'"
|
||||||
|
|
Loading…
Reference in New Issue