2021-02-15 18:16:48 +01:00
|
|
|
|
<!-- View Only : {{viewOnly}} -->
|
|
|
|
|
|
2021-04-13 15:27:29 +02:00
|
|
|
|
<div class="main-content" id="main-content">
|
2019-06-05 16:07:36 +02:00
|
|
|
|
<div class="container-fluid dataset-profile-editor" *ngIf="form" [formGroup]='form'>
|
2021-02-12 12:23:39 +01:00
|
|
|
|
|
2021-04-07 18:03:22 +02:00
|
|
|
|
|
2021-02-12 12:23:39 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- Total steps: {{stepper.steps.length}} -->
|
|
|
|
|
|
2021-04-14 08:57:30 +02:00
|
|
|
|
<div class="row">
|
|
|
|
|
<div class="col-12 d-flex" id="title-column">
|
2021-04-07 18:03:22 +02:00
|
|
|
|
|
2021-04-14 08:57:30 +02:00
|
|
|
|
<div style="padding-left: 2em;">
|
2021-04-13 15:27:29 +02:00
|
|
|
|
<h3 *ngIf="isNew && !isClone && !isNewVersion">{{'DATASET-PROFILE-EDITOR.TITLE.NEW-PROFILE' | translate}}</h3>
|
|
|
|
|
<h3 *ngIf="isNew && isClone">
|
|
|
|
|
<span *ngIf="isClone">{{'DATASET-PROFILE-EDITOR.TITLE.NEW-PROFILE-CLONE' | translate}}</span>
|
|
|
|
|
{{form.get('label').value}}
|
|
|
|
|
</h3>
|
|
|
|
|
<h3 *ngIf="isNew && isNewVersion">
|
|
|
|
|
<span *ngIf="isNewVersion">{{'DATASET-PROFILE-EDITOR.TITLE.NEW-PROFILE-VERSION' | translate}}</span>
|
|
|
|
|
{{form.get('label').value}}
|
|
|
|
|
</h3>
|
|
|
|
|
|
|
|
|
|
<h3 *ngIf="!isNew">{{form.get('label').value}}</h3>
|
|
|
|
|
</div>
|
2021-04-14 08:57:30 +02:00
|
|
|
|
|
|
|
|
|
<!-- <div class="d-flex justify-content-end" style="gap: 1em">
|
2021-04-13 15:27:29 +02:00
|
|
|
|
<button mat-raised-button *ngIf="form.get('status').value==1" class="template_action_btn" (click)="downloadXML();" type="button" [@action-btn]>{{
|
2021-03-08 10:24:30 +01:00
|
|
|
|
'DATASET-WIZARD.ACTIONS.DOWNLOAD-XML' | translate }}</button>
|
2021-04-14 08:57:30 +02:00
|
|
|
|
|
2021-04-13 15:27:29 +02:00
|
|
|
|
<ng-container *ngIf="!viewOnly">
|
|
|
|
|
<button mat-raised-button class="template_action_btn" type="button"
|
|
|
|
|
*ngIf="stepper.selectedIndex !=2 && !newVersionId"
|
|
|
|
|
[@action-btn]
|
|
|
|
|
(click)='finalize()' [disabled]="!form.valid">{{'DATASET-PROFILE-EDITOR.ACTIONS.FINALIZE' |
|
|
|
|
|
translate}}</button>
|
|
|
|
|
<button mat-raised-button class="template_action_btn" type="button" [@action-btn]
|
|
|
|
|
*ngIf="!newVersionId || (newVersionId && stepper.selectedIndex !=2)"
|
|
|
|
|
(click)='onSubmit()' [disabled]="!form.valid">{{'DATASET-PROFILE-EDITOR.ACTIONS.SAVE' |
|
|
|
|
|
translate}}</button>
|
|
|
|
|
</ng-container>
|
|
|
|
|
<ng-container *ngIf="showUpdateButton()">
|
|
|
|
|
<button mat-raised-button class="template_action_btn" type="button"
|
|
|
|
|
*ngIf="stepper.selectedIndex !=2 && !newVersionId"
|
|
|
|
|
[@action-btn]
|
|
|
|
|
(click)='updateFinalized()' [disabled]="!form.valid">{{'DATASET-PROFILE-EDITOR.ACTIONS.UPDATE' |
|
|
|
|
|
translate}}</button>
|
|
|
|
|
</ng-container>
|
|
|
|
|
<ng-container *ngIf="!isNew">
|
|
|
|
|
<button mat-raised-button class="template_action_btn" (click)="delete()" [@action-btn]>
|
|
|
|
|
<mat-icon>delete</mat-icon>{{'DATASET-PROFILE-EDITOR.ACTIONS.DELETE' | translate}}
|
|
|
|
|
</button>
|
|
|
|
|
</ng-container>
|
2021-04-14 08:57:30 +02:00
|
|
|
|
</div> -->
|
2021-02-12 12:23:39 +01:00
|
|
|
|
</div>
|
2021-04-14 08:57:30 +02:00
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="row stepper-navigation-outer-wrapper" >
|
|
|
|
|
|
2021-02-12 12:23:39 +01:00
|
|
|
|
|
2021-03-08 10:24:30 +01:00
|
|
|
|
<!-- Steps Navigation -->
|
2021-04-14 08:57:30 +02:00
|
|
|
|
<div id="stepper-navigation-wrapper">
|
2021-04-13 15:27:29 +02:00
|
|
|
|
<div class="col-12 d-flex" *ngIf="steps" id="stepper-navigation">
|
2021-03-08 10:24:30 +01:00
|
|
|
|
<div class="col-7 bg-white" style="overflow: hidden; padding: 0px" id="progress-container">
|
|
|
|
|
<div id="progress" [ngStyle]="progressStyle"></div>
|
|
|
|
|
<div class="row h-100">
|
|
|
|
|
<div class="col text-center align-self-center" *ngFor="let step of steps; index as idx">
|
|
|
|
|
<span (click)="stepper.selectedIndex=idx"
|
|
|
|
|
class="stepper-title-label"
|
|
|
|
|
[ngClass]="{'stepper-title-label-locked': !isStepUnlocked(idx),'stepper-title-label-completed':idx < stepper.selectedIndex} ">
|
2021-03-12 17:19:51 +01:00
|
|
|
|
<ng-container *ngIf="(step.completed &&(idx!=steps.length-1)) else numberLabel">
|
2021-03-08 10:24:30 +01:00
|
|
|
|
<mat-icon style="font-size:0.7em; height: 0px;">done</mat-icon>
|
|
|
|
|
</ng-container>
|
|
|
|
|
<ng-template #numberLabel>
|
2021-04-07 18:03:22 +02:00
|
|
|
|
{{idx+1}}
|
2021-03-08 10:24:30 +01:00
|
|
|
|
</ng-template>
|
|
|
|
|
{{step.label}}
|
|
|
|
|
</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2021-04-07 18:03:22 +02:00
|
|
|
|
|
2021-04-13 15:27:29 +02:00
|
|
|
|
<div class="col d-flex justify-content-end" style="padding-right: 0px;">
|
2021-03-08 10:24:30 +01:00
|
|
|
|
<button [@previous_btn] mat-button class="navigate-btn" (click)="stepper.previous()" *ngIf="stepper.selectedIndex !=0">
|
|
|
|
|
<!-- <mat-icon>navigate_before</mat-icon> -->
|
2021-04-07 18:03:22 +02:00
|
|
|
|
{{'DMP-EDITOR.STEPPER.PREVIOUS' | translate}}
|
2021-03-08 10:24:30 +01:00
|
|
|
|
</button>
|
2021-04-07 18:03:22 +02:00
|
|
|
|
<button mat-button class="navigate-btn ml-3"
|
2021-09-09 08:09:27 +02:00
|
|
|
|
[@next_btn]
|
|
|
|
|
(click)="validateStep(stepper.selectedIndex);stepper.next();"
|
|
|
|
|
*ngIf="stepper.selectedIndex != (steps.length-1)"
|
|
|
|
|
[ngClass]="{'navigate-btn-disabled': !isStepCompleted(stepper.selectedIndex)}">
|
2021-04-07 18:03:22 +02:00
|
|
|
|
|
2021-03-08 10:24:30 +01:00
|
|
|
|
<mat-icon style="font-size: 1.66em;">navigate_next</mat-icon>{{'DMP-EDITOR.STEPPER.NEXT' | translate}}
|
|
|
|
|
</button>
|
2021-04-07 18:03:22 +02:00
|
|
|
|
|
|
|
|
|
|
2021-03-08 10:24:30 +01:00
|
|
|
|
<ng-container *ngIf="steps.length-1 === stepper.selectedIndex">
|
2021-04-13 15:27:29 +02:00
|
|
|
|
<button [@finalize_btn] mat-button class="finalize-btn ml-3"
|
|
|
|
|
[disabled]="!form.valid"
|
|
|
|
|
(click)="updateAndFinalize()"
|
|
|
|
|
>
|
|
|
|
|
|
|
|
|
|
<ng-container *ngIf="form.get('status').value==1">
|
|
|
|
|
<ng-container *ngIf="newVersionId else updateText">
|
|
|
|
|
{{'DATASET-PROFILE-EDITOR.ACTIONS.SAVE' |translate}}
|
|
|
|
|
</ng-container>
|
|
|
|
|
<ng-template #updateText>
|
|
|
|
|
{{'DATASET-PROFILE-EDITOR.ACTIONS.UPDATE' |translate}}
|
|
|
|
|
</ng-template>
|
2021-03-08 10:24:30 +01:00
|
|
|
|
</ng-container>
|
2021-04-13 15:27:29 +02:00
|
|
|
|
<ng-container *ngIf="form.get('status').value!=1">
|
|
|
|
|
{{'DATASET-PROFILE-EDITOR.ACTIONS.FINALIZE' |translate}}
|
|
|
|
|
</ng-container>
|
|
|
|
|
</button>
|
2021-02-25 13:17:47 +01:00
|
|
|
|
</ng-container>
|
2021-04-07 18:03:22 +02:00
|
|
|
|
|
|
|
|
|
|
2021-03-08 10:24:30 +01:00
|
|
|
|
</div>
|
2021-02-25 13:17:47 +01:00
|
|
|
|
|
2021-02-12 12:23:39 +01:00
|
|
|
|
</div>
|
2021-04-14 08:57:30 +02:00
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
2021-02-12 12:23:39 +01:00
|
|
|
|
</div>
|
|
|
|
|
|
2021-03-08 10:24:30 +01:00
|
|
|
|
|
2021-04-07 18:03:22 +02:00
|
|
|
|
|
|
|
|
|
|
2021-03-08 10:24:30 +01:00
|
|
|
|
<mat-horizontal-stepper [linear]="true" #stepper class="stepper" (selectionChange)="onMatStepperSelectionChange($event)" style="padding-left: 8px; padding-right: 15px;">
|
2021-02-12 15:27:35 +01:00
|
|
|
|
|
2021-03-12 17:19:51 +01:00
|
|
|
|
<!-- IMPORTANT TO BE !INVALID (WHEN THE TEMPLATE IS FINALIZED THE CONTORLS ARE DISABLED) -->
|
|
|
|
|
<mat-step [label]="'DATASET-PROFILE-EDITOR.STEPS.GENERAL-INFO.TITLE' | translate" [completed]="(!form.get('label').invalid && !form.get('description').invalid && !form.get('language').invalid)" >
|
2021-02-12 15:27:35 +01:00
|
|
|
|
<!-- <ng-template matStepLabel>{{'DATASET-PROFILE-EDITOR.STEPS.GENERAL-INFO.TITLE' | translate}}
|
|
|
|
|
</ng-template> -->
|
2021-02-03 11:21:31 +01:00
|
|
|
|
<div class="row">
|
2021-07-23 13:27:40 +02:00
|
|
|
|
<div class="col-3 side-actions">
|
2021-04-14 08:57:30 +02:00
|
|
|
|
<ng-container *ngTemplateOutlet="actions">
|
|
|
|
|
|
|
|
|
|
</ng-container>
|
2021-02-12 12:23:39 +01:00
|
|
|
|
</div>
|
2021-04-14 08:57:30 +02:00
|
|
|
|
<div class="col">
|
|
|
|
|
<div class="col-12">
|
|
|
|
|
<div class="heading">1.1 {{'DATASET-PROFILE-EDITOR.STEPS.GENERAL-INFO.DATASET-TEMPLATE-NAME'| translate}} *</div>
|
|
|
|
|
<div class="hint">{{'DATASET-PROFILE-EDITOR.STEPS.GENERAL-INFO.DATASET-TEMPLATE-NAME-HINT'| translate}}</div>
|
|
|
|
|
<mat-form-field class="full-width basic-info-input">
|
|
|
|
|
<input matInput [formControl]="form.get('label')"
|
|
|
|
|
placeholder="{{'DATASET-PROFILE-EDITOR.FIELDS.DATASET-TITLE' | translate}}">
|
|
|
|
|
<mat-error *ngIf="form.get('label').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' |
|
|
|
|
|
translate}}
|
|
|
|
|
</mat-error>
|
|
|
|
|
</mat-form-field>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-12">
|
|
|
|
|
<div class="heading">1.2 {{'DATASET-PROFILE-EDITOR.STEPS.GENERAL-INFO.DATASET-TEMPLATE-DESCRIPTION'| translate}} *</div>
|
|
|
|
|
<!-- <div class="hint">{{'DMP-EDITOR.MAIN-INFO.HINT' | translate}}</div> -->
|
|
|
|
|
<div class="hint">{{'DATASET-PROFILE-EDITOR.STEPS.GENERAL-INFO.DATASET-TEMPLATE-DESCRIPTION-HINT'| translate}}</div>
|
2021-10-12 17:14:22 +02:00
|
|
|
|
<div class="full-width basic-info-input">
|
|
|
|
|
<div class="editor-wrapper" [class]="(form.get('description').dirty && form.get('description').hasError('required')) ? 'required' : ''">
|
|
|
|
|
<angular-editor id="editor" class="editor" [formControl]="form.get('description')" [config]="editorConfig"
|
|
|
|
|
placeholder="{{'DATASET-PROFILE-EDITOR.STEPS.GENERAL-INFO.DATASET-TEMPLATE-DESCRIPTION-PLACEHOLDER' | translate}}"></angular-editor>
|
|
|
|
|
</div>
|
|
|
|
|
<div [class]="(form.get('description').dirty && form.get('description').hasError('required')) ? 'visible' : 'invisible'" class="mat-form-field form-field-subscript-wrapper">
|
|
|
|
|
<mat-error>
|
|
|
|
|
{{'GENERAL.VALIDATION.REQUIRED'| translate}}
|
|
|
|
|
</mat-error>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2021-04-14 08:57:30 +02:00
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="col-12">
|
|
|
|
|
<!-- <div class="heading">1.3 {{'DMP-EDITOR.FIELDS.LANGUAGE' | translate}}</div> -->
|
|
|
|
|
<div class="heading">1.3 {{'DATASET-PROFILE-EDITOR.STEPS.GENERAL-INFO.DATASET-TEMPLATE-LANGUAGE'| translate}} *</div>
|
|
|
|
|
<mat-form-field class="full-width basic-info-input">
|
|
|
|
|
<!-- <input matInput formControlName="description" placeholder="{{'DATASET-PROFILE-EDITOR.FIELDS.DATASET-DESCRIPTION' | translate}}" required> -->
|
|
|
|
|
<mat-select [formControl]="form.get('language')" placeholder="{{'DATASET-PROFILE-EDITOR.STEPS.GENERAL-INFO.DATASET-TEMPLATE-SELECT-LANGUAGE'| translate}}">
|
|
|
|
|
<mat-option *ngFor="let lang of getLanguageInfos()" [value]="lang.code">
|
|
|
|
|
{{ lang.name }}
|
|
|
|
|
</mat-option>
|
|
|
|
|
</mat-select>
|
|
|
|
|
<mat-error *ngIf="form.get('language').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' |
|
|
|
|
|
translate}}
|
|
|
|
|
</mat-error>
|
|
|
|
|
</mat-form-field>
|
|
|
|
|
</div>
|
2021-07-23 13:16:59 +02:00
|
|
|
|
<div class="col-12">
|
|
|
|
|
<div class="heading">1.4 {{'DATASET-PROFILE-EDITOR.STEPS.GENERAL-INFO.DATASET-TEMPLATE-USERS'| translate}}</div>
|
|
|
|
|
<div class="full-width basic-info-input">
|
|
|
|
|
<table class="col-12 user-table">
|
|
|
|
|
<thead class="user-table-header">
|
|
|
|
|
<tr>
|
|
|
|
|
<th>{{'USERS.LISTING.NAME' | translate}}</th>
|
|
|
|
|
<th>{{'USERS.LISTING.EMAIL' | translate}}</th>
|
|
|
|
|
<th></th>
|
|
|
|
|
</tr>
|
|
|
|
|
</thead>
|
|
|
|
|
<tbody class="user-table-body">
|
|
|
|
|
<tr *ngFor="let user of userChipList" class="user-table-row">
|
|
|
|
|
<td>{{user.name}}</td>
|
|
|
|
|
<td >{{user.email}}</td>
|
|
|
|
|
<td>
|
|
|
|
|
<button mat-button class="delete-btn" (click)="verifyAndRemoveUser(user)" [matTooltip]="'DATASET-PROFILE-EDITOR.STEPS.GENERAL-INFO.DATASET-TEMPLATE-REMOVE-USER'| translate"><mat-icon>person_remove</mat-icon></button>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr *ngIf="!userChipList || !userChipList.length">
|
|
|
|
|
<td style="text-align: end; line-height: 3em;" colspan="2" >
|
|
|
|
|
{{'DATASET-PROFILE-EDITOR.STEPS.GENERAL-INFO.DATASET-TEMPLATE-NO-USERS-YET' | translate}}
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
|
|
|
|
</div>
|
2021-04-09 16:05:01 +02:00
|
|
|
|
</div>
|
2021-07-23 13:16:59 +02:00
|
|
|
|
|
|
|
|
|
<div class="col-12">
|
|
|
|
|
<div class="row justify-content-end">
|
|
|
|
|
<div class="col d-flex justify-content-end" style="overflow: hidden;">
|
|
|
|
|
<div style="min-width: 20em;max-width: 25em;" [@add-new-user-field]="inputUserState">
|
|
|
|
|
<mat-form-field appearance="legacy">
|
|
|
|
|
<input matInput #email placeholder="{{'DATASET-PROFILE-EDITOR.STEPS.GENERAL-INFO.DATASET-TEMPLATE-USERS'| translate}}" (focus)="onUserFieldFocus()" (blur)="onUserFieldBlur()" (keyup.enter)="addUser(email)">
|
|
|
|
|
</mat-form-field>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="col-auto">
|
|
|
|
|
<button mat-mini-fab color="primary" (click)="addUser(email)" (focus)="onUserButtonFocus()" (blur)="onUserButtonBlur()" [matTooltip]="'DATASET-PROFILE-EDITOR.STEPS.GENERAL-INFO.DATASET-TEMPLATE-VALIDATE-AND-ADD-USER'| translate" [disabled]="userFormDisabled">
|
|
|
|
|
<ng-container *ngIf="inputUserState === 'untriggered' else triggericon">
|
|
|
|
|
<mat-icon>add</mat-icon>
|
|
|
|
|
</ng-container>
|
|
|
|
|
<ng-template #triggericon>
|
|
|
|
|
<mat-icon>person_add</mat-icon>
|
|
|
|
|
</ng-template>
|
|
|
|
|
</button>
|
2021-04-12 18:08:09 +02:00
|
|
|
|
</div>
|
2021-04-09 16:05:01 +02:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2021-07-23 13:16:59 +02:00
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
2021-02-12 12:23:39 +01:00
|
|
|
|
<!-- <div class="col-12">
|
2021-02-03 11:21:31 +01:00
|
|
|
|
<button mat-button class="full-width" (click)="addPage()"
|
|
|
|
|
[disabled]="viewOnly">{{'DATASET-PROFILE-EDITOR.ACTIONS.NEXT' | translate}}</button>
|
2021-02-12 12:23:39 +01:00
|
|
|
|
</div> -->
|
2021-02-03 11:21:31 +01:00
|
|
|
|
</div>
|
|
|
|
|
</mat-step>
|
2021-03-12 17:19:51 +01:00
|
|
|
|
<mat-step [label]="'DATASET-PROFILE-EDITOR.STEPS.FORM.TITLE' | translate" [completed]="form.valid">
|
2021-02-12 15:27:35 +01:00
|
|
|
|
<!-- <ng-template matStepLabel>{{'DATASET-PROFILE-EDITOR.STEPS.FORM.TITLE' | translate}}</ng-template> -->
|
2019-06-05 16:07:36 +02:00
|
|
|
|
<div class="row">
|
2021-02-12 12:23:39 +01:00
|
|
|
|
|
|
|
|
|
<!-- TABLE -->
|
|
|
|
|
<div class="col-3">
|
2021-02-24 15:56:14 +01:00
|
|
|
|
|
|
|
|
|
|
2021-07-21 15:41:38 +02:00
|
|
|
|
<div class="row sticky-top table-container" style="top : 7em;">
|
2021-04-07 18:03:22 +02:00
|
|
|
|
<dataset-profile-table-of-contents class="toc-pane-container col"
|
2021-04-14 08:57:30 +02:00
|
|
|
|
style="margin-bottom: 2em;"
|
2021-02-24 15:56:14 +01:00
|
|
|
|
[links]="toCEntries"
|
|
|
|
|
(itemClick)="displayItem($event)"
|
|
|
|
|
(createEntry) = "addNewEntry($event)"
|
|
|
|
|
(removeEntry)="onRemoveEntry($event)"
|
|
|
|
|
[itemSelected]="selectedTocEntry"
|
|
|
|
|
[viewOnly]="viewOnly"
|
2021-03-23 11:39:04 +01:00
|
|
|
|
(dataNeedsRefresh)="onDataNeedsRefresh($event)"
|
2021-03-12 17:19:51 +01:00
|
|
|
|
[colorizeInvalid]="colorizeInvalid">
|
2021-02-24 15:56:14 +01:00
|
|
|
|
</dataset-profile-table-of-contents>
|
2021-04-14 08:57:30 +02:00
|
|
|
|
<ng-container *ngIf="true then actions">
|
|
|
|
|
|
|
|
|
|
</ng-container>
|
2021-03-22 14:47:45 +01:00
|
|
|
|
|
2021-02-24 15:56:14 +01:00
|
|
|
|
</div>
|
2021-02-03 11:21:31 +01:00
|
|
|
|
</div>
|
2021-02-04 11:22:52 +01:00
|
|
|
|
|
2021-02-12 12:23:39 +01:00
|
|
|
|
|
|
|
|
|
<!-- DISPLAYER -->
|
2021-03-04 13:38:46 +01:00
|
|
|
|
<div class="col ml-3">
|
2021-02-24 15:56:14 +01:00
|
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
|
|
|
|
|
|
<div class="col">
|
|
|
|
|
<div class="row" *ngIf="selectedTocEntry">
|
2021-04-07 18:03:22 +02:00
|
|
|
|
|
2021-02-24 15:56:14 +01:00
|
|
|
|
<!-- PAGE INFO -->
|
2021-07-23 12:16:40 +02:00
|
|
|
|
<div class="col-12 content-displayer" *ngIf="selectedTocEntry.type === tocEntryEnumValues.Page" [@fade-in-fast]>
|
2021-03-04 13:38:46 +01:00
|
|
|
|
<form [formGroup]="selectedTocEntry.form" class="page-infos">
|
2021-02-24 15:56:14 +01:00
|
|
|
|
<div class="row">
|
|
|
|
|
<!-- PAGE NAME -->
|
2021-03-30 10:36:09 +02:00
|
|
|
|
<div class="col-12">
|
2021-02-24 15:56:14 +01:00
|
|
|
|
<div class="heading">{{'DATASET-PROFILE-EDITOR.STEPS.PAGE-INFO.PAGE-NAME' | translate}} *</div>
|
|
|
|
|
<div class="hint">{{'DATASET-PROFILE-EDITOR.STEPS.PAGE-INFO.PAGE-NAME-HINT' | translate}}</div>
|
|
|
|
|
<mat-form-field>
|
2021-03-29 17:42:55 +02:00
|
|
|
|
<input type="text" matInput formControlName="title" [placeholder]="('DATASET-PROFILE-EDITOR.STEPS.GENERAL-INFO.UNTITLED' | translate) +' '+ ('DATASET-PROFILE-EDITOR.STEPS.PAGE-INFO.PAGE' |translate)">
|
2021-03-12 17:19:51 +01:00
|
|
|
|
<mat-error >{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
2021-02-24 15:56:14 +01:00
|
|
|
|
</mat-form-field>
|
|
|
|
|
</div>
|
2021-04-07 18:03:22 +02:00
|
|
|
|
|
2021-03-30 10:36:09 +02:00
|
|
|
|
<div class="col-12" *ngIf="!viewOnly && (!selectedTocEntry?.subEntries?.length)">
|
2021-07-15 16:12:17 +02:00
|
|
|
|
<button class="create-section-btn" (click)="addNewEntry({parent:selectedTocEntry, childType: tocEntryEnumValues.Section})">{{'DATASET-PROFILE-EDITOR.STEPS.PAGE-INFO.ACTIONS.CREATE-SECTION' | translate}}</button>
|
2021-03-30 10:36:09 +02:00
|
|
|
|
</div>
|
2021-02-24 15:56:14 +01:00
|
|
|
|
<!-- PAGE ID -->
|
|
|
|
|
<!-- <div class="col">
|
|
|
|
|
<div class="heading">Page id *</div>
|
|
|
|
|
<mat-form-field>
|
|
|
|
|
<input type="text" matInput formControlName="id">
|
|
|
|
|
</mat-form-field>
|
|
|
|
|
</div> -->
|
2021-02-12 12:23:39 +01:00
|
|
|
|
</div>
|
2021-02-24 15:56:14 +01:00
|
|
|
|
<!-- <div class="row">
|
|
|
|
|
<div class="col">
|
|
|
|
|
<div class="heading">Ordinal *</div>
|
|
|
|
|
<mat-form-field>
|
|
|
|
|
<input type="text" matInput formControlName="ordinal">
|
|
|
|
|
</mat-form-field>
|
|
|
|
|
</div>
|
2021-02-12 12:23:39 +01:00
|
|
|
|
</div> -->
|
2021-02-24 15:56:14 +01:00
|
|
|
|
</form>
|
|
|
|
|
</div>
|
2021-04-07 18:03:22 +02:00
|
|
|
|
|
2021-02-24 15:56:14 +01:00
|
|
|
|
<div class="col-12" *ngIf="(selectedTocEntry.type === tocEntryEnumValues.Section) || (selectedTocEntry.type === tocEntryEnumValues.FieldSet)" >
|
|
|
|
|
<app-dataset-profile-editor-section-fieldset-component
|
|
|
|
|
[tocentry]="selectedTocEntry"
|
2021-02-12 12:23:39 +01:00
|
|
|
|
[viewOnly]="viewOnly"
|
2021-03-29 17:42:55 +02:00
|
|
|
|
(addNewFieldSet)="addNewEntry({childType: tocEntryEnumValues.FieldSet,parent: {form: $event}})"
|
|
|
|
|
(removeFieldSet)="onRemoveEntry(_findTocEntryById($event, toCEntries))"
|
|
|
|
|
(cloneFieldSet)="cloneFieldSet($event)"
|
2021-07-23 10:23:35 +02:00
|
|
|
|
(selectedEntryId)="displayItem(_findTocEntryById($event, toCEntries))"
|
2021-02-24 15:56:14 +01:00
|
|
|
|
(dataNeedsRefresh)="onDataNeedsRefresh()"
|
|
|
|
|
>
|
|
|
|
|
|
|
|
|
|
</app-dataset-profile-editor-section-fieldset-component>
|
|
|
|
|
</div>
|
2021-04-07 18:03:22 +02:00
|
|
|
|
|
|
|
|
|
|
2021-02-24 15:56:14 +01:00
|
|
|
|
</div>
|
2021-04-07 18:03:22 +02:00
|
|
|
|
|
2021-02-24 15:56:14 +01:00
|
|
|
|
<div class="content-displayer row justify-content-center" *ngIf="!numOfPages" style="min-height: 30em;">
|
2021-03-04 13:38:46 +01:00
|
|
|
|
<div class="col-auto align-self-center">
|
|
|
|
|
<div class="row w-100 justify-content-center">
|
|
|
|
|
<div class="col-auto">
|
|
|
|
|
{{'DATASET-PROFILE-EDITOR.STEPS.PAGE-INFO.ACTIONS.NOTHING-HERE-HINT'| translate}}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="row justify-content-center">
|
|
|
|
|
<div class="col-auto d-flex aling-contents-center">
|
|
|
|
|
{{'DATASET-PROFILE-EDITOR.STEPS.PAGE-INFO.ACTIONS.START-CREATING-PAGE-START'| translate}}
|
2021-04-07 18:03:22 +02:00
|
|
|
|
|
2021-03-04 13:38:46 +01:00
|
|
|
|
<mat-icon color="accent" style="font-size: 1.5em; text-align: center; width: 1.5em;">add</mat-icon>
|
|
|
|
|
<strong style="cursor: pointer;" (click)="addNewEntry({childType: tocEntryEnumValues.Page,parent: null})">
|
|
|
|
|
{{'DATASET-PROFILE-EDITOR.STEPS.PAGE-INFO.ACTIONS.START-CREATING-PAGE-END'| translate}}
|
|
|
|
|
</strong>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2021-02-24 15:56:14 +01:00
|
|
|
|
</div>
|
2021-02-04 11:22:52 +01:00
|
|
|
|
</div>
|
2021-04-07 18:03:22 +02:00
|
|
|
|
|
2021-02-12 12:23:39 +01:00
|
|
|
|
</div>
|
2021-04-07 18:03:22 +02:00
|
|
|
|
</div>
|
2021-02-03 11:21:31 +01:00
|
|
|
|
</div>
|
2021-02-12 12:23:39 +01:00
|
|
|
|
|
|
|
|
|
<!-- <div class="col-12">
|
2021-02-03 11:21:31 +01:00
|
|
|
|
<button mat-button (click)="addSection()" class="full-width"
|
|
|
|
|
[disabled]="viewOnly">{{'DATASET-PROFILE-EDITOR.ACTIONS.ADD-SECTION' | translate}}</button>
|
2021-02-12 12:23:39 +01:00
|
|
|
|
</div> -->
|
2019-06-05 16:07:36 +02:00
|
|
|
|
</div>
|
|
|
|
|
</mat-step>
|
2021-02-25 16:53:58 +01:00
|
|
|
|
<mat-step [label]="'DATASET-PROFILE-EDITOR.ACTIONS.PREVIEW-AND-FINALIZE' | translate">
|
2021-03-05 10:05:09 +01:00
|
|
|
|
<!-- {{'DATASET-PROFILE-EDITOR.ACTIONS.PREVIEW-AND-FINALIZE' | translate}} -->
|
2021-02-15 18:16:48 +01:00
|
|
|
|
<!-- <button (click)="generatePreviewForm()">foo</button> -->
|
2021-03-17 15:29:02 +01:00
|
|
|
|
<ng-container *ngIf="formGroup">
|
2021-04-14 08:57:30 +02:00
|
|
|
|
<div class="row">
|
|
|
|
|
<div class="col-3 sticky-top" style="display: flex; height: 40vh;">
|
2021-04-05 11:06:14 +02:00
|
|
|
|
|
2021-04-14 08:57:30 +02:00
|
|
|
|
<ng-container *ngTemplateOutlet="actions">
|
|
|
|
|
|
|
|
|
|
</ng-container>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col">
|
|
|
|
|
<app-final-preview-component [formGroup]="formGroup" [visibilityRules]="visibilityRules">
|
|
|
|
|
|
|
|
|
|
</app-final-preview-component>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2021-04-05 11:06:14 +02:00
|
|
|
|
|
|
|
|
|
|
2021-04-07 18:03:22 +02:00
|
|
|
|
<!--
|
2021-04-05 11:06:14 +02:00
|
|
|
|
|
2021-03-17 15:29:02 +01:00
|
|
|
|
<app-dataset-description [form]="formGroup" [visibilityRules]="visibilityRules" *ngIf="formGroup">
|
2021-04-07 18:03:22 +02:00
|
|
|
|
|
2021-04-05 11:06:14 +02:00
|
|
|
|
</app-dataset-description> -->
|
2021-02-17 18:44:50 +01:00
|
|
|
|
</ng-container>
|
2021-02-12 15:27:35 +01:00
|
|
|
|
</mat-step>
|
2021-02-03 11:21:31 +01:00
|
|
|
|
|
2019-06-05 16:07:36 +02:00
|
|
|
|
</mat-horizontal-stepper>
|
2021-04-07 18:03:22 +02:00
|
|
|
|
|
2021-02-12 12:23:39 +01:00
|
|
|
|
|
2021-07-23 12:16:40 +02:00
|
|
|
|
<!--
|
2021-04-13 15:27:29 +02:00
|
|
|
|
<ng-container *ngIf="false">
|
2021-02-12 12:23:39 +01:00
|
|
|
|
|
|
|
|
|
<div class="d-flex">
|
|
|
|
|
<div class="col-6 d-flex" *ngIf="!viewOnly">
|
|
|
|
|
<div class="row mt-4">
|
2021-03-22 14:47:45 +01:00
|
|
|
|
<ng-container *ngIf="false">
|
2021-03-01 17:42:18 +01:00
|
|
|
|
<button mat-raised-button class="col-auto mr-2" color="primary" type="button col-auto"
|
|
|
|
|
(click)='checkFormValidation()'
|
|
|
|
|
[disabled]="form.valid">{{'DATASET-PROFILE-EDITOR.ACTIONS.VALIDATE' | translate}}</button>
|
|
|
|
|
</ng-container>
|
|
|
|
|
|
|
|
|
|
|
2021-04-07 18:03:22 +02:00
|
|
|
|
|
2021-02-12 12:23:39 +01:00
|
|
|
|
<button mat-raised-button class="col-auto mr-2" color="primary" type="button col-auto"
|
|
|
|
|
(click)='onSubmit()' [disabled]="!form.valid">{{'DATASET-PROFILE-EDITOR.ACTIONS.SAVE' |
|
|
|
|
|
translate}}</button>
|
|
|
|
|
<button mat-raised-button class="col-auto" color="primary" type="button col-auto"
|
|
|
|
|
(click)='finalize()' [disabled]="!form.valid">{{'DATASET-PROFILE-EDITOR.ACTIONS.FINALIZE' |
|
|
|
|
|
translate}}</button>
|
|
|
|
|
</div>
|
2019-11-22 16:06:47 +01:00
|
|
|
|
</div>
|
2021-02-12 12:23:39 +01:00
|
|
|
|
<div class="col-6 d-flex" *ngIf="showUpdateButton()">
|
|
|
|
|
<div class="row mt-4">
|
2021-03-22 14:47:45 +01:00
|
|
|
|
<ng-container *ngIf="false">
|
|
|
|
|
<button mat-raised-button class="col-auto mr-2" color="primary" type="button col-auto"
|
|
|
|
|
(click)='checkFormValidation()'
|
|
|
|
|
[disabled]="form.valid">{{'DATASET-PROFILE-EDITOR.ACTIONS.VALIDATE' | translate}}</button>
|
|
|
|
|
</ng-container>
|
2021-02-12 12:23:39 +01:00
|
|
|
|
<button mat-raised-button class="col-auto mr-2" color="primary" type="button col-auto"
|
|
|
|
|
(click)='updateFinalized()' [disabled]="!form.valid">{{'DATASET-PROFILE-EDITOR.ACTIONS.UPDATE' |
|
|
|
|
|
translate}}</button>
|
|
|
|
|
</div>
|
2019-02-11 13:04:45 +01:00
|
|
|
|
</div>
|
2021-02-12 12:23:39 +01:00
|
|
|
|
<div class="col-6 d-flex justify-content-end" *ngIf="!isNew">
|
|
|
|
|
<div class="row mt-4">
|
|
|
|
|
<button mat-raised-button color="primary" (click)="delete()">
|
|
|
|
|
<mat-icon>delete</mat-icon>{{'DATASET-PROFILE-EDITOR.ACTIONS.DELETE' | translate}}
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
2019-06-21 17:06:30 +02:00
|
|
|
|
</div>
|
2019-02-11 13:04:45 +01:00
|
|
|
|
</div>
|
2021-02-12 12:23:39 +01:00
|
|
|
|
|
2021-07-23 12:16:40 +02:00
|
|
|
|
</ng-container> -->
|
2021-03-12 17:19:51 +01:00
|
|
|
|
|
2021-04-13 15:27:29 +02:00
|
|
|
|
<div class="scroll-on-top">
|
|
|
|
|
<button mat-fab (click)="scrollOnTop()" *ngIf="showScrollOnTopButton" [@scroll-on-top-btn] [matTooltip]="'DATASET-PROFILE-EDITOR.ACTIONS.BACK-TO-TOP'| translate">
|
|
|
|
|
<mat-icon>
|
|
|
|
|
keyboard_arrow_up
|
|
|
|
|
</mat-icon>
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
|
2021-03-12 17:19:51 +01:00
|
|
|
|
<!-- <div class="row">
|
2021-02-12 12:23:39 +01:00
|
|
|
|
<button (click)="printForm()">
|
|
|
|
|
console form
|
|
|
|
|
</button>
|
2021-03-01 17:42:18 +01:00
|
|
|
|
</div> -->
|
2021-03-12 17:19:51 +01:00
|
|
|
|
|
2021-03-27 18:52:53 +01:00
|
|
|
|
<!-- <div *ngIf="form">{{form.value | json}}</div>
|
|
|
|
|
|
|
|
|
|
<br> -->
|
|
|
|
|
<!-- <br>
|
2021-03-12 17:19:51 +01:00
|
|
|
|
<div class="row">
|
|
|
|
|
{{form.controls?.sections.value |json}}
|
|
|
|
|
</div> -->
|
2021-03-08 10:24:30 +01:00
|
|
|
|
|
|
|
|
|
<!-- {{form.value | json}} -->
|
2021-03-01 17:42:18 +01:00
|
|
|
|
<!-- <div class="row">
|
2021-03-01 10:28:27 +01:00
|
|
|
|
|
|
|
|
|
<button (click)="printMyErrors()">
|
|
|
|
|
print errors
|
|
|
|
|
</button>
|
2021-03-01 17:42:18 +01:00
|
|
|
|
</div> -->
|
2021-04-07 18:03:22 +02:00
|
|
|
|
<!-- <div class="row">
|
2021-02-15 18:16:48 +01:00
|
|
|
|
<button (click)="foo()">foo</button>
|
|
|
|
|
</div> -->
|
2019-02-06 12:10:44 +01:00
|
|
|
|
</div>
|
2021-04-07 18:03:22 +02:00
|
|
|
|
</div>
|
2021-04-14 08:57:30 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<ng-template #actions>
|
|
|
|
|
<div class="actions-template">
|
|
|
|
|
<button mat-raised-button class="template_action_btn" (click)="discardChanges()">{{'DMP-EDITOR.ACTIONS.DISCARD' | translate}}</button>
|
|
|
|
|
<button mat-raised-button class="template_action_btn save-btn" (click)="onSubmit()" [disabled]="!form.valid || viewOnly">{{'DATASET-PROFILE-EDITOR.ACTIONS.SAVE' |translate}}</button>
|
|
|
|
|
</div>
|
|
|
|
|
</ng-template>
|