2018-01-17 12:57:41 +01:00
|
|
|
<div class="dataset-wizard">
|
2018-05-28 11:50:42 +02:00
|
|
|
<h3 *ngIf="isNew">New {{datasetWizardModel?.dmp?.project?.label}} Dataset</h3>
|
|
|
|
<h3 *ngIf="!isNew">{{datasetWizardModel?.dmp?.project?.label}} Dataset</h3>
|
|
|
|
<div class="flex-container">
|
|
|
|
|
2018-01-26 16:50:16 +01:00
|
|
|
<button mat-raised-button color="primary" *ngIf="datasetWizardModel&&datasetWizardModel?.status != 1" style="margin-top: 15px;margin-bottom: 15px;margin-right: 15px;"
|
2018-05-28 11:50:42 +02:00
|
|
|
(click)="save();" type="button">Save</button>
|
|
|
|
|
2018-01-26 16:50:16 +01:00
|
|
|
<button mat-raised-button color="primary" *ngIf="datasetWizardModel&&datasetWizardModel?.status != 1" style="margin-top: 15px;margin-bottom: 15px;margin-right: 15px;"
|
2018-05-28 11:50:42 +02:00
|
|
|
(click)="saveFinalize();" type="button">Save and Finalize</button>
|
2018-03-05 17:18:45 +01:00
|
|
|
<button mat-raised-button color="primary" *ngIf="datasetWizardModel&&datasetWizardModel?.status == 1" style="margin-top: 15px;margin-bottom: 15px;margin-right: 15px;"
|
2018-05-28 11:50:42 +02:00
|
|
|
(click)="downloadPDF();" type="button">Download PDF</button>
|
2018-03-06 15:58:38 +01:00
|
|
|
<button mat-raised-button color="primary" *ngIf="datasetWizardModel&&datasetWizardModel?.status == 1" style="margin-top: 15px;margin-bottom: 15px;margin-right: 15px;"
|
2018-05-28 11:50:42 +02:00
|
|
|
(click)="downloadXML();" type="button">Download XML</button>
|
|
|
|
<div class="fill-space"></div>
|
|
|
|
<mat-menu #actionsMenu="matMenu">
|
|
|
|
<button mat-menu-item (click)="redirectToProject()">
|
|
|
|
<mat-icon>arrow_right_alt</mat-icon>{{'DATASET-WIZARD.ACTIONS.GO-TO-PROJECT' | translate}}</button>
|
|
|
|
<button mat-menu-item (click)="redirectToDmp()">
|
|
|
|
<mat-icon>arrow_right_alt</mat-icon>{{'DATASET-WIZARD.ACTIONS.GO-TO-DMP' | translate}}</button>
|
|
|
|
</mat-menu>
|
|
|
|
<button mat-icon-button type="button" style="margin-top: 15px;margin-bottom: 15px;margin-right: 15px;" [matMenuTriggerFor]="actionsMenu">
|
|
|
|
<mat-icon>more_vert</mat-icon>
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
<mat-horizontal-stepper [linear]="isLinear" #stepper>
|
|
|
|
<mat-step [stepControl]="formGroup">
|
|
|
|
<form *ngIf="formGroup" [formGroup]="formGroup">
|
|
|
|
<ng-template matStepLabel>{{'DATASET-WIZARD.FIRST-STEP.TITLE' | translate}}</ng-template>
|
|
|
|
<mat-form-field formGroupName="profile">
|
|
|
|
<mat-select placeholder=" {{'DATASET-WIZARD.FIRST-STEP.PROFILE'| translate}}" formControlName="id">
|
|
|
|
<mat-option *ngFor="let profile of availableProfiles" [value]="profile.id">
|
|
|
|
{{profile.label}}
|
|
|
|
</mat-option>
|
|
|
|
</mat-select>
|
|
|
|
<mat-error *ngIf="baseErrorModel?.status">{{baseErrorModel['Criteria.status']}}</mat-error>
|
|
|
|
</mat-form-field>
|
|
|
|
<app-dataset-editor-component [formGroup]="formGroup"></app-dataset-editor-component>
|
|
|
|
<div class="navigation-buttons-container">
|
|
|
|
<button matStepperNext mat-raised-button style="float:right;" color="primary">{{'DATASET-WIZARD.ACTIONS.NEXT' | translate}}</button>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</mat-step>
|
|
|
|
<mat-step [stepControl]="formGroup">
|
|
|
|
<form *ngIf="formGroup" [formGroup]="formGroup">
|
|
|
|
<ng-template matStepLabel>{{'DATASET-WIZARD.SECOND-STEP.TITLE' | translate}}</ng-template>
|
|
|
|
|
|
|
|
<app-external-item-listing *ngIf="formGroup.get('dataRepositories') && dataRepositoriesTemplate" [options]="externalSourcesConfiguration.dataRepositories"
|
|
|
|
placeholder="{{'DATASET-EDITOR.FIELDS.DATAREPOSITORIES' | translate}}" [parentTemplate]='dataRepositoriesTemplate'
|
|
|
|
[displayFunction]='dataRepositoryDisplayFunc' [formGroup]="formGroup.get('dataRepositories')" [autoCompleteConfiguration]="dataRepositoriesAutoCompleteConfiguration"
|
|
|
|
(onItemChange)="dataRepositoriesOnItemChange($event)">
|
|
|
|
|
|
|
|
</app-external-item-listing>
|
|
|
|
|
|
|
|
<ng-template #dataRepositoriesTemplate let-suggestion>
|
|
|
|
<div>
|
|
|
|
<p>
|
|
|
|
{{suggestion.get('name').value}}
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
<mat-form-field>
|
|
|
|
<input matInput placeholder="{{'DATASET-EDITOR.FIELDS.DATAREPOSITORIES-INFO' | translate}}" type="text" name="info" [formControl]="suggestion.get('info')">
|
|
|
|
|
|
|
|
</mat-form-field>
|
|
|
|
</div>
|
|
|
|
</ng-template>
|
|
|
|
|
|
|
|
<app-external-item-listing *ngIf="formGroup.get('externalDatasets') && externalDatasetsTemplate" [options]="externalSourcesConfiguration.externalDatasets"
|
|
|
|
placeholder="{{'DATASET-EDITOR.FIELDS.EXTERNAL-DATASETS' | translate}}" [parentTemplate]='externalDatasetsTemplate'
|
|
|
|
[displayFunction]='externalDatasetDisplayFunc' [formGroup]="formGroup.get('externalDatasets')" [autoCompleteConfiguration]="externalDatasetAutoCompleteConfiguration"
|
|
|
|
(onItemChange)="externalDatasetsOnItemChange($event)">
|
|
|
|
|
|
|
|
</app-external-item-listing>
|
|
|
|
|
|
|
|
<ng-template #externalDatasetsTemplate let-suggestion>
|
|
|
|
<div>
|
|
|
|
<p>
|
|
|
|
{{suggestion.get('label').value}}
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
<mat-form-field>
|
|
|
|
<input matInput placeholder="{{'DATASET-EDITOR.FIELDS.EXTERNAL-DATASET-INFO' | translate}}" type="text" name="info" [formControl]="suggestion.get('info')">
|
|
|
|
|
|
|
|
</mat-form-field>
|
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
<mat-form-field>
|
|
|
|
<mat-select placeholder="{{'DATASET-WIZARD.EDITOR.FIELDS.EXTERNAL-DATASET-TYPE' | translate}}" [formControl]="suggestion.get('type')">
|
|
|
|
<mat-option [value]="0">{{'TYPES.EXTERNAL-DATASET-TYPE.SOURCE' | translate}}</mat-option>
|
|
|
|
<mat-option [value]="1">{{'TYPES.EXTERNAL-DATASET-TYPE.OUTPUT' | translate}}</mat-option>
|
|
|
|
</mat-select>
|
|
|
|
</mat-form-field>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</ng-template>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<app-external-item-listing *ngIf="formGroup.get('registries') && registriesTemplate" [options]="externalSourcesConfiguration.registries"
|
|
|
|
placeholder="{{'DATASET-EDITOR.FIELDS.REGISTRIES' | translate}}" [parentTemplate]='registriesTemplate' [displayFunction]='registriesDisplayFunc'
|
|
|
|
[formGroup]="formGroup.get('registries')" [autoCompleteConfiguration]="registriesAutoCompleteConfiguration" (onItemChange)="registriesOnItemChange($event)">
|
|
|
|
|
|
|
|
</app-external-item-listing>
|
|
|
|
|
|
|
|
<ng-template #registriesTemplate let-suggestion>
|
|
|
|
<div>
|
|
|
|
<p>
|
|
|
|
{{suggestion.get('label').value}}
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</ng-template>
|
|
|
|
|
|
|
|
|
|
|
|
<app-external-item-listing *ngIf="formGroup.get('services') && servicesTemplate" [options]="externalSourcesConfiguration.services"
|
|
|
|
placeholder="{{'DATASET-EDITOR.FIELDS.SERVICES' | translate}}" [parentTemplate]='servicesTemplate' [displayFunction]='servicesDisplayFunc'
|
|
|
|
[formGroup]="formGroup.get('services')" [autoCompleteConfiguration]="servicesAutoCompleteConfiguration" (onItemChange)="servicesOnItemChange($event)">
|
|
|
|
|
|
|
|
</app-external-item-listing>
|
|
|
|
|
|
|
|
<ng-template #servicesTemplate let-suggestion>
|
|
|
|
<div>
|
|
|
|
<p>
|
|
|
|
{{suggestion.get('label').value}}
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</ng-template>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="navigation-buttons-container">
|
|
|
|
<button matStepperPrevious mat-raised-button color="primary">{{'DATASET-WIZARD.ACTIONS.BACK' | translate}}</button>
|
|
|
|
<button matStepperNext mat-raised-button color="primary" style="float:right;" (click)="getDefinition()">{{'DATASET-WIZARD.ACTIONS.NEXT' | translate}}</button>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</mat-step>
|
|
|
|
<mat-step>
|
|
|
|
<ng-template matStepLabel>{{'DATASET-WIZARD.THIRD-STEP.TITLE' | translate}}</ng-template>
|
|
|
|
<dynamic-form class="full-width" *ngIf="formGroup && datasetWizardModel && datasetWizardModel.datasetProfileDefinition" [form]="this.formGroup.get('datasetProfileDefinition')"
|
|
|
|
[dataModel]="datasetWizardModel"></dynamic-form>
|
|
|
|
<div class="navigation-buttons-container">
|
|
|
|
<button style="margin-top:10px;" matStepperPrevious mat-raised-button color="primary">{{'DATASET-WIZARD.ACTIONS.BACK' | translate}}</button>
|
|
|
|
</div>
|
|
|
|
</mat-step>
|
|
|
|
</mat-horizontal-stepper>
|
|
|
|
</div>
|