Finish UI of class help texts list, edit page/class help content
This commit is contained in:
parent
beb21be4a0
commit
4625ebf967
|
@ -1,50 +1,40 @@
|
||||||
<div page-content>
|
<div page-content (stickyEmitter)="stickyPageHeader = $event">
|
||||||
<div header>
|
<div header>
|
||||||
<div class="uk-margin-top">
|
<div *ngIf="!showLoading" class="uk-flex uk-flex-middle uk-grid" uk-grid>
|
||||||
<a routerLink="../" [queryParams]=" { 'pageId': pageId }"
|
<div class="uk-width-expand uk-flex uk-flex-middle uk-margin-top uk-margin-bottom info"
|
||||||
class="uk-button uk-button-link uk-text-uppercase uk-flex uk-flex-middle">
|
[class.uk-active]="stickyPageHeader">
|
||||||
<icon name="west" [flex]="true"></icon>
|
<a routerLink="../" [queryParams]=" { 'pageId': pageId }" class="uk-button uk-button-link uk-margin-right">
|
||||||
<span class="uk-margin-small-left">Go back to class help texts list</span>
|
<icon name="west" ratio="2" [flex]="true"></icon>
|
||||||
</a>
|
</a>
|
||||||
|
<div>
|
||||||
|
<div class="uk-margin-remove uk-text-background uk-text-bold uk-h6">
|
||||||
|
Admin Dashboard - {{pageHelpContent ? 'Update ' : 'Add new '}} class help text
|
||||||
|
</div>
|
||||||
|
<h1 class="uk-h4 uk-margin-remove">{{page.name}}<span *ngIf="myForm.dirty" class="uk-text-large"> (unsaved changes)</span></h1>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="uk-width-auto uk-text-right@m uk-text-center">
|
||||||
|
<button class="uk-button uk-button-default uk-margin-right"
|
||||||
|
(click)="resetCustom()" [class.uk-disabled]="!myForm.dirty"
|
||||||
|
[disabled]="!myForm.dirty">Reset
|
||||||
|
</button>
|
||||||
|
<button class="uk-button uk-button-primary" [class.uk-disabled]="!myForm.dirty || myForm.disabled"
|
||||||
|
(click)="saveCustom()" [disabled]="!myForm.dirty || myForm.disabled">Save
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div inner>
|
<div inner>
|
||||||
<div class="uk-card-header">
|
<div *ngIf="myForm" class="uk-section uk-container uk-container-small">
|
||||||
<div class="uk-flex uk-flex-middle uk-child-width-1-1 uk-child-width-1-2@m uk-grid" uk-grid>
|
|
||||||
<div>
|
|
||||||
<div class="uk-text-small uk-text-muted"> {{pageHelpContent ? 'Update ' : 'Add new '}} class help text</div>
|
|
||||||
<div>
|
|
||||||
<span *ngIf="page" class="uk-text-bold">{{page.name}}</span>
|
|
||||||
<span *ngIf="myForm.dirty"> (unsaved changes)</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class=" uk-flex uk-flex-right">
|
|
||||||
<button (click)="resetCustom()" [disabled]="showLoading || !myForm.dirty"
|
|
||||||
class="uk-button uk-button-secondary outlined uk-margin-small-right">Reset
|
|
||||||
</button>
|
|
||||||
<button (click)="saveCustom()" class="uk-button uk-button-secondary uk-margin-small-right"
|
|
||||||
[disabled]="showLoading || !myForm.dirty || !myForm.valid ">Save
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<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 *ngIf="errorMessage" class="uk-alert uk-alert-danger" role="alert">{{errorMessage}}</div>
|
<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 *ngIf="updateErrorMessage" class="uk-alert uk-alert-danger" role="alert">{{updateErrorMessage}}</div>
|
<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>
|
||||||
<form [formGroup]="myForm" [class.hidden]="showLoading">
|
<form [formGroup]="myForm" [class.hidden]="showLoading">
|
||||||
<div class="uk-grid uk-child-width-1-2 ">
|
<div class="uk-width-1-2" *ngIf="classOptions.length > 0" input [formInput]="myForm.get('divId')" placeholder="Select Class" [options]="classOptions" type="select"></div>
|
||||||
<div *ngIf="classOptions.length > 0" input [formInput]="myForm.get('divId')" placeholder="Select Class" [options]="classOptions" type="select"></div>
|
<div class="form-group uk-margin-medium-top">
|
||||||
</div>
|
|
||||||
<div class="form-group uk-margin-top">
|
|
||||||
<span class="uk-text-bold uk-margin-small-right">Select Status (Enable/ disable)</span>
|
<span class="uk-text-bold uk-margin-small-right">Select Status (Enable/ disable)</span>
|
||||||
|
|
||||||
<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>"
|
||||||
|
@ -73,6 +63,4 @@
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -32,6 +32,7 @@ export class ClassContentFormComponent implements OnInit {
|
||||||
@Input() updateErrorMessage: string = '';
|
@Input() updateErrorMessage: string = '';
|
||||||
private subs: Subscription[] = [];
|
private subs: Subscription[] = [];
|
||||||
public pageHelpContent: DivHelpContent;
|
public pageHelpContent: DivHelpContent;
|
||||||
|
public stickyPageHeader: boolean = false;
|
||||||
|
|
||||||
constructor(private route: ActivatedRoute, private _router: Router, private _fb: FormBuilder, private _helpContentService: HelpContentService) {
|
constructor(private route: ActivatedRoute, private _router: Router, private _fb: FormBuilder, private _helpContentService: HelpContentService) {
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<div header>
|
<div header>
|
||||||
<div *ngIf="!showLoading" class="uk-flex uk-flex-middle uk-margin-top info"
|
<div *ngIf="!showLoading" class="uk-flex uk-flex-middle uk-margin-top info"
|
||||||
[class.uk-active]="stickyPageHeader">
|
[class.uk-active]="stickyPageHeader">
|
||||||
<a routerLink="../pages/" class="uk-button uk-button-link uk-margin-right">
|
<a routerLink="../pages" class="uk-button uk-button-link uk-margin-right">
|
||||||
<icon name="west" ratio="2" [flex]="true"></icon>
|
<icon name="west" ratio="2" [flex]="true"></icon>
|
||||||
</a>
|
</a>
|
||||||
<div>
|
<div>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<div page-content (stickyEmitter)="stickyPageHeader = $event">
|
<div page-content (stickyEmitter)="stickyPageHeader = $event">
|
||||||
<div header>
|
<div header>
|
||||||
<div class="uk-flex uk-flex-middle uk-margin-top info" [class.uk-active]="stickyPageHeader">
|
<div class="uk-flex uk-flex-middle uk-margin-top info" [class.uk-active]="stickyPageHeader">
|
||||||
<ng-container *ngIf="showLogo && entity">
|
<ng-container *ngIf="showLogo">
|
||||||
<img [src]="entity | logoUrl" class="uk-margin-right uk-blend-multiply">
|
<img [src]="entity | logoUrl" class="uk-margin-right uk-blend-multiply">
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<div>
|
<div>
|
||||||
|
|
|
@ -1,53 +1,48 @@
|
||||||
<div page-content>
|
<div page-content (stickyEmitter)="stickyPageHeader = $event">
|
||||||
<div header>
|
<div header>
|
||||||
<div class="uk-margin-top">
|
<div *ngIf="!showLoading" class="uk-flex uk-flex-middle uk-grid" uk-grid>
|
||||||
<a routerLink="../" [queryParams]=" { 'pageId': pageId }"
|
<div class="uk-width-expand uk-flex uk-flex-middle uk-margin-top uk-margin-bottom info"
|
||||||
class="uk-button uk-button-link uk-text-uppercase uk-flex uk-flex-middle">
|
[class.uk-active]="stickyPageHeader">
|
||||||
<icon name="west" [flex]="true"></icon>
|
<a routerLink="../" [queryParams]=" { 'pageId': pageId }" class="uk-button uk-button-link uk-margin-right">
|
||||||
<span class="uk-margin-small-left">Go back to page help texts list</span>
|
<icon name="west" ratio="2" [flex]="true"></icon>
|
||||||
</a>
|
</a>
|
||||||
|
<div>
|
||||||
|
<div class="uk-margin-remove uk-text-background uk-text-bold uk-h6">
|
||||||
|
Admin Dashboard - {{pageHelpContent ? 'Update ' : 'Add new '}} page help text
|
||||||
|
</div>
|
||||||
|
<h1 class="uk-h4 uk-margin-remove">{{page.name}}<span *ngIf="myForm.dirty" class="uk-text-large"> (unsaved changes)</span></h1>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="uk-width-auto uk-text-right@m uk-text-center">
|
||||||
|
<button class="uk-button uk-button-default uk-margin-right"
|
||||||
|
(click)="resetCustom()" [class.uk-disabled]="!myForm.dirty"
|
||||||
|
[disabled]="!myForm.dirty">Reset
|
||||||
|
</button>
|
||||||
|
<button class="uk-button uk-button-primary" [class.uk-disabled]="!myForm.dirty || myForm.disabled"
|
||||||
|
(click)="saveCustom()" [disabled]="!myForm.dirty || myForm.disabled">Save
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div inner>
|
<div inner>
|
||||||
<div class="uk-card-header">
|
<div *ngIf="myForm" class="uk-section uk-container uk-container-small">
|
||||||
<div class="uk-flex uk-flex-middle uk-child-width-1-1 uk-child-width-1-2@m uk-grid" uk-grid>
|
|
||||||
<div>
|
|
||||||
<div class="uk-text-small uk-text-muted"> {{pageHelpContent ? 'Update ' : 'Add new '}} page help text</div>
|
|
||||||
<div>
|
|
||||||
<span *ngIf="page" class="uk-text-bold">{{page.name}}</span>
|
|
||||||
<span *ngIf="myForm.dirty"> (unsaved changes)</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class=" uk-flex uk-flex-right">
|
|
||||||
<button (click)="resetCustom()" [disabled]="showLoading || !myForm.dirty"
|
|
||||||
class="uk-button uk-button-secondary outlined uk-margin-small-right">Reset
|
|
||||||
</button>
|
|
||||||
<button (click)="saveCustom()" class="uk-button uk-button-secondary uk-margin-small-right"
|
|
||||||
[disabled]="showLoading || !myForm.dirty || myForm.invalid ">Save
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<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 class="uk-animation-fade uk-width-1-1" role="alert">
|
|
||||||
<div *ngIf="showLoading" class="uk-position-center">
|
<div *ngIf="showLoading" class="uk-position-center">
|
||||||
<loading *ngIf="showLoading"></loading>
|
<loading *ngIf="showLoading"></loading>
|
||||||
</div>
|
</div>
|
||||||
<form [formGroup]="myForm" [class.hidden]="showLoading">
|
<form [formGroup]="myForm" [class.hidden]="showLoading">
|
||||||
<div class="uk-grid uk-child-width-1-2 ">
|
<div class="uk-grid uk-child-width-1-2">
|
||||||
<div *ngIf="placementsOptions.length > 0" input [formInput]="myForm.get('placement')"
|
<div *ngIf="placementsOptions.length > 0" input [formInput]="myForm.get('placement')"
|
||||||
placeholder="Select placement" [options]="placementsOptions" type="select"></div>
|
placeholder="Select placement" [options]="placementsOptions" type="select"></div>
|
||||||
<div input [formInput]="myForm.get('order')" placeholder="Select order" [options]="orderOptions" type="select"></div>
|
<div input [formInput]="myForm.get('order')" placeholder="Select order" [options]="orderOptions" type="select"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group uk-margin-top">
|
<div class="form-group uk-margin-medium-top">
|
||||||
<div class="uk-text-bold uk-margin-medium-bottom">Select Status (Enable/ disable)</div>
|
<span class="uk-text-bold uk-margin-small-right">Select Status (Enable/ disable)</span>
|
||||||
<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-medium-top"
|
<div class="form-group uk-margin-large-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>
|
||||||
|
@ -70,6 +65,4 @@
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -28,6 +28,7 @@ export class PageContentFormComponent implements OnInit {
|
||||||
public showLoading: boolean = true;
|
public showLoading: boolean = true;
|
||||||
private subs: Subscription[] = [];
|
private subs: Subscription[] = [];
|
||||||
public pageHelpContent: PageHelpContent;
|
public pageHelpContent: PageHelpContent;
|
||||||
|
public stickyPageHeader: boolean = false;
|
||||||
|
|
||||||
constructor(private route: ActivatedRoute, private _router: Router, private _fb: FormBuilder, private _helpContentService: HelpContentService) {
|
constructor(private route: ActivatedRoute, private _router: Router, private _fb: FormBuilder, private _helpContentService: HelpContentService) {
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,56 +1,15 @@
|
||||||
<div page-content>
|
<div page-content (stickyEmitter)="stickyPageHeader = $event">
|
||||||
<div header>
|
<div header>
|
||||||
<div class="uk-text-bold">
|
<div *ngIf="!showLoading" class="uk-flex uk-flex-middle uk-margin-top info"
|
||||||
<span *ngIf="selectedPageId && page">{{page.name}}</span>
|
[class.uk-active]="stickyPageHeader">
|
||||||
</div>
|
<a routerLink="../pages" class="uk-button uk-button-link uk-margin-right">
|
||||||
<div class="uk-margin-top">
|
<icon name="west" ratio="2" [flex]="true"></icon>
|
||||||
<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">
|
|
||||||
<icon name="west"></icon>
|
|
||||||
</span>
|
|
||||||
<span class="space">
|
|
||||||
Back to pages list
|
|
||||||
</span>
|
|
||||||
</a>
|
</a>
|
||||||
</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 #searchInputComponent search-input [control]="filterForm" [showSearch]="false" placeholder="Search helptext"
|
|
||||||
[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>
|
|
||||||
<div>
|
<div>
|
||||||
<a (click)="newPageContent()"
|
<div class="uk-margin-remove uk-text-background uk-text-bold uk-h6">
|
||||||
class="uk-flex uk-flex-middle uk-text-uppercase">
|
Admin Dashboard <span *ngIf="selectedPageId && page"> - Manage page help texts</span>
|
||||||
<button class="large uk-icon-button uk-button-secondary">
|
|
||||||
<icon name="add"></icon>
|
|
||||||
</button>
|
|
||||||
<button class="uk-button uk-button-link uk-margin-small-left uk-text-secondary">Add new page help text
|
|
||||||
</button>
|
|
||||||
</a>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<h1 class="uk-h4 uk-margin-remove">{{page.name}}</h1>
|
||||||
<div *ngIf="!showLoading && checkboxes.length > 0"
|
|
||||||
class="uk-padding uk-flex uk-padding-remove-bottom uk-padding-remove-top uk-margin-remove-top uk-margin-small-bottom uk-display-inline"
|
|
||||||
[attr.uk-tooltip]="getSelectedPageHelpContents().length == 0 ? 'pos:left; cls: uk-active' : 'cls: uk-invisible'"
|
|
||||||
title="Select at least one help text"><input id="checkAll" type="checkbox" (click)="selectAll()"
|
|
||||||
[ngModel]="getSelectedPageHelpContents().length ==checkboxes.length"/>
|
|
||||||
<span *ngIf="getSelectedPageHelpContents().length > 0" class="uk-margin-left uk-text-muted">
|
|
||||||
{{getSelectedPageHelpContents().length}} pages selected </span>
|
|
||||||
<a class="uk-margin-left">Actions </a>
|
|
||||||
<div uk-dropdown="mode: click">
|
|
||||||
<ul class="uk-nav uk-dropdown-nav"
|
|
||||||
[attr.uk-tooltip]="getSelectedPageHelpContents().length == 0 ? 'pos:left; cls: uk-active' : 'cls: uk-invisible'"
|
|
||||||
title="Select at least one help text">
|
|
||||||
<li><a [class]="getSelectedPageHelpContents().length == 0 ? 'uk-disabled' : ''"
|
|
||||||
(click)="togglePageHelpContents(true,getSelectedPageHelpContents())"><i></i> Enable
|
|
||||||
</a></li>
|
|
||||||
<li><a [class]="getSelectedPageHelpContents().length == 0 ? 'uk-disabled' : ''"
|
|
||||||
(click)="togglePageHelpContents(false,getSelectedPageHelpContents())"><i></i> Disable
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li><a [class]="getSelectedPageHelpContents().length == 0 ? 'uk-disabled' : ''"
|
|
||||||
(click)="confirmDeleteSelectedPageHelpContents()"><i></i> Delete </a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -59,58 +18,67 @@
|
||||||
<loading></loading>
|
<loading></loading>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="!showLoading">
|
<div *ngIf="!showLoading">
|
||||||
<div *ngIf="checkboxes.length > 0" class="uk-margin-medium-bottom">
|
<div class="uk-margin-top uk-margin-medium-bottom uk-flex-right@m uk-flex-center uk-flex-middle uk-grid" uk-grid>
|
||||||
<ul class="uk-list pages">
|
<div search-input [expandable]="true" [searchControl]="filterForm" searchInputClass="outer" placeholder="Search helptext" class="uk-width-1-3@xl uk-width-2-5@l uk-width-1-2@m uk-width-1-1">
|
||||||
<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 ">
|
|
||||||
<div class="uk-grid uk-flex uk-flex-middle">
|
|
||||||
<div><input id="{{check.pageHelpContent._id}}" class="uk-checkbox" type="checkbox"
|
|
||||||
name="entitiescb[]" value="{{check.pageHelpContent._id}}" [(ngModel)]="check.checked">
|
|
||||||
</div>
|
</div>
|
||||||
<div class="uk-width-expand uk-margin-medium-bottom">
|
<div>
|
||||||
<div *ngIf="!selectedPageId">
|
<a (click)="newPageContent()"
|
||||||
<div class="page" href="#">{{check.pageHelpContent.page.name}}</div>
|
class="uk-flex uk-flex-middle uk-button uk-button-default">
|
||||||
|
<icon [flex]="true" name="add"></icon>
|
||||||
|
<span class="uk-margin-small-left">Add page help text</span>
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="content multi-line-ellipsis lines-2">
|
|
||||||
<p>{{check.pageHelpContent.content|htmlToString}}</p></div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="uk-grid uk-width-1-1 uk-margin-left">
|
<div class="uk-section">
|
||||||
<div class=" ">
|
<div *ngIf="checkboxes.length > 0">
|
||||||
<span class="title">Placement: </span>{{check.pageHelpContent.placement}}
|
<div class="uk-grid uk-child-width-1-2@l uk-child-width-1-1" uk-height-match=".uk-card-body" uk-grid>
|
||||||
|
<div *ngFor="let check of checkboxes; let i=index">
|
||||||
|
<div class="uk-card uk-card-default uk-margin-bottom">
|
||||||
|
<div class="uk-card-body">
|
||||||
|
<div class="uk-margin-medium-bottom">
|
||||||
|
<div class="multi-line-ellipsis lines-2">
|
||||||
|
<p>{{check.pageHelpContent.content | htmlToString}}</p>
|
||||||
</div>
|
</div>
|
||||||
<div class=" ">
|
<div class="uk-text-small">
|
||||||
<span class="title">Order: </span>{{check.pageHelpContent.order}}
|
<span class="uk-text-meta">Placement: </span>{{check.pageHelpContent.placement}}
|
||||||
</div>
|
</div>
|
||||||
<div class=" ">
|
<div class="uk-text-small uk-margin-small-top">
|
||||||
<span class="title uk-margin-small-right">Enable/disable: </span>
|
<span class="uk-text-meta">Order: </span>{{check.pageHelpContent.order}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="uk-card-footer uk-padding-remove-vertical">
|
||||||
|
<div class="uk-grid uk-grid-small uk-flex-nowrap uk-grid-divider uk-flex-right" uk-grid>
|
||||||
|
<div>
|
||||||
|
<div class="uk-padding-small uk-padding-remove-horizontal">
|
||||||
<mat-slide-toggle [checked]="check.pageHelpContent.isActive"
|
<mat-slide-toggle [checked]="check.pageHelpContent.isActive"
|
||||||
(change)="($event.source.checked = check.pageHelpContent.isActive);togglePageHelpContents(!check.pageHelpContent.isActive,[check.pageHelpContent._id])"
|
(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>"
|
uk-tooltip="title:<div><div class='uk-text-bold '> Enable or disable help text to show or hide it from the dashboard</div></div>">
|
||||||
></mat-slide-toggle>
|
<span class="uk-text-small">Enable</span>
|
||||||
|
</mat-slide-toggle>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div><div class="uk-padding-small uk-padding-remove-horizontal">
|
||||||
</div>
|
<button class="uk-button uk-button-link uk-flex uk-flex-middle" (click)="editPageHelpContent(check.pageHelpContent._id)">
|
||||||
<div class="uk-width-1-5">
|
|
||||||
<div class="uk-flex uk-flex-center uk-flex-column uk-height-1-1">
|
|
||||||
<div class="uk-flex uk-flex-center">
|
|
||||||
<div class="actions" href="#">
|
|
||||||
<button (click)="editPageHelpContent(check.pageHelpContent._id)" class="uk-button uk-button-secondary uk-margin-top uk-flex uk-flex-middle">
|
|
||||||
<icon name="edit" [flex]="true"></icon>
|
<icon name="edit" [flex]="true"></icon>
|
||||||
<span class="uk-margin-small-left">Edit</span>
|
<span class="uk-margin-xsmall-left"> Edit</span>
|
||||||
</button>
|
</button>
|
||||||
<button (click)="confirmDeletePageHelpContent(check.pageHelpContent._id)" class="uk-button uk-button-danger uk-margin-top uk-flex uk-flex-middle">
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div class="uk-padding-small uk-padding-remove-horizontal">
|
||||||
|
<button class="uk-button uk-button-link uk-flex uk-flex-middle"
|
||||||
|
(click)="confirmDeletePageHelpContent(check.pageHelpContent._id)">
|
||||||
<icon name="delete" [flex]="true"></icon>
|
<icon name="delete" [flex]="true"></icon>
|
||||||
<span class="uk-margin-small-left">Delete</span>
|
<span class="uk-margin-xsmall-left"> Delete</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</div>
|
||||||
</ul>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="checkboxes.length == 0"
|
<div *ngIf="checkboxes.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">
|
||||||
|
@ -118,6 +86,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<modal-alert #AlertModalDeletePageHelpContents [overflowBody]="false" classTitle="uk-background-primary uk-light"
|
<modal-alert #AlertModalDeletePageHelpContents [overflowBody]="false" classTitle="uk-background-primary uk-light"
|
||||||
(alertOutput)="confirmedDeletePageHelpContents($event)"></modal-alert>
|
(alertOutput)="confirmedDeletePageHelpContents($event)"></modal-alert>
|
||||||
|
|
|
@ -45,6 +45,7 @@ export class PageHelpContentsComponent implements OnInit {
|
||||||
public filterForm: FormControl;
|
public filterForm: FormControl;
|
||||||
private subscriptions: any[] = [];
|
private subscriptions: any[] = [];
|
||||||
public selectedKeyword: string;
|
public selectedKeyword: string;
|
||||||
|
public stickyPageHeader: boolean = false;
|
||||||
@ViewChild('searchInputComponent') searchInputComponent: SearchInputComponent;
|
@ViewChild('searchInputComponent') searchInputComponent: SearchInputComponent;
|
||||||
|
|
||||||
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) {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<div page-content (stickyEmitter)="stickyPageHeader = $event">
|
<div page-content (stickyEmitter)="stickyPageHeader = $event">
|
||||||
<div header>
|
<div header>
|
||||||
<div class="uk-flex uk-flex-middle uk-margin-top info" [class.uk-active]="stickyPageHeader">
|
<div class="uk-flex uk-flex-middle uk-margin-top info" [class.uk-active]="stickyPageHeader">
|
||||||
<ng-container *ngIf="showLogo && entity">
|
<ng-container *ngIf="showLogo">
|
||||||
<img [src]="entity | logoUrl" class="uk-margin-right uk-blend-multiply">
|
<img [src]="entity | logoUrl" class="uk-margin-right uk-blend-multiply">
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<div>
|
<div>
|
||||||
|
|
|
@ -418,14 +418,6 @@ export class PagesComponent implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
public togglePages(status: boolean, ids: string[]) {
|
public togglePages(status: boolean, ids: string[]) {
|
||||||
if (!Session.isLoggedIn()) {
|
|
||||||
this._router.navigate(['/user-info'], {
|
|
||||||
queryParams: {
|
|
||||||
'errorCode': LoginErrorCodes.NOT_VALID,
|
|
||||||
'redirectUrl': this._router.url
|
|
||||||
}
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
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) {
|
||||||
|
@ -437,7 +429,6 @@ export class PagesComponent implements OnInit {
|
||||||
error => this.handleUpdateError('System error changing the status of the selected page(s)', error)
|
error => this.handleUpdateError('System error changing the status of the selected page(s)', error)
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
selectAll() {
|
selectAll() {
|
||||||
let checked = this.getSelectedPages().length != this.checkboxes.length;
|
let checked = this.getSelectedPages().length != this.checkboxes.length;
|
||||||
|
|
|
@ -9,11 +9,11 @@ import { properties } from 'src/environments/environment';
|
||||||
selector: 'admin-tabs',
|
selector: 'admin-tabs',
|
||||||
template: `
|
template: `
|
||||||
<ul class="uk-tab" uk-tab>
|
<ul class="uk-tab" uk-tab>
|
||||||
<li *ngIf="isPortalAdmin && !portal" [class.uk-active]="tab === 'portal'"><a routerLink="../portals"><span class="title">Portals</span></a></li>
|
<li *ngIf="isPortalAdmin && !portal" [class.uk-active]="tab === 'portal'"><a routerLink="../portals">Portals</a></li>
|
||||||
<li [class.uk-active]="tab === 'page'"><a routerLink="../pages"><span class="title">Pages</span></a></li>
|
<li [class.uk-active]="tab === 'page'"><a routerLink="../pages">Pages</a></li>
|
||||||
<li [class.uk-active]="tab === 'entity'"><a routerLink="../entities"><span class="title">Entities</span></a></li>
|
<li [class.uk-active]="tab === 'entity'"><a routerLink="../entities">Entities</a></li>
|
||||||
<li *ngIf="env === 'development' && portal && type === 'community'" [class.uk-active]="tab === 'menu'"><a routerLink="../menu"><span class="title">Menu</span></a></li>
|
<li *ngIf="env === 'development' && portal && type === 'community'" [class.uk-active]="tab === 'menu'"><a routerLink="../menu">Menu</a></li>
|
||||||
<li *ngIf="isPortalAdmin && !portal" [class.uk-active]="tab === 'class'"><a routerLink="../classes"><span class="title">Classes</span></a></li>
|
<li *ngIf="isPortalAdmin && !portal" [class.uk-active]="tab === 'class'"><a routerLink="../classes">Classes</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
`
|
`
|
||||||
})
|
})
|
||||||
|
|
|
@ -311,7 +311,7 @@ export class StringUtils {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static getLogoUrl(result: Stakeholder | CommunityInfo): string {
|
public static getLogoUrl(result: Stakeholder | CommunityInfo): string {
|
||||||
if(result.logoUrl) {
|
if(result && result.logoUrl) {
|
||||||
return (result.isUpload)?(properties.utilsService + '/download/' + result.logoUrl):result.logoUrl;
|
return (result.isUpload)?(properties.utilsService + '/download/' + result.logoUrl):result.logoUrl;
|
||||||
} else {
|
} else {
|
||||||
return "assets/common-assets/placeholder.png";
|
return "assets/common-assets/placeholder.png";
|
||||||
|
|
Loading…
Reference in New Issue