styling changes

*description-overview
This commit is contained in:
Sofia Papacharalampous 2024-04-02 14:02:54 +03:00
parent 9fad0abf73
commit 9d5d891701
1 changed files with 118 additions and 88 deletions

View File

@ -6,67 +6,81 @@
<p class="label-txt pointer">{{'DESCRIPTION-OVERVIEW.ACTIONS.BACK' | translate}}</p> <p class="label-txt pointer">{{'DESCRIPTION-OVERVIEW.ACTIONS.BACK' | translate}}</p>
</a> </a>
<div class="row"> <div class="row">
<div class="col-md-8 col-lg-8 pl-4"> <div class="col-12 col-lg-8 pl-2">
<div class="row"> <div class="row">
<span class="col-auto description-logo">{{ 'DESCRIPTION-OVERVIEW.TITLE' | translate }}</span> <div class="col-auto"><span class="description-logo">{{ 'DESCRIPTION-OVERVIEW.TITLE' | translate }}</span></div>
<p class="col description-label p-0 ml-3 mb-0">{{ description.label }}</p> <div class="col-auto d-flex"><span class="description-label">{{ description.label }}</span></div>
</div> </div>
<div class="row d-flex align-items-center mt-3 mb-4 label-txt"> <div class="row d-flex align-items-center mt-3 mb-4 label-txt">
<div *ngIf="!isPublicView" class="d-flex"> <div *ngIf="!isPublicView" class="col-auto d-flex">
<p class="ml-0 mb-0 label2-txt"> <p class="ml-0 mb-0 label2-txt">{{ enumUtils.toDmpUserRolesString(dmpService.getCurrentUserRolesInDmp(description?.dmp?.dmpUsers)) }}</p>
{{ enumUtils.toDmpUserRolesString(dmpService.getCurrentUserRolesInDmp(description?.dmp?.dmpUsers)) }}
</p>
</div> </div>
<span *ngIf="canEdit" class="ml-2 mr-2">.</span> <div *ngIf="canEdit" class="col-auto"><span>.</span></div>
<div *ngIf="description.status === descriptionStatusEnum.Finalized && description.dmp.accessType === dmpAccessTypeEnum.Public" class="d-flex flex-row"> <div *ngIf="description.status === descriptionStatusEnum.Finalized && description.dmp.accessType === dmpAccessTypeEnum.Public" class="col-auto d-flex">
<mat-icon class="status-icon">public</mat-icon> <mat-icon class="status-icon">public</mat-icon>
{{'DESCRIPTION-OVERVIEW.PUBLIC' | translate}} {{'DESCRIPTION-OVERVIEW.PUBLIC' | translate}}
</div> </div>
<span *ngIf="description.status === descriptionStatusEnum.Finalized && description.dmp.accessType === dmpAccessTypeEnum.Public" class="ml-2 mr-2">.</span> <div *ngIf="description.status === descriptionStatusEnum.Finalized && description.dmp.accessType === dmpAccessTypeEnum.Public" class="col-auto d-flex"><span>.</span></div>
<div *ngIf="isLocked" class="d-flex flex-row"> <div *ngIf="isLocked" class="col-auto d-flex flex-row">
<mat-icon class="status-icon">lock_outline</mat-icon> <mat-icon class="status-icon">lock_outline</mat-icon>
{{'DESCRIPTION-OVERVIEW.LOCKED' | translate}} {{'DESCRIPTION-OVERVIEW.LOCKED' | translate}}
</div> </div>
<span *ngIf="isLocked" class="ml-2 mr-2">.</span> <div *ngIf="isLocked" class="col-auto"><span>.</span></div>
<div class="d-flex mr-2">{{'DESCRIPTION-OVERVIEW.EDITED' | translate}} : <div class="col-auto d-flex mr-2">{{'DESCRIPTION-OVERVIEW.EDITED' | translate}} :
{{description.updatedAt | dateTimeCultureFormatter: "d MMMM y"}} {{description.updatedAt | dateTimeCultureFormatter: "d MMMM y"}}
</div> </div>
<div class="d-flex ml-2 mr-4"> <div *ngIf="description.status === descriptionStatusEnum.Finalized" class="col-auto d-flex">
<div *ngIf="description.status === descriptionStatusEnum.Finalized" class="d-flex flex-row uppercase"> <div class="d-flex flex-row uppercase">
<mat-icon class="status-icon check-icon">check</mat-icon> <mat-icon class="status-icon check-icon">check</mat-icon>
{{'DESCRIPTION-OVERVIEW.FINALISED' | translate}} {{'DESCRIPTION-OVERVIEW.FINALISED' | translate}}
</div> </div>
</div> </div>
</div> </div>
<div class="row mb-4 pb-3"> <div class="row mb-4 pb-3">
<button *ngIf="canEdit && isDraftDescription(description) && !isLocked" (click)="editClicked(description)" mat-mini-fab class="mr-3 actions-btn" matTooltip="{{'DESCRIPTION-OVERVIEW.ACTIONS.EDIT' | translate}}" matTooltipPosition="above"> <div *ngIf="canEdit && isDraftDescription(description) && !isLocked" class="col-auto">
<button (click)="editClicked(description)" mat-mini-fab class="mr-3 actions-btn" matTooltip="{{'DESCRIPTION-OVERVIEW.ACTIONS.EDIT' | translate}}" matTooltipPosition="above">
<mat-icon class="mat-mini-fab-icon">create</mat-icon> <mat-icon class="mat-mini-fab-icon">create</mat-icon>
</button> </button>
<button *ngIf="canEdit" (click)="openCopyToDmpDialog()" mat-mini-fab class="mr-3 actions-btn" matTooltip="{{'DESCRIPTION-OVERVIEW.ACTIONS.CLONE' | translate}}" matTooltipPosition="above"> </div>
<mat-icon class="mat-mini-fab-icon">content_copy</mat-icon> <div *ngIf="canEdit" class="col-auto">
</button> <button (click)="openCopyToDmpDialog()" mat-mini-fab class="mr-3 actions-btn" matTooltip="{{'DESCRIPTION-OVERVIEW.ACTIONS.CLONE' | translate}}" matTooltipPosition="above">
<button *ngIf="canDelete && !isLocked" (click)="deleteClicked()" mat-mini-fab class="mr-3 actions-btn" matTooltip="{{'DESCRIPTION-OVERVIEW.ACTIONS.DELETE' | translate}}" matTooltipPosition="above"> <mat-icon class="mat-mini-fab-icon">content_copy</mat-icon>
<mat-icon class="mat-mini-fab-icon">delete</mat-icon> </button>
</button> </div>
<div *ngIf="canDelete && !isLocked" class="col-auto">
<button (click)="deleteClicked()" mat-mini-fab class="mr-3 actions-btn" matTooltip="{{'DESCRIPTION-OVERVIEW.ACTIONS.DELETE' | translate}}" matTooltipPosition="above">
<mat-icon class="mat-mini-fab-icon">delete</mat-icon>
</button>
</div>
</div> </div>
<div class="row header">{{'DESCRIPTION-OVERVIEW.PART-OF' | translate}}</div> <div class="row header">
<div class="row "> <div class="col-auto">{{'DESCRIPTION-OVERVIEW.PART-OF' | translate}}</div>
<button class="dmp-btn" (click)="dmpClicked(description.dmp)">
<div class="dmp-btn-label">
{{ this.description.dmp.label }}
</div>
<mat-icon>launch</mat-icon>
</button>
</div> </div>
<div *ngIf="referenceService.hasRerefenceOfTypes(description?.dmp?.dmpReferences, [this.referenceTypeService.getGrantReferenceType()])">
<div class="row header">{{'DESCRIPTION-OVERVIEW.GRANT' | translate}}</div>
<div class="row description-label">{{referenceService.getReferencesForTypesFirstSafe(description?.dmp?.dmpReferences, [this.referenceTypeService.getGrantReferenceType()])?.reference?.label}}</div>
</div>
<div class="row header">{{'DESCRIPTION-OVERVIEW.RESEARCHERS' | translate}}</div>
<div class="row"> <div class="row">
<div *ngFor="let dmpReference of researchers let last = last"> <div class="col-12 col-lg-7">
<button class="w-100 dmp-btn p-1" (click)="dmpClicked(description.dmp)">
<div class="w-100 dmp-btn-label">
{{ this.description.dmp.label }}
</div>
<div class="w-auto">
<mat-icon>launch</mat-icon>
</div>
</button>
</div>
</div>
<ng-container *ngIf="referenceService.hasRerefenceOfTypes(description?.dmp?.dmpReferences, [this.referenceTypeService.getGrantReferenceType()])">
<div class="row header">
<div class="col-auto">{{'DESCRIPTION-OVERVIEW.GRANT' | translate}}</div>
</div>
<div class="row description-label">
<div class="col-auto">{{referenceService.getReferencesForTypesFirstSafe(description?.dmp?.dmpReferences, [this.referenceTypeService.getGrantReferenceType()])?.reference?.label}}</div>
</div>
</ng-container>
<div class="row header">
<div class="col-auto">{{'DESCRIPTION-OVERVIEW.RESEARCHERS' | translate}}</div>
</div>
<div class="row">
<div class="col-12" *ngFor="let dmpReference of researchers let last = last">
<span *ngIf="isOrcid(dmpReference.reference)"> <span *ngIf="isOrcid(dmpReference.reference)">
<a href="{{ getOrcidPathForResearcher(dmpReference.reference?.reference) }}" target="blank" class="researcher"> <a href="{{ getOrcidPathForResearcher(dmpReference.reference?.reference) }}" target="blank" class="researcher">
<div class="id-btn">&nbsp;</div> <div class="id-btn">&nbsp;</div>
@ -79,72 +93,88 @@
<div *ngIf="last">{{ dmpReference.reference?.label }}</div> <div *ngIf="last">{{ dmpReference.reference?.label }}</div>
</span> </span>
</div> </div>
<span *ngIf="!researchers || researchers.length === 0" class="material-icons">horizontal_rule</span>
</div> </div>
<div class="row">
<div class="row header">{{'DESCRIPTION-OVERVIEW.DESCRIPTION' | translate}}</div> <div class="col-12">
<span *ngIf="!researchers || researchers.length === 0" class="material-icons">horizontal_rule</span>
</div>
</div>
<div class="row header">
<div class="col-auto">{{'DESCRIPTION-OVERVIEW.DESCRIPTION' | translate}}</div>
</div>
<div class="row" *ngIf="description.description"> <div class="row" *ngIf="description.description">
<p class="desc-txt" [innerHTML]="description.description"></p> <div class="col-12">
<p [innerHTML]="description.description"></p>
</div>
</div> </div>
<div class="row" *ngIf="!description.description"> <div class="row" *ngIf="!description.description">
<span class="material-icons">horizontal_rule</span> <div class="col-12">
<span class="material-icons">horizontal_rule</span>
</div>
</div> </div>
</div> </div>
<div class="col-md-4 col-lg-4 p-0"> <div class="col-12 col-lg-4">
<div class="frame mb-3 pt-4 pl-3 pr-5 pb-1" *ngIf="isAuthenticated()"> <ng-container *ngIf="isAuthenticated()">
<div *ngIf="canFinalize && isDraftDescription(description) && !isLocked"> <div class="row frame mb-3 pt-4 pl-3 pr-5 pb-3">
<div class="row ml-0 mr-0 pl-4 d-flex align-items-center" (click)="finalize(description)"> <ng-container *ngIf="canFinalize && isDraftDescription(description) && !isLocked">
<button mat-mini-fab class="finalize-btn"> <div class="col-12 ml-0 mr-0 pl-4 d-flex align-items-center" (click)="finalize(description)">
<mat-icon class="mat-mini-fab-icon check-icon">check</mat-icon> <button mat-mini-fab class="finalize-btn">
</button> <mat-icon class="mat-mini-fab-icon check-icon">check</mat-icon>
<p class="mb-0 pl-2 frame-txt">{{ 'DESCRIPTION-OVERVIEW.ACTIONS.FINALIZE' | translate }}</p> </button>
</div> <p class="mb-0 pl-2 frame-txt">{{ 'DESCRIPTION-OVERVIEW.ACTIONS.FINALIZE' | translate }}</p>
<div class="row ml-0 mr-0 pl-4 d-flex align-items-center"> </div>
<hr class="hr-line"> <div class="row ml-0 mr-0 pl-4 d-flex align-items-center">
</div> <hr class="hr-line">
</div>
</ng-container>
<ng-container *ngIf="hasReversableStatus(description)">
<div class="col-12 ml-0 mr-0 pl-4 pb-3 d-flex align-items-center" (click)="reverseFinalization(description)">
<button mat-mini-fab class="frame-btn">
<mat-icon class="mat-mini-fab-icon">unarchive</mat-icon>
</button>
<p class="mb-0 mr-0 pl-2 frame-txt">{{ 'DESCRIPTION-OVERVIEW.ACTIONS.REVERSE' | translate }}</p>
</div>
</ng-container>
<ng-container *ngIf="fileTransformerService.availableFormats.length > 0">
<div class="col-12 d-flex align-items-center">
<button mat-mini-fab class="frame-btn" [matMenuTriggerFor]="exportMenu">
<mat-icon class="mat-mini-fab-icon">open_in_new</mat-icon>
</button>
<p class="mb-0 mr-0 pl-2 frame-txt" [matMenuTriggerFor]="exportMenu">{{ 'DESCRIPTION-OVERVIEW.ACTIONS.EXPORT' | translate }}</p>
</div>
</ng-container>
<mat-menu #exportMenu="matMenu" xPosition="before">
<button mat-menu-item *ngFor='let fileTransformer of fileTransformerService.availableFormats' (click)="fileTransformerService.exportDescription(description.id, fileTransformer.repositoryId, fileTransformer.format)">
<i class="fa pr-2" [ngClass]="fileTransformer.icon ? fileTransformer.icon : 'fa-file-o'"></i>
<span>{{'GENERAL.FILE-TRANSFORMER.' + fileTransformer.format.toUpperCase() | translate}}</span>
</button>
</mat-menu>
</div> </div>
<div *ngIf="hasReversableStatus(description)" class="row ml-0 mr-0 pl-4 pb-3 d-flex align-items-center" (click)="reverseFinalization(description)"> </ng-container>
<button mat-mini-fab class="frame-btn"> <div class="row frame mb-3 pt-4 pl-3 pr-3 pb-3">
<mat-icon class="mat-mini-fab-icon">unarchive</mat-icon> <div class="col-12">
</button>
<p class="mb-0 mr-0 pl-2 frame-txt">{{ 'DESCRIPTION-OVERVIEW.ACTIONS.REVERSE' | translate }}</p>
</div>
<div class="row ml-0 mr-0 pl-4 pb-3 d-flex align-items-center" *ngIf="fileTransformerService.availableFormats.length > 0">
<button mat-mini-fab class="frame-btn" [matMenuTriggerFor]="exportMenu">
<mat-icon class="mat-mini-fab-icon">open_in_new</mat-icon>
</button>
<p class="mb-0 mr-0 pl-2 frame-txt" [matMenuTriggerFor]="exportMenu">
{{ 'DESCRIPTION-OVERVIEW.ACTIONS.EXPORT' | translate }}</p>
</div>
<mat-menu #exportMenu="matMenu" xPosition="before">
<button mat-menu-item *ngFor='let fileTransformer of fileTransformerService.availableFormats' (click)="fileTransformerService.exportDescription(description.id, fileTransformer.repositoryId, fileTransformer.format)">
<i class="fa pr-2" [ngClass]="fileTransformer.icon ? fileTransformer.icon : 'fa-file-o'"></i>
<span>{{'GENERAL.FILE-TRANSFORMER.' + fileTransformer.format.toUpperCase() | translate}}</span>
</button>
</mat-menu>
</div>
<div class="frame mb-3 pt-4 pl-3 pr-3 pb-1">
<div class="row ml-0 mr-0 pl-4 pb-3">
<p class="header">{{ 'DESCRIPTION-OVERVIEW.DESCRIPTION-AUTHORS' | translate }}</p> <p class="header">{{ 'DESCRIPTION-OVERVIEW.DESCRIPTION-AUTHORS' | translate }}</p>
</div> </div>
<div class="row ml-0 mr-0 pl-4 ml-2 pb-3 d-flex align-items-center"> <div class="col-12 d-flex align-items-center">
<div *ngFor="let dmpUser of description.dmp?.dmpUsers" class="row authors"> <div *ngFor="let dmpUser of description.dmp?.dmpUsers" class="row authors">
<div class="d-flex flex-row"> <div class="col-12 d-flex flex-row">
<button class="account_btn mr-3 pl-0"> <button class="account_btn mr-3 pl-0">
<mat-icon class="account-icon">account_circle</mat-icon> <mat-icon class="account-icon">account_circle</mat-icon>
</button> </button>
<div> <div>
<p class="authors-label">{{ dmpUser.user?.name }} <p class="authors-label">{{ dmpUser.user?.name }}</p>
<span *ngIf="isUserAuthor(dmpUser.user?.id)"> <p *ngIf="isUserAuthor(dmpUser.user?.id)">({{ 'DESCRIPTION-OVERVIEW.YOU' | translate }})</p>
({{ 'DESCRIPTION-OVERVIEW.YOU' | translate }})</span>
</p>
<p class="authors-role">{{ enumUtils.toDmpUserRoleString(dmpUser.role) }}</p> <p class="authors-role">{{ enumUtils.toDmpUserRoleString(dmpUser.role) }}</p>
</div> </div>
</div> </div>
<button *ngIf="canInviteDmpUsers && description.dmp?.status === dmpStatusEnum.Draft && dmpUser.role != dmpUserRoleEnum.Owner" (click)="removeUserFromDmp(dmpUser)" class="remove-btn">{{ 'DESCRIPTION-OVERVIEW.ACTIONS.REMOVE-AUTHOR' | translate}}</button> <div class="col-12 authors" *ngIf="canInviteDmpUsers && description.dmp?.status === dmpStatusEnum.Draft && dmpUser.role != dmpUserRoleEnum.Owner" >
<div class="d-flex flex-row">
<button (click)="removeUserFromDmp(dmpUser)" class="remove-btn">{{ 'DESCRIPTION-OVERVIEW.ACTIONS.REMOVE-AUTHOR' | translate}}</button>
</div>
</div>
</div> </div>
</div> </div>
<div *ngIf="canInviteDmpUsers" class="row mt-3 mb-3 d-flex align-items-center justify-content-center"> <div *ngIf="canInviteDmpUsers" class="col-12 d-flex justify-content-center mt-2">
<button mat-raised-button class="invite-btn" (click)="openShareDialog()"> <button mat-raised-button class="invite-btn" (click)="openShareDialog()">
<mat-icon>group_add</mat-icon> <mat-icon>group_add</mat-icon>
{{'DESCRIPTION-OVERVIEW.ACTIONS.INVITE-SHORT' | translate}} {{'DESCRIPTION-OVERVIEW.ACTIONS.INVITE-SHORT' | translate}}