argos/dmp-frontend/src/app/ui/dmp/clone/clone-dialog/clone-dialog.component.html

78 lines
3.8 KiB
HTML
Raw Normal View History

2020-09-03 17:49:45 +02:00
<div class="clone-dialog">
2020-10-26 16:31:39 +01:00
<div mat-dialog-title class="row d-flex m-0">
<div *ngIf="!data.isNewVersion" class="heading-1">{{'DMP-EDITOR.TITLE.CLONE-DMP' | translate}}</div>
<div *ngIf="data.isNewVersion" class="heading-1">{{'DMP-EDITOR.TITLE.NEW-VERSION' | translate}}</div>
<span class="ml-auto align-self-center" (click)="close()"><mat-icon class="close-icon">close</mat-icon></span>
</div>
2020-09-03 17:49:45 +02:00
<!-- Title Field -->
<div class="row">
<div class="col-12">
<div class="heading">{{'DMP-EDITOR.FIELDS.NAME' | translate}}*</div>
<div class="title-form">
<mat-form-field>
<input matInput placeholder="{{'DMP-EDITOR.FIELDS.NAME' | translate}}" type="text" name="label" [formControl]="this.data.formGroup.get('label')" required>
<mat-error *ngIf="this.data.formGroup.get('label').hasError('backendError')">
{{this.data.formGroup.get('label').getError('backendError').message}}</mat-error>
<mat-error *ngIf="this.data.formGroup.get('label').hasError('required')">
{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
</mat-form-field>
</div>
</div>
</div>
<!-- Description field -->
<div class="row">
<div class="col-12 pb-4">
2020-09-03 17:49:45 +02:00
<div class="heading">{{'DMP-EDITOR.FIELDS.DESCRIPTION' | translate}}</div>
<div class="hint">{{'DMP-EDITOR.MAIN-INFO.HINT' | translate}}</div>
<div class="full-width basic-info-input">
<rich-text-editor-component [parentFormGroup]="data.formGroup" [controlName]="'description'"
[placeholder]="'DMP-EDITOR.PLACEHOLDER.DESCRIPTION'"
[editable]="data.formGroup.controls['description'].status !== 'DISABLED'">
</rich-text-editor-component>
2020-09-03 17:49:45 +02:00
</div>
</div>
</div>
<!-- Profiles -->
<div class="row" *ngIf="data.isNewVersion">
<div class="col-12">
<div class="heading">{{'DMP-EDITOR.FIELDS.TEMPLATES' | translate}}</div>
<mat-form-field>
<mat-label>{{'DMP-EDITOR.FIELDS.SELECT-TEMPLATE' | translate}}</mat-label>
<app-multiple-auto-complete required='true' [formControl]="this.data.formGroup.get('profiles')" [configuration]="profilesAutoCompleteConfiguration" (optionActionClicked)="onPreviewTemplate($event)">
2020-09-03 17:49:45 +02:00
</app-multiple-auto-complete>
<mat-error *ngIf="data.formGroup.get('profiles').hasError('backendError')">
{{data.formGroup.get('profiles').getError('backendError').message}}</mat-error>
<mat-error *ngIf="data.formGroup.get('profiles').hasError('required')">
{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
<!-- <button matSuffix class="input-btn" [disabled]="data.formGroup.get('profiles').disabled" (click)="allAvailableProfiles($event)">
<mat-icon class="icon-btn">view_list</mat-icon>
</button> -->
</mat-form-field>
</div>
</div>
<!-- Datasets -->
<div class="row">
<div class="col-12">
<div class="heading">{{'DMP-EDITOR.FIELDS.DATASETS' | translate}}</div>
<div *ngIf="hasDatasets()">
<h5>{{'DATASET-LISTING.SELECT-DATASETS-TO-CLONE' | translate}}</h5>
<mat-card class="mat-card">
<mat-selection-list #selectedItems (selectionChange)="selectionChanged(selectedItems)">
<mat-list-option *ngFor="let dataset of data.datasets;" [value]="dataset.id">
<span class="text-truncate" [matTooltip]="dataset.label">{{dataset.label}}</span>
2020-09-03 17:49:45 +02:00
</mat-list-option>
</mat-selection-list>
</mat-card>
</div>
<div *ngIf="!hasDatasets()">
<h5 mat-subheader class="p-3">{{'DATASET-LISTING.SELECT-DATASETS-NONE' | translate}}</h5>
</div>
</div>
</div>
<div class="row pt-4">
<div class="col"></div>
2020-10-26 16:31:39 +01:00
<div class="col-auto"><button mat-raised-button type="button" class="cancel-btn" (click)="cancel()">{{ data.cancelButton }}</button></div>
<div class="col-auto"><button mat-raised-button type="button" class="confirm-btn" (click)="confirm()" color="accent">{{ data.confirmButton }}</button></div>
2020-09-03 17:49:45 +02:00
</div>
</div>