2022-07-13 19:25:19 +02:00
|
|
|
<div page-content>
|
2021-02-25 16:55:56 +01:00
|
|
|
<div header>
|
2023-03-27 13:59:17 +02:00
|
|
|
<div class="uk-section-xsmall uk-margin-top uk-container">
|
|
|
|
<div class="uk-flex-middle uk-grid" uk-grid>
|
|
|
|
<div class="uk-width-expand">
|
|
|
|
<a routerLink="../" [queryParams]=" { 'pageId': pageId }" class="uk-flex uk-flex-middle uk-h5 uk-link-reset">
|
|
|
|
<span class="uk-margin-right">
|
|
|
|
<icon name="west" ratio="1.7" [flex]="true"></icon>
|
|
|
|
</span>
|
|
|
|
<h1 *ngIf="page" class="uk-h5 uk-margin-remove">
|
|
|
|
{{page.name}} - {{pageHelpContent ? 'Update ' : 'Add new '}} page help text
|
|
|
|
<span *ngIf="myForm.dirty" class="uk-text-large"> (unsaved changes)</span>
|
|
|
|
</h1>
|
|
|
|
</a>
|
2021-03-02 16:52:09 +01:00
|
|
|
</div>
|
2023-03-29 14:43:56 +02:00
|
|
|
<div class="uk-width-auto">
|
|
|
|
<button class="uk-button uk-button-default uk-margin-right"
|
|
|
|
(click)="resetCustom()" [class.uk-disabled]="!myForm.dirty"
|
|
|
|
[disabled]="!myForm.dirty || showLoading">Reset
|
|
|
|
</button>
|
|
|
|
<button class="uk-button uk-button-primary" [class.uk-disabled]="myForm.invalid || !myForm.dirty || myForm.disabled"
|
|
|
|
(click)="saveCustom()" [disabled]="myForm.invalid ||!myForm.dirty || myForm.disabled || showLoading">Save
|
|
|
|
</button>
|
|
|
|
</div>
|
2021-03-02 16:52:09 +01:00
|
|
|
</div>
|
2022-07-13 19:25:19 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div inner>
|
2022-07-27 11:34:10 +02:00
|
|
|
<div class="uk-container">
|
2022-07-12 10:42:56 +02:00
|
|
|
<div *ngIf="myForm" style="min-height: 60vh"
|
2022-06-30 17:22:35 +02:00
|
|
|
class="uk-section uk-section-small uk-position-relative">
|
2022-06-27 14:50:21 +02:00
|
|
|
<div *ngIf="showLoading" class="uk-position-center">
|
|
|
|
<loading *ngIf="showLoading"></loading>
|
|
|
|
</div>
|
2022-07-12 10:42:56 +02:00
|
|
|
<form *ngIf="!showLoading" [formGroup]="myForm">
|
2022-06-27 14:50:21 +02:00
|
|
|
<div class="uk-grid uk-child-width-1-2">
|
2024-09-06 17:04:05 +02:00
|
|
|
<div *ngIf="placementsOptions.length > 1" input [formInput]="myForm.get('placement')"
|
2022-06-27 14:50:21 +02:00
|
|
|
placeholder="Select placement" [options]="placementsOptions" type="select"></div>
|
2024-06-11 13:09:49 +02:00
|
|
|
<div *ngIf="orderOptions.length > 1 " input [formInput]="myForm.get('order')" placeholder="Select order" [options]="orderOptions" type="select"></div>
|
2022-06-27 14:50:21 +02:00
|
|
|
</div>
|
|
|
|
<div class="form-group uk-margin-medium-top">
|
|
|
|
<span class="uk-text-bold uk-margin-small-right">Select Status (Enable/ disable)</span>
|
|
|
|
<mat-slide-toggle [checked]="myForm.get('isActive').value"
|
|
|
|
(change)="changeStatus()"
|
2022-06-30 12:40:37 +02:00
|
|
|
uk-tooltip="title:<div><div class='uk-text-bold'> Enable or disable help text to show or hide it from the dashboard</div></div>"
|
2022-06-27 14:50:21 +02:00
|
|
|
></mat-slide-toggle>
|
|
|
|
</div>
|
|
|
|
<div class="form-group uk-margin-large-top"
|
|
|
|
[ngClass]="{'has-error':!myForm.controls.content.valid &&
|
|
|
|
myForm.controls.content.dirty}">
|
2022-07-27 11:34:10 +02:00
|
|
|
<div class="uk-text-bold uk-margin-bottom uk-flex uk-flex-middle">
|
|
|
|
<span class="uk-margin-small-right">Content</span>
|
|
|
|
<button class="uk-button uk-button-link uk-text-normal"><icon name="info" type="outlined" [flex]="true"></icon></button>
|
|
|
|
<div class="uk-dropdown uk-text-normal uk-width-medium uk-padding-small" uk-dropdown>
|
|
|
|
OpenAIRE style guide is based on <a href="https://getuikit.com/docs/introduction" target="_blank" class="uk-link custom-external">UIKit</a>.
|
2022-11-29 17:11:29 +01:00
|
|
|
You can find some usage examples
|
|
|
|
<a *ngIf="properties.dashboard == 'monitor'" routerLink="/theme" [queryParams]="parentClass?{parentClass: parentClass}:null"
|
|
|
|
target="_blank" class="uk-link custom-external">here</a>
|
|
|
|
<a *ngIf="properties.dashboard == 'connect'" [href] ="'https://'+(properties.environment == 'beta' ? 'beta.' : '')+this.portal+'.openaire.eu/theme'"
|
|
|
|
target="_blank" class="uk-link custom-external">here</a>
|
2022-07-27 11:34:10 +02:00
|
|
|
in order to style your content.
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div [ngClass]="parentClass">
|
2023-03-29 14:43:56 +02:00
|
|
|
<ckeditor #ckEditor (change)="contentChanged()"
|
2022-06-27 14:50:21 +02:00
|
|
|
[readonly]="false"
|
|
|
|
debounce="500"
|
2022-08-02 22:13:12 +02:00
|
|
|
[formControl]="myForm.get('content')"
|
2022-06-27 14:50:21 +02:00
|
|
|
[config]="{ extraAllowedContent: '* [uk-*](*) ; span', disallowedContent: 'script; *[on*]',
|
|
|
|
removeButtons: 'Save,NewPage,DocProps,Preview,Print,' +
|
|
|
|
'Form,Checkbox,Radio,TextField,Textarea,Select,Button,ImageButton,HiddenField,' +
|
|
|
|
'CreateDiv,Flash,PageBreak,' +
|
|
|
|
'Subscript,Superscript,Anchor,Smiley,Iframe,Styles,Font,About,Language',
|
2022-07-27 11:34:10 +02:00
|
|
|
extraPlugins: 'divarea', height: 500}">
|
2022-06-27 14:50:21 +02:00
|
|
|
</ckeditor>
|
2021-03-02 16:52:09 +01:00
|
|
|
</div>
|
2021-02-25 16:55:56 +01:00
|
|
|
</div>
|
2022-06-27 14:50:21 +02:00
|
|
|
</form>
|
2019-12-20 12:38:13 +01:00
|
|
|
</div>
|
2022-07-12 10:42:56 +02:00
|
|
|
</div>
|
2021-03-02 16:52:09 +01:00
|
|
|
</div>
|
2021-02-25 16:55:56 +01:00
|
|
|
</div>
|