2018-11-29 13:26:18 +01:00
|
|
|
<div class="dmp-editor">
|
2019-01-18 18:03:45 +01:00
|
|
|
<div>
|
2018-10-11 13:22:03 +02:00
|
|
|
<mat-card-title *ngIf="isNew">{{'DMP-EDITOR.TITLE.NEW' | translate}}</mat-card-title>
|
|
|
|
<mat-card-title *ngIf="!isNew">
|
|
|
|
<h3>{{formGroup?.get('label')?.value}} </h3>
|
|
|
|
</mat-card-title>
|
|
|
|
</div>
|
2018-10-05 17:00:54 +02:00
|
|
|
<form *ngIf="formGroup" (ngSubmit)="formSubmit()" [formGroup]="formGroup">
|
|
|
|
<mat-card>
|
|
|
|
<mat-card-header>
|
2018-11-29 13:26:18 +01:00
|
|
|
<div class="col-12 row">
|
|
|
|
<div class="col"></div>
|
|
|
|
<div *ngIf="!isNew" class="col-auto">
|
|
|
|
<div class="row actions-row">
|
2019-02-14 13:14:44 +01:00
|
|
|
<div class="col-auto" *ngIf="!editMode && formGroup.get('status').value !== 1">
|
2018-11-29 13:26:18 +01:00
|
|
|
<button mat-icon-button (click)="enableForm()">
|
|
|
|
<mat-icon class="mat-24">edit</mat-icon>
|
|
|
|
</button>
|
|
|
|
</div>
|
2019-02-14 13:14:44 +01:00
|
|
|
<div class="col-auto" *ngIf="editMode && formGroup.get('status').value !== 1">
|
2018-11-29 13:26:18 +01:00
|
|
|
<button mat-icon-button (click)="disableForm()">
|
|
|
|
<mat-icon class="mat-24">lock</mat-icon>
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
<div class="col-auto">
|
|
|
|
<button mat-button type="button" (click)="redirectToDatasets()">
|
|
|
|
<mat-icon>arrow_right_alt</mat-icon>
|
|
|
|
<span>{{'DMP-EDITOR.ACTIONS.GO-TO-DATASETS' | translate}}</span>
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
<mat-menu #actionsMenu="matMenu">
|
2019-01-18 18:03:45 +01:00
|
|
|
<button mat-menu-item (click)="newVersion(dmp.id, dmp.label)">
|
2018-11-29 13:26:18 +01:00
|
|
|
<mat-icon>queue</mat-icon>{{'DMP-LISTING.ACTIONS.NEW-VERSION' | translate}}
|
|
|
|
</button>
|
2019-01-18 18:03:45 +01:00
|
|
|
<button mat-menu-item (click)="clone(dmp.id)">
|
2018-11-29 13:26:18 +01:00
|
|
|
<mat-icon>filter_none</mat-icon>{{'DMP-LISTING.ACTIONS.CLONE' | translate}}
|
|
|
|
</button>
|
2019-01-18 18:03:45 +01:00
|
|
|
<button mat-menu-item (click)="viewVersions(dmp.groupId, dmp.label)">
|
2018-11-29 13:26:18 +01:00
|
|
|
<mat-icon>library_books</mat-icon>{{'DMP-LISTING.ACTIONS.VIEW-VERSION' | translate}}
|
|
|
|
</button>
|
2019-01-18 18:03:45 +01:00
|
|
|
<button mat-menu-item (click)="downloadXml(dmp.id)">
|
2018-11-29 13:26:18 +01:00
|
|
|
<mat-icon>save_alt</mat-icon>{{'DMP-LISTING.ACTIONS.DOWNLOAD-XML' | translate}}
|
|
|
|
</button>
|
2019-01-18 18:03:45 +01:00
|
|
|
<button mat-menu-item (click)="downloadDocx(dmp.id)">
|
2018-11-29 13:26:18 +01:00
|
|
|
<mat-icon>save_alt</mat-icon>{{'DMP-LISTING.ACTIONS.DOWNLOAD-DOCX' | translate}}
|
|
|
|
</button>
|
2019-01-18 18:03:45 +01:00
|
|
|
<button mat-menu-item (click)="downloadPDF(dmp.id)">
|
2018-11-29 13:26:18 +01:00
|
|
|
<mat-icon>save_alt</mat-icon>{{'DMP-LISTING.ACTIONS.DOWNLOAD-PDF' | translate}}
|
|
|
|
</button>
|
|
|
|
</mat-menu>
|
|
|
|
<button mat-icon-button class="col-auto" type="button" [matMenuTriggerFor]="actionsMenu">
|
|
|
|
<mat-icon>more_vert</mat-icon>
|
|
|
|
</button>
|
|
|
|
</div>
|
2018-10-05 17:00:54 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</mat-card-header>
|
|
|
|
<mat-card-content>
|
|
|
|
<div class="row">
|
|
|
|
<mat-form-field class="col-md-12">
|
2019-02-13 14:44:08 +01:00
|
|
|
<input matInput placeholder="{{'DMP-EDITOR.FIELDS.NAME' | translate}}" type="text" name="label"
|
|
|
|
formControlName="label" required>
|
|
|
|
<mat-error *ngIf="formGroup.get('label').hasError('backendError')">
|
|
|
|
{{formGroup.get('label').getError('backendError').message}}</mat-error>
|
|
|
|
<mat-error *ngIf="formGroup.get('label').hasError('required')">
|
|
|
|
{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
2018-10-05 17:00:54 +02:00
|
|
|
</mat-form-field>
|
|
|
|
<mat-form-field class="col-md-12">
|
2019-02-13 14:44:08 +01:00
|
|
|
<textarea matInput class="description-area"
|
2019-04-02 15:48:45 +02:00
|
|
|
placeholder="{{'DMP-EDITOR.FIELDS.DESCRIPTION' | translate}}" formControlName="description">
|
|
|
|
</textarea>
|
|
|
|
<!-- <mat-error *ngIf="formGroup.get('description').hasError('backendError')">
|
2019-02-13 14:44:08 +01:00
|
|
|
{{formGroup.get('description').getError('backendError').message}}</mat-error>
|
|
|
|
<mat-error *ngIf="formGroup.get('description').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' |
|
2019-04-02 15:48:45 +02:00
|
|
|
translate}}</mat-error> -->
|
2018-10-05 17:00:54 +02:00
|
|
|
</mat-form-field>
|
2019-01-18 18:03:45 +01:00
|
|
|
<mat-form-field class="col-md-6">
|
2019-02-13 14:44:08 +01:00
|
|
|
<app-single-auto-complete required='true' [formControl]="formGroup.get('project')"
|
|
|
|
placeholder="{{this.languageResolverService.getBy('dmpEditor') | translate}}"
|
|
|
|
[configuration]="projectAutoCompleteConfiguration">
|
2018-10-05 17:00:54 +02:00
|
|
|
</app-single-auto-complete>
|
2019-02-13 14:44:08 +01:00
|
|
|
<mat-error *ngIf="formGroup.get('project').hasError('backendError')">
|
|
|
|
{{formGroup.get('project').getError('backendError').message}}</mat-error>
|
|
|
|
<mat-error *ngIf="formGroup.get('project').hasError('required')">
|
|
|
|
{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
2019-01-18 18:03:45 +01:00
|
|
|
</mat-form-field>
|
2018-10-05 17:00:54 +02:00
|
|
|
<!-- <app-dynamic-fields-project [formGroup]="formGroup"></app-dynamic-fields-project> -->
|
2019-01-18 18:03:45 +01:00
|
|
|
<mat-form-field class="col-md-6">
|
2019-02-13 14:44:08 +01:00
|
|
|
<app-multiple-auto-complete required='true' [formControl]="formGroup.get('profiles')"
|
|
|
|
placeholder="{{'DMP-EDITOR.FIELDS.PROFILES' | translate}}"
|
|
|
|
[configuration]="profilesAutoCompleteConfiguration">
|
2019-01-18 18:03:45 +01:00
|
|
|
</app-multiple-auto-complete>
|
2019-02-13 14:44:08 +01:00
|
|
|
<mat-error *ngIf="formGroup.get('profiles').hasError('backendError')">
|
|
|
|
{{formGroup.get('profiles').getError('backendError').message}}</mat-error>
|
|
|
|
<mat-error *ngIf="formGroup.get('profiles').hasError('required')">
|
|
|
|
{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
|
|
|
<button matSuffix mat-icon-button type="button" [disabled]="formGroup.get('profiles').disabled"
|
|
|
|
(click)="availableProfiles()">
|
2019-01-18 18:03:45 +01:00
|
|
|
<mat-icon>view_list</mat-icon>
|
|
|
|
</button>
|
|
|
|
</mat-form-field>
|
2018-10-05 17:00:54 +02:00
|
|
|
<!-- <button mat-button (click)="availableProfiles()">View All</button> -->
|
2018-02-28 15:59:41 +01:00
|
|
|
|
2018-05-28 11:50:42 +02:00
|
|
|
|
2019-01-18 18:03:45 +01:00
|
|
|
<mat-form-field class="col-md-6">
|
2019-02-13 14:44:08 +01:00
|
|
|
<app-multiple-auto-complete [formControl]="formGroup.get('organisations')"
|
|
|
|
placeholder="{{'DMP-EDITOR.FIELDS.ORGANISATIONS' | translate}}"
|
|
|
|
[configuration]="organisationsAutoCompleteConfiguration">
|
2018-10-05 17:00:54 +02:00
|
|
|
</app-multiple-auto-complete>
|
2019-02-13 14:44:08 +01:00
|
|
|
<mat-error *ngIf="formGroup.get('organisations').hasError('backendError')">
|
|
|
|
{{formGroup.get('organisations').getError('backendError').message}}</mat-error>
|
|
|
|
<mat-error *ngIf="formGroup.get('organisations').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' |
|
|
|
|
translate}}</mat-error>
|
2019-01-18 18:03:45 +01:00
|
|
|
</mat-form-field>
|
|
|
|
<mat-form-field class="col-md-6">
|
2019-02-13 14:44:08 +01:00
|
|
|
<app-multiple-auto-complete [formControl]="formGroup.get('researchers')"
|
|
|
|
placeholder="{{'DMP-EDITOR.FIELDS.RESEARCHERS' | translate}}"
|
|
|
|
[configuration]="researchersAutoCompleteConfiguration">
|
2019-01-18 18:03:45 +01:00
|
|
|
</app-multiple-auto-complete>
|
2019-02-13 14:44:08 +01:00
|
|
|
<mat-error *ngIf="formGroup.get('researchers').hasError('backendError')">
|
|
|
|
{{formGroup.get('researchers').getError('backendError').message}}</mat-error>
|
|
|
|
<mat-error *ngIf="formGroup.get('researchers').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' |
|
|
|
|
translate}}</mat-error>
|
|
|
|
<button matSuffix mat-icon-button [disabled]="formGroup.get('researchers').disabled"
|
|
|
|
type="button" (click)="addResearcher()">
|
2019-01-18 18:03:45 +01:00
|
|
|
<mat-icon>add_circle</mat-icon>
|
|
|
|
</button>
|
|
|
|
</mat-form-field>
|
2018-07-24 09:58:55 +02:00
|
|
|
|
2019-02-13 14:44:08 +01:00
|
|
|
<!-- <h4 mat-subheader class="col-12">{{'DMP-EDITOR.FIELDS.PROFILE' | translate}}</h4> -->
|
2018-10-05 17:00:54 +02:00
|
|
|
<mat-form-field class="col-md-6">
|
2019-02-15 15:19:07 +01:00
|
|
|
<app-single-auto-complete [required]='false' [formControl]="formGroup.get('profile')"
|
2019-02-13 14:44:08 +01:00
|
|
|
placeholder="{{'DMP-EDITOR.FIELDS.PROFILE' | translate}}"
|
|
|
|
[configuration]="dmpProfileAutoCompleteConfiguration">
|
|
|
|
</app-single-auto-complete>
|
2018-10-05 17:00:54 +02:00
|
|
|
</mat-form-field>
|
2019-04-02 15:48:45 +02:00
|
|
|
|
2018-10-05 17:00:54 +02:00
|
|
|
<mat-form-field class="col-md-6">
|
2019-02-13 14:44:08 +01:00
|
|
|
<input matInput placeholder="Version" disabled
|
|
|
|
[value]="formGroup.get('version').value== undefined ?0 :formGroup.get('version').value">
|
2018-10-05 17:00:54 +02:00
|
|
|
</mat-form-field>
|
2018-07-24 09:58:55 +02:00
|
|
|
|
2019-02-13 14:44:08 +01:00
|
|
|
<!-- <app-dynamic-dmp-field-resolver *ngIf="dmp.definition" class="col-md-12"
|
|
|
|
[formGroup]="formGroup" [dmpProfileDefinition]=dmp.definition></app-dynamic-dmp-field-resolver> -->
|
|
|
|
<app-dynamic-dmp-field-resolver *ngIf="selectedDmpProfileDefinition" class="col-md-12"
|
|
|
|
[formGroup]="formGroup" [dmpProfileDefinition]="selectedDmpProfileDefinition">
|
|
|
|
</app-dynamic-dmp-field-resolver>
|
|
|
|
|
|
|
|
|
2018-10-05 17:00:54 +02:00
|
|
|
<div class="col-md-12">
|
|
|
|
<mat-list *ngIf="associatedUsers?.length" role="list" class="col-md-12">
|
|
|
|
<h3 mat-subheader>Associated Users</h3>
|
|
|
|
<mat-list-item role="listitem" *ngFor="let user of associatedUsers">
|
|
|
|
<mat-icon mat-list-icon>person</mat-icon>
|
|
|
|
<div>{{user.name}}</div>
|
|
|
|
</mat-list-item>
|
|
|
|
</mat-list>
|
|
|
|
</div>
|
2018-07-24 14:53:34 +02:00
|
|
|
|
2018-10-05 17:00:54 +02:00
|
|
|
<div class="col-md-12">
|
2018-11-29 13:26:18 +01:00
|
|
|
<div class="row">
|
2019-02-13 14:44:08 +01:00
|
|
|
<div class="col-auto"><button mat-raised-button color="primary" (click)="cancel()"
|
|
|
|
type="button">{{'DMP-EDITOR.ACTIONS.CANCEL'
|
|
|
|
| translate}}</button></div>
|
2018-11-29 13:26:18 +01:00
|
|
|
<div class="col"></div>
|
2019-02-13 14:44:08 +01:00
|
|
|
<div class="col-auto" *ngIf="!isNew && this.formGroup.enabled"><button mat-raised-button
|
|
|
|
color="primary" type="button"
|
|
|
|
(click)="delete()">{{'DMP-EDITOR.ACTIONS.DELETE' | translate}}</button></div>
|
|
|
|
<div class="col-auto" *ngIf="this.formGroup.enabled"><button mat-raised-button
|
|
|
|
color="primary" type="submit">{{'DMP-EDITOR.ACTIONS.SAVE'
|
|
|
|
| translate}}</button></div>
|
|
|
|
<div class="col-auto" *ngIf="dmp.lockable && this.formGroup.enabled"><button type="button"
|
|
|
|
mat-raised-button color="primary"
|
|
|
|
(click)="saveAndFinalize()">{{'DMP-EDITOR.ACTIONS.FINALISE' | translate}}</button>
|
|
|
|
</div>
|
2018-10-05 17:00:54 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</mat-card-content>
|
|
|
|
</mat-card>
|
|
|
|
</form>
|
|
|
|
<!-- <div *ngIf="formGroup"> {{ formGroup.value | json }}</div> -->
|
2019-04-02 15:48:45 +02:00
|
|
|
</div>
|