styling changes

*finalize dmp dialog
dmp-refactoring
parent 15824ab952
commit 8e5c6e3579

@ -1,82 +1,84 @@
<div class="row d-flex flex-row">
<div mat-dialog-title class="col-auto">{{ 'DMP-FINALISE-DIALOG.TITLE' | translate }}</div>
<div class="col-auto close-btn ml-auto" (click)="close()">
<mat-icon>close</mat-icon>
<div class="finalize-dialog-wrapper">
<div class="row d-flex flex-row">
<div mat-dialog-title class="col-auto">{{ 'DMP-FINALISE-DIALOG.TITLE' | translate }}</div>
<div class="col-auto close-btn ml-auto" (click)="close()">
<mat-icon>close</mat-icon>
</div>
</div>
</div>
<div mat-dialog-content class="pt-2 pb-2">
<div class="container">
<mat-accordion [multi]="true">
<mat-expansion-panel>
<mat-expansion-panel-header>
<mat-panel-title>
{{ 'DMP-FINALISE-DIALOG.DMP' | translate }}
</mat-panel-title>
<mat-panel-description class="dmp-title">
{{ dmp.label }}
</mat-panel-description>
</mat-expansion-panel-header>
{{ dmp.description }}
</mat-expansion-panel>
<mat-expansion-panel [expanded]="true">
<mat-expansion-panel-header>
<mat-panel-title>
{{ 'DMP-FINALISE-DIALOG.DESCRPIPTIONS' | translate }}
</mat-panel-title>
<mat-panel-description></mat-panel-description>
</mat-expansion-panel-header>
<div *ngIf="dmp.descriptions && dmp.descriptions.length > 0">
<div *ngFor="let description of dmp.descriptions" class="row pl-3 descriptions">
<mat-icon *ngIf="description.status == descriptionStatusEnum.Draft" class="col-1 draft-bookmark">bookmark</mat-icon>
<mat-icon *ngIf="description.status == descriptionStatusEnum.Finalized" class="col-1 finalized-bookmark">bookmark</mat-icon>
<h4 *ngIf="description.status == descriptionStatusEnum.Draft" class="col-11 ml-auto mt-1 mb-4">
<span>{{ 'TYPES.DESCRIPTION-STATUS.DRAFT' | translate }}
<ng-container *ngIf="!isDescriptionValid(description.id)">
({{'DMP-FINALISE-DIALOG.INVALID' | translate}})
</ng-container>
:</span>
{{ description.label }}
<i *ngIf="!isDescriptionValid(description.id)" class="fa fa-spinner fa-spin" ></i>
</h4>
<h4 *ngIf="description.status == descriptionStatusEnum.Finalized" class="col-11 ml-auto mt-1 mb-4">{{ description.label }}</h4>
<div mat-dialog-content class="pt-2 pb-2">
<div class="container">
<mat-accordion [multi]="true">
<mat-expansion-panel>
<mat-expansion-panel-header>
<mat-panel-title>
{{ 'DMP-FINALISE-DIALOG.DMP' | translate }}
</mat-panel-title>
<mat-panel-description class="dmp-title">
{{ dmp.label }}
</mat-panel-description>
</mat-expansion-panel-header>
{{ dmp.description }}
</mat-expansion-panel>
<mat-expansion-panel [expanded]="true">
<mat-expansion-panel-header>
<mat-panel-title>
{{ 'DMP-FINALISE-DIALOG.DESCRPIPTIONS' | translate }}
</mat-panel-title>
<mat-panel-description></mat-panel-description>
</mat-expansion-panel-header>
<div *ngIf="dmp.descriptions && dmp.descriptions.length > 0">
<div *ngFor="let description of dmp.descriptions" class="row pl-3 descriptions">
<mat-icon *ngIf="description.status == descriptionStatusEnum.Draft" class="col-1 draft-bookmark">bookmark</mat-icon>
<mat-icon *ngIf="description.status == descriptionStatusEnum.Finalized" class="col-1 finalized-bookmark">bookmark</mat-icon>
<h4 *ngIf="description.status == descriptionStatusEnum.Draft" class="col-11 ml-auto mt-1 mb-4">
<span>{{ 'TYPES.DESCRIPTION-STATUS.DRAFT' | translate }}
<ng-container *ngIf="!isDescriptionValid(description.id)">
({{'DMP-FINALISE-DIALOG.INVALID' | translate}})
</ng-container>
:</span>
{{ description.label }}
<i *ngIf="!isDescriptionValid(description.id)" class="fa fa-spinner fa-spin" ></i>
</h4>
<h4 *ngIf="description.status == descriptionStatusEnum.Finalized" class="col-11 ml-auto mt-1 mb-4">{{ description.label }}</h4>
</div>
</div>
</div>
<div *ngIf="!dmp.descriptions" class="emptyList">{{ 'DMP-FINALISE-DIALOG.EMPTY' | translate }} </div>
</mat-expansion-panel>
</mat-accordion>
<div *ngIf="!dmp.descriptions" class="emptyList">{{ 'DMP-FINALISE-DIALOG.EMPTY' | translate }} </div>
</mat-expansion-panel>
</mat-accordion>
<div *ngIf="validDraftDescriptions.length > 0" class="pt-4 pb-2">
<h4 class="pl-2">{{'DMP-FINALISE-DIALOG.FINALISE-TITLE' | translate}}</h4>
<mat-selection-list [(ngModel)]="descriptionsToBeFinalized">
<div class="styleBorder" *ngFor="let description of validDraftDescriptions">
<mat-list-option [value]='description.id' [disabled]="!isDescriptionValid(description.id)">
<span class="text-truncate" [matTooltip]="description.label">{{ description.label }}</span>
</mat-list-option>
</div>
</mat-selection-list>
<div *ngIf="validDraftDescriptions.length > 0" class="pt-4 pb-2">
<h4 class="pl-2">{{'DMP-FINALISE-DIALOG.FINALISE-TITLE' | translate}}</h4>
<mat-selection-list [(ngModel)]="descriptionsToBeFinalized">
<div class="styleBorder" *ngFor="let description of validDraftDescriptions">
<mat-list-option [value]='description.id' [disabled]="!isDescriptionValid(description.id)">
<span class="text-truncate" [matTooltip]="description.label">{{ description.label }}</span>
</mat-list-option>
</div>
</mat-selection-list>
</div>
<mat-error *ngIf="getFinalizedDescriptions().length === 0 && descriptionsToBeFinalized.length === 0">
{{'DMP-FINALISE-DIALOG.VALIDATION.AT-LEAST-ONE-DESCRPIPTION-FINALISED' | translate}}
</mat-error>
</div>
<mat-error *ngIf="getFinalizedDescriptions().length === 0 && descriptionsToBeFinalized.length === 0">
{{'DMP-FINALISE-DIALOG.VALIDATION.AT-LEAST-ONE-DESCRPIPTION-FINALISED' | translate}}
</mat-error>
</div>
</div>
<div *ngIf="getFinalizedDescriptions().length != 0">
<div class="row pt-2 pb-2 pl-4 pr-4">
{{ 'DMP-FINALISE-DIALOG.IMPACT' | translate }}
</div>
<div *ngIf="dmp.accessType == dmpAccessTypeEnum.Public" class="row pl-4 pr-4">
{{ 'DMP-FINALISE-DIALOG.PUBLIC-DMP-MESSAGE' | translate }}
</div>
<div *ngIf="dmp.accessType == dmpAccessTypeEnum.Restricted" class="row pl-4 pr-4">
{{ 'DMP-FINALISE-DIALOG.RESTRICTED-DMP-MESSAGE' | translate }}
<div *ngIf="getFinalizedDescriptions().length != 0">
<div class="row pt-2 pb-2 pl-4 pr-4">
{{ 'DMP-FINALISE-DIALOG.IMPACT' | translate }}
</div>
<div *ngIf="dmp.accessType == dmpAccessTypeEnum.Public" class="row pl-4 pr-4">
{{ 'DMP-FINALISE-DIALOG.PUBLIC-DMP-MESSAGE' | translate }}
</div>
<div *ngIf="dmp.accessType == dmpAccessTypeEnum.Restricted" class="row pl-4 pr-4">
{{ 'DMP-FINALISE-DIALOG.RESTRICTED-DMP-MESSAGE' | translate }}
</div>
</div>
</div>
<div mat-dialog-actions class="d-flex justify-content-end mb-1">
<div class="col-auto">
<button mat-raised-button cdkFocusInitial (click)="close()" class="cancel-btn">{{ 'DMP-FINALISE-DIALOG.ACTIONS.CANCEL' | translate }}</button>
</div>
<div class="col-auto">
<button mat-raised-button [disabled]="getFinalizedDescriptions().length === 0 && descriptionsToBeFinalized.length === 0" class="submit-btn" (click)="onSubmit()">{{ 'DMP-FINALISE-DIALOG.ACTIONS.SUBMIT' | translate }}</button>
<div mat-dialog-actions class="d-flex justify-content-end mb-1">
<div class="col-auto">
<button mat-raised-button cdkFocusInitial (click)="close()" class="cancel-btn">{{ 'DMP-FINALISE-DIALOG.ACTIONS.CANCEL' | translate }}</button>
</div>
<div class="col-auto">
<button mat-raised-button [disabled]="getFinalizedDescriptions().length === 0 && descriptionsToBeFinalized.length === 0" class="submit-btn" (click)="onSubmit()">{{ 'DMP-FINALISE-DIALOG.ACTIONS.SUBMIT' | translate }}</button>
</div>
</div>
</div>
</div>

@ -1,3 +1,7 @@
.finalize-dialog-wrapper {
padding: 1.0rem;
}
.styleBorder {
border: 0.2em solid lightgray;
border-radius: 0.5em;

Loading…
Cancel
Save