Commit e94944ab authored by George Kalampokis's avatar George Kalampokis
Browse files

Merge remote-tracking branch 'origin/Development' into Development

parents 78186fb9 92b60c7c
......@@ -110,7 +110,7 @@ public class MetricsManager {
calculateValue("argos_managed_dataset_descriptions", (int) datasetManager.countAllPublic(), "published");
calculateValue("argos_managed_dataset_descriptions", (int) datasetManager.countAllWithDoi(), "doied");
calculateValue("argos_dataset_templates", (int) datasetProfileManager.countAlldraft(), "total");
calculateValue("argos_dataset_templates", (int) datasetProfileManager.countAlldraft(), "draft");
calculateValue("argos_dataset_templates", (int) datasetProfileManager.countAllFinalized(), "active");
calculateValue("argos_dataset_templates", (int) datasetProfileManager.countAllUsed(), "used");
......
......@@ -76,7 +76,7 @@
</mat-form-field>
</div>
</div>
<div style="position: relative;" class="col-8">
<div style="position: relative;" class="col-12">
<ng-container *ngIf="hasFocus">
......@@ -116,9 +116,6 @@
</div>
</ng-container>
</div>
......@@ -128,7 +125,7 @@
<!-- FIELDS -->
<div class="col">
<div class="">
<div>
<ng-container *ngFor="let field of form.get('fields')['controls']; let i=index" >
<div class="row bg-white" style="position: relative;" (click)="setTargetField(field)"
>
......@@ -183,15 +180,15 @@
<!-- PREVIEW -->
<div class="col-12" >
<div class="mb-1" *ngIf="hasFocus" class="d-flex" style="justify-content: space-between;">
<span style="font-weight: bold;">{{'DATASET-PROFILE-EDITOR.ACTIONS.FIELD.PREVIEW' | translate}}</span>
<div class="col-12 previewer">
<div *ngIf="hasFocus" class="d-flex mb-3" style="justify-content: space-between;">
<span style="font-weight: bold; font-style: italic;">{{'DATASET-PROFILE-EDITOR.ACTIONS.FIELD.PREVIEW' | translate}}</span>
<span [@fadeElement]="updatedClass" *ngIf="firstField?.get('viewStyle').get('renderStyle').value">
<ng-container *ngIf="!previewDirty">
Preview updated!
{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.STATUS.PREVIEW-UPDATED' | translate}}
</ng-container>
<ng-container *ngIf="previewDirty">
... caculating preview
{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.STATUS.CALCULATING-PREVIEW' | translate}}
</ng-container>
</span>
</div>
......@@ -208,6 +205,8 @@
</em>
</div>
</div>
<div class="col-12">
<hr *ngIf="hasFocus">
</div>
</div>
......@@ -222,8 +221,11 @@
<li class="list-inline-item" *ngIf="!viewOnly">
<img src="/assets/images/editor/icons/add_input_set.svg" [matMenuTriggerFor]="inputmenu" style="width: 18px;transform: translateY(-1px);" [matTooltip]="'DATASET-PROFILE-EDITOR.ACTIONS.FIELDSET.ADD-INPUT' | translate" class="input_icon" alt="Add Input icon">
<span [matMenuTriggerFor]="inputmenu" class="inputMenuTrigger">
<img src="/assets/images/editor/icons/add_input.svg" style="width: 18px;transform: translateY(-1px);" class="input_icon" alt="'DATASET-PROFILE-EDITOR.ACTIONS.FIELDSET.ADD-INPUT' | translate"/>
<span class="fieldset-new-input-action">{{'DATASET-PROFILE-EDITOR.ACTIONS.FIELDSET.ADD-INPUT' | translate}}</span>
</span>
<!-- <mat-icon [matMenuTriggerFor]="inputmenu" [matTooltip]="'DATASET-PROFILE-EDITOR.ACTIONS.FIELDSET.ADD-INPUT' | translate">folder</mat-icon> -->
<mat-menu #inputmenu="matMenu" [class]="'add_input_menu'">
......
......@@ -91,8 +91,29 @@ $blue-color-light: #5cf7f2;
color: #212121;
transform: translateY(3px);
}
.mat-checkbox-frame{
border: 1px solid $blue-color ;
}
}
.fieldset-new-input-action {
font-size: 0.8em;
font-weight: 400;
color: #212121;
display: inline-block;
transform: translateY(1px);
}
.inputMenuTrigger {
margin-bottom: 0.3rem;
display: inline-block;
}
.previewer{
background-color: #129d9811;
padding: 2em;
border: 1px solid #70707015;
border-radius: 4px;
}
.input_icon{
width: 14px;
......
<ng-container *ngIf="expandView">
<!-- ACTIONS PER FIELD -->
<div class="row justify-content-end mb-1 mt-1">
<div class="col-auto">
<div class="row justify-content-end mb-1 mt-3">
<div class="col-auto mr-2">
<ul class="list-unstyled list-inline d-flex align-items-center">
<li class="list-inline-item" >
<mat-slide-toggle class="field-toggler" [checked]="isRequired" (change)="toggleRequired($event)" labelPosition="before" [matTooltip]="'DATASET-PROFILE-EDITOR.ACTIONS.FIELD.MAKE-IT-REQUIRED' | translate" [disabled]="!viewType">
{{'GENERAL.VALIDATION.REQUIRED' | translate}}
</mat-slide-toggle>
</li>
<li class="list-inline-item" *ngIf="!viewOnly && viewType && canApplyVisibility">
<!-- <li class="list-inline-item" *ngIf="!viewOnly && viewType && canApplyVisibility">
<mat-icon style="cursor: pointer;" (click)="addNewRule()" [matTooltip]="'DATASET-PROFILE-EDITOR.ACTIONS.FIELD.ADD-VISIBILITY-RULE' | translate">visibility</mat-icon>
</li>
<li class="list-inline-item" *ngIf="!viewOnly && viewType && canBeDeleted">
<mat-icon style="cursor: pointer;" (click)="onDelete()" [matTooltip]="'DATASET-PROFILE-EDITOR.ACTIONS.FIELD.DELETE-INPUT' | translate">delete</mat-icon>
</li> -->
<li class="list-inline-item" *ngIf="!viewOnly && viewType && canBeDeleted" class="text-muted">
<mat-icon style="cursor: pointer; opacity: 0.7; transform:translateY(2px) translateX(10px) ;" (click)="onDelete()" [matTooltip]="'DATASET-PROFILE-EDITOR.ACTIONS.FIELD.DELETE-INPUT' | translate">delete</mat-icon>
</li>
</ul>
......@@ -29,7 +29,7 @@
<mat-error *ngIf="this.form.get('id').hasError('pattern')">{{'GENERAL.VALIDATION.PATTERN-_' | translate}}</mat-error>
</mat-form-field> -->
<mat-form-field class="col">
<mat-form-field class="col-6">
<!-- <mat-select placeholder="{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.FIELDS.VIEW-STYLE' | translate}}" [formControl]="this.form.get('viewStyle').get('renderStyle')"
required>
<mat-option [value]="viewStyleEnum.TextArea">{{enumUtils.toDatasetProfileFieldViewStyleString(viewStyleEnum.TextArea)}}</mat-option>
......@@ -185,7 +185,7 @@
</mat-select>
</mat-form-field> -->
<mat-form-field class="col">
<mat-form-field class="col-6">
<mat-label>{{'DATASET-PROFILE-EDITOR.STEPS.FORM.COMPOSITE-FIELD.FIELDS.RDA-COMMON-STANDARDS' | translate}}</mat-label>
<mat-select [formControl]="this.form.get('rdaCommonStandard')">
<mat-option>--</mat-option>
......@@ -196,13 +196,33 @@
</mat-form-field>
<!-- Default Value -->
<app-component-profile-editor-default-value-component *ngIf="form.get('viewStyle').get('renderStyle').value" class="col-12"
<app-component-profile-editor-default-value-component *ngIf="form.get('viewStyle').get('renderStyle').value" class="col-6"
[viewStyle]="form.get('viewStyle').get('renderStyle').value" [form]="this.form.get('defaultValue').get('value')" [formArrayOptions]="form.get('data')?.get('options')"
[comboBoxType]="this.form.get('data')?.get('type')?.value" [internalDmpEntitiesType]="this.form.get('data')?.get('type')?.value"
placeHolder="{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.FIELDS.DEFAULT-VALUE' | translate}}">
</app-component-profile-editor-default-value-component>
<div class="col-12"></div>
<div class="col-auto mb-4 mt-2">
<div class="add-visibility-button" (click)="addNewRule()" *ngIf="!viewOnly && viewType && canApplyVisibility">
<img src="/assets/images/editor/icons/add_visibility_rule_2.svg" class="visibility-icon" alt="'DATASET-PROFILE-EDITOR.ACTIONS.FIELD.ADD-VISIBILITY-RULE' | translate">
<span>{{'DATASET-PROFILE-EDITOR.ACTIONS.FIELD.ADD-VISIBILITY-RULE' | translate}}</span>
</div>
</div>
</div>
<div class="row" *ngIf="this.form.get('viewStyle').get('renderStyle').value">
<ng-container *ngIf="form.get('visible').get('rules')?.value.length">
<h4 class="col-12" style="font-weight: bold">{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.FIELDS.RULES-TITLE' | translate}}
</h4>
<app-dataset-profile-editor-rule-component class="col-12" [form]="form.get('visible').get('rules')" [viewStyleForCheck]="form.get('viewStyle').get('renderStyle').value"
[formArrayOptionsForCheck]="this.form.get('data')?.get('options')" [comboBoxTypeForCheck]="this.form.get('data')?.get('type')?.value"
[viewOnly]="viewOnly"
[formControlForCheck]="form"></app-dataset-profile-editor-rule-component>
<!-- <div class="col-12" *ngIf="!viewOnly">
<button mat-button class="full-width" (click)="addNewRule()" [disabled]="!form.get('viewStyle').get('renderStyle').value">{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.ACTIONS.ADD-RULE' | translate}}</button>
</div> -->
</ng-container>
</div>
<div class="row" [ngSwitch]="form.get('viewStyle').get('renderStyle').value" *ngIf="expandView">
<app-dataset-profile-editor-combo-box-field-component *ngSwitchCase="viewStyleEnum.ComboBox" class="col-12" [form]="form"></app-dataset-profile-editor-combo-box-field-component>
<app-dataset-profile-internal-dmp-entities-field-component *ngSwitchCase="viewStyleEnum.InternalDmpEntities" class="col-12" [form]="form"></app-dataset-profile-internal-dmp-entities-field-component>
......@@ -226,27 +246,7 @@
<app-dataset-profile-editor-currency-field-component *ngSwitchCase="viewStyleEnum.Currency" class="col-12" [form]="form"></app-dataset-profile-editor-currency-field-component>
<app-dataset-profile-editor-validator-field-component *ngSwitchCase="viewStyleEnum.Validation" class="col-12" [form]="form"></app-dataset-profile-editor-validator-field-component>
</div>
<div class="row" *ngIf="this.form.get('viewStyle').get('renderStyle').value">
<ng-container *ngIf="form.get('visible').get('rules')?.value.length">
<h4 class="col-12" style="font-weight: bold">{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.FIELDS.RULES-TITLE' | translate}}
</h4>
<app-dataset-profile-editor-rule-component class="col-12" [form]="form.get('visible').get('rules')" [viewStyleForCheck]="form.get('viewStyle').get('renderStyle').value"
[formArrayOptionsForCheck]="this.form.get('data')?.get('options')" [comboBoxTypeForCheck]="this.form.get('data')?.get('type')?.value"
[viewOnly]="viewOnly"
[formControlForCheck]="form"></app-dataset-profile-editor-rule-component>
<!-- <div class="col-12" *ngIf="!viewOnly">
<button mat-button class="full-width" (click)="addNewRule()" [disabled]="!form.get('viewStyle').get('renderStyle').value">{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.ACTIONS.ADD-RULE' | translate}}</button>
</div> -->
</ng-container>
<!-- <div class="row">
<button (click)="generatePreview()">Generate Preview</button>
</div> -->
</div>
</ng-container>
......
......@@ -29,10 +29,38 @@ li.list-inline-item{
.mat-slide-toggle.mat-checked .mat-slide-toggle-thumb {
background-color:#129D99 ;
}
.mat-slide-toggle.mat-checked .mat-slide-toggle-bar {
background-color:rgba(0,178,159,0.34);
}
.mat-slide-toggle-bar{
height: 11.93px;
width: 26.42px;
}
.mat-slide-toggle-thumb-container{
top: -3px;
}
.mat-slide-toggle-thumb{
width: 16px;
height: 16px;
}
}
.input_icon{
width: 14px;
margin-right: 0.5em;
}
.visibility-icon{
width: 20px;
margin-right: 0.5em;
}
.add-visibility-button{
// display: flex;
// align-items: center;
width: auto;
cursor: pointer;
span{
font-weight: 400;
font-size: 0.8em;
}
}
\ No newline at end of file
......@@ -3,17 +3,25 @@
<div class="col-12" >
<div class="row">
<div class="row fieldset">
<!-- SECTION INFO -->
<mat-card style="margin-bottom: 2em; padding: 2em;" class="col-9">
<mat-card-content>
<app-dataset-profile-editor-section-component
[form]="form"
[viewOnly]="viewOnly"
>
</app-dataset-profile-editor-section-component>
</mat-card-content>
</mat-card>
<div class="col-9 p-0" style="margin-bottom:2em;">
<mat-card style="padding: 2em;">
<mat-card-content>
<app-dataset-profile-editor-section-component
[form]="form"
[viewOnly]="viewOnly"
>
</app-dataset-profile-editor-section-component>
</mat-card-content>
</mat-card>
<div class="row justify-content-center mt-4 mb-2">
<div class="col-auto add-question" (click)="addFieldSetAfter(-9999,0)" *ngIf="!viewOnly">
<img src="/assets/images/editor/icons/add_input_set.svg" class="question-icon mr-2" alt="Add Question icon">
<span>{{'DATASET-PROFILE-EDITOR.STEPS.TOOLKIT.NEW-INPUT-SET' | translate}}</span>
</div>
</div>
</div>
<div class="col-2 col-xl-auto ml-4" *ngIf="!selectedFieldSetId && !viewOnly">
<div class="row bg-white actions-list">
......@@ -38,8 +46,8 @@
<!-- FIELDSET INFO -->
<div class="col-12" dragula="FIELDSETS" [(dragulaModel)]="form.get('fieldSets').controls">
<div style="margin-bottom: 2em;" class="row"
*ngFor="let fieldset of form.get('fieldSets')?.controls ; let i=index"[id]="idprefix+fieldset.get('id').value"
<div style="margin-bottom: 2em; position: relative;" class="row fieldset"
*ngFor="let fieldset of form.get('fieldSets')?.controls ; let i=index" [id]="dragula_prefix+fieldset.get('id').value"
>
<!-- <h4 style="font-weight: bold" class="col-12">
{{'DATASET-PROFILE-EDITOR.STEPS.FORM.SECTION.FIELDS.FIELDS-TITLE' |
......@@ -52,26 +60,29 @@
(click)="deleteFieldSet(selectedTocEntry.form, i);" [disabled]="viewOnly">
<mat-icon>delete</mat-icon>
</button> -->
<mat-card class="col-9"
(click)="selectedFieldSetId = fieldset.get('id').value"
[ngClass]="{'field-container-active': fieldset.get('id').value === selectedFieldSetId}">
<mat-card-content>
<mat-card-header *ngIf="(fieldset.get('id').value === selectedFieldSetId) && !viewOnly">
<mat-icon class="handle" style="display:inline-block; margin: 0px auto; cursor: grab;transform: rotate(90deg);" cdkDragHandle>drag_indicator</mat-icon>
</mat-card-header>
<app-dataset-profile-editor-composite-field-component [form]="fieldset"
[viewOnly]="viewOnly"
[numbering]="numbering + '.'+ (i+1)"
[hasFocus]="fieldset.get('id').value === selectedFieldSetId">
</app-dataset-profile-editor-composite-field-component>
</mat-card-content>
</mat-card>
<div [id]="idprefix+fieldset.get('id').value" style="position: absolute; top: -7em; visibility: hidden;">
</div>
<div class="col-9 p-0">
<mat-card
(click)="selectedFieldSetId = fieldset.get('id').value"
[ngClass]="{'field-container-active': fieldset.get('id').value === selectedFieldSetId}">
<mat-card-content>
<mat-card-header *ngIf="(fieldset.get('id').value === selectedFieldSetId) && !viewOnly">
<mat-icon class="handle" style="display:inline-block; margin: 0px auto; cursor: grab;transform: rotate(90deg); opacity: 0.3;" cdkDragHandle>drag_indicator</mat-icon>
</mat-card-header>
<app-dataset-profile-editor-composite-field-component [form]="fieldset"
[viewOnly]="viewOnly"
[numbering]="numbering + '.'+ (i+1)"
[hasFocus]="fieldset.get('id').value === selectedFieldSetId">
</app-dataset-profile-editor-composite-field-component>
</mat-card-content>
</mat-card>
</div>
<div class="col-2 col-xl-auto ml-4" *ngIf="selectedFieldSetId === fieldset.get('id').value &&(!viewOnly)">
<div class="row bg-white actions-list">
<div class="row bg-white actions-list stick-list">
<nav *ngIf="!viewOnly">
<label class="action-list-label">{{'DATASET-PROFILE-EDITOR.STEPS.TOOLKIT.GENERAL-TOOLS' | translate}}</label>
<ul class="list-unstyled">
......@@ -102,6 +113,14 @@
</nav>
</div>
</div>
<div class="col-9">
<div class="row justify-content-center mt-4 mb-2">
<div class="col-auto add-question" (click)="addFieldSetAfter(fieldset.get('ordinal').value, i)" *ngIf="!viewOnly">
<img src="/assets/images/editor/icons/add_input_set.svg" class="question-icon mr-2" alt="Add Question icon">
<span>{{'DATASET-PROFILE-EDITOR.STEPS.TOOLKIT.NEW-INPUT-SET' | translate}}</span>
</div>
</div>
</div>
<!-- </div> -->
......
......@@ -9,9 +9,28 @@ $blue-color-light: #5cf7f2;
.fieldset-actions-list li{
cursor: pointer;
}
.fieldset{
.add-question{
cursor: pointer;
visibility: hidden;
transition-property: visibility;
transition-delay: 20ms;
transition-timing-function: ease;
transition-duration: 200ms;
}
}
.fieldset:hover{
.add-question{
visibility: visible;
}
}
.question-icon{
width: 20px;
}
.stick-list{
position: sticky;
top: 7em;
}
.actions-list{
// border: 1px solid $blue-color;
// box-shadow: 0px 3px 12px #129D9999;
......@@ -20,6 +39,7 @@ $blue-color-light: #5cf7f2;
padding: 1em 0.9em;
padding-bottom: 3em;
min-width: 166px;
box-shadow: 0px 2px 1px -1px rgb(0 0 0 / 20%), 0px 1px 1px 0px rgb(0 0 0 / 14%), 0px 1px 3px 0px rgb(0 0 0 / 12%);
.mat-list-item-content{
padding: 0px;
......
import { OnDestroy } from '@angular/core';
import { Component, ElementRef, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges } from '@angular/core';
import { FormArray, FormGroup } from '@angular/forms';
import { Guid } from '@common/types/guid';
import { DragulaService } from 'ng2-dragula';
import { Subscription } from 'rxjs';
import { FieldEditorModel } from '../../../admin/field-editor-model';
import { FieldSetEditorModel } from '../../../admin/field-set-editor-model';
import { ToCEntry, ToCEntryType } from '../../../table-of-contents/table-of-contents-entry';
@Component({
......@@ -30,6 +33,7 @@ export class DatasetProfileEditorSectionFieldSetComponent implements OnInit, OnC
// @Output() fieldsetAdded = new EventEmitter<String>(); //returns the id of the fieldset added
idprefix = "id";
readonly dragula_prefix = "dragulaid";
private subs = new Subscription();
private FIELDSETS = 'FIELDSETS';
constructor(
......@@ -45,7 +49,7 @@ export class DatasetProfileEditorSectionFieldSetComponent implements OnInit, OnC
this.dragulaService.createGroup(this.FIELDSETS,{
moves:(el, container, handle)=>{
// if(this.viewOnly) return false; //uncomment if want to unable drag n drop in viewonly mode
if(el.id != (this.idprefix+this.tocentry.id)) return false;
if(el.id != (this.dragula_prefix+this.tocentry.id)) return false;
if(handle.className && handle.classList.contains('handle')) return true;
return false;
}
......@@ -145,7 +149,7 @@ export class DatasetProfileEditorSectionFieldSetComponent implements OnInit, OnC
setTimeout(() => {
const el = this.myElement.nativeElement.querySelector("#"+this.idprefix+id);
if(el){
el.scrollIntoView({behavior: "smooth", block:'end'});
el.scrollIntoView({behavior: "smooth", block:'start'});
}
}, 700);
}
......@@ -155,10 +159,9 @@ export class DatasetProfileEditorSectionFieldSetComponent implements OnInit, OnC
setTimeout(() => {
const el = this.myElement.nativeElement.querySelector('#topofcontainer');
if(el){
el.scrollIntoView({behavior:'smooth'})
el.scrollIntoView({behavior:'smooth', block:'end'})
}
},200);
}
ngOnInit() {
......@@ -175,6 +178,38 @@ export class DatasetProfileEditorSectionFieldSetComponent implements OnInit, OnC
this.addNewFieldSet.emit(this.form);
}
addFieldSetAfter(afterOrdinal: number, afterIndex: number):void{
const field: FieldEditorModel = new FieldEditorModel();
field.id = Guid.create().toString();
field.ordinal = 0;//first filed in the fields list
const fieldForm = field.buildForm();
//give fieldset id and ordinal
const fieldSet: FieldSetEditorModel = new FieldSetEditorModel();
const fieldSetId = Guid.create().toString();
fieldSet.id = fieldSetId;
fieldSet.ordinal = afterOrdinal < 0? 0 :afterOrdinal;
const parentArray = this.form.get('fieldSets') as FormArray;
parentArray.controls.forEach(fieldset=>{
const ordinalControl = fieldset.get('ordinal');
const ordinalValue = ordinalControl.value;
if(ordinalValue > afterOrdinal){
ordinalControl.setValue(ordinalValue +1);
}
});
const fieldsetForm = fieldSet.buildForm();
(fieldsetForm.get('fields') as FormArray).push(fieldForm);
const index = afterOrdinal < 0 ? 0: afterIndex +1;
parentArray.insert(index, fieldsetForm);
this.dataNeedsRefresh.emit();
setTimeout(() => {
this.selectedFieldSetId = fieldSetId;
}, 200);
}
private _findTocEntryById(id: string, tocentries: ToCEntry[]): ToCEntry{
if(!tocentries){
return null;
......
......@@ -135,7 +135,7 @@
<ng-container *ngIf="!isDragging">
<!-- <div *ngIf="links && !viewOnly && !(parentLink?.subEntriesType == tocEntryType.Page) " > -->
<ng-container *ngIf="selectedItemInLinks && (link.type != tocEntryType.Page) && isLast && (!viewOnly) &&(link.type != tocEntryType.FieldSet)">
<ng-container *ngIf="selectedItemInLinks && (link.type != tocEntryType.Page) && isLast && (!viewOnly)">
<button class="mat-button add-new-entry" style="padding-left: 0px;" (click)="createNewEntry({childType:link.type,parent:parentLink})">
<!-- <mat-icon>add</mat-icon> -->
<ng-container [ngSwitch]="link.type">
......@@ -153,7 +153,8 @@
Section
</ng-container> -->
<ng-container *ngSwitchCase="tocEntryType.FieldSet">
Field +
<img src="/assets/images/editor/icons/add_input_set.svg" alt="" style="margin-left: 0.1em;" class="add-input-icon">
{{'DATASET-PROFILE-EDITOR.STEPS.TOOLKIT.NEW-INPUT-SET' | translate}}
</ng-container>
</ng-container>
......@@ -178,6 +179,12 @@
<!-- BUILD SUBENTRIES IF THEY DONT EXIST -- CURRENT ITEM DOES HAVE CHILDREN -->
<div *ngIf="(!links && parentLink.type!= tocEntryType.FieldSet) && !viewOnly &&parentLink?.id == itemSelected?.id" class="docs-link mt-0">
<div class="ml-3">
<!-- Give option to generate fieldset (only if parent is section) -->
<button *ngIf="parentLink.type == tocEntryType.Section" class="mat-button" style="padding-left: 0px;" (click)="createNewEntry({childType:tocEntryType.FieldSet,parent:parentLink})">
<img src="/assets/images/editor/icons/add_input_set.svg" alt="" style="margin-left: -0.2em;" class="add-input-icon">
{{'DATASET-PROFILE-EDITOR.STEPS.TOOLKIT.NEW-INPUT-SET' | translate}}
</button>
<!-- Give option to generate section -->
<button class="mat-button" style="padding-left: 0px; display: block;" (click)="createNewEntry({childType:tocEntryType.Section,parent:parentLink})">
......@@ -193,11 +200,7 @@
</button>
<!-- Give option to generate fieldset (only if parent is section) -->
<!-- <button *ngIf="parentLink.type == tocEntryType.Section" class="mat-button" style="padding-left: 0px;" (click)="createNewEntry({childType:tocEntryType.FieldSet,parent:parentLink})">
Field +
</button> -->
</div>
......
......@@ -111,3 +111,6 @@ $yellow: #f7dd72;
font-weight: bold;
// color: red;
}
.add-input-icon{
width: 20px;
}
\ No newline at end of file