added preview buttons for finalized dmps and descriptions

This commit is contained in:
Sofia Papacharalampous 2024-05-29 17:13:42 +03:00
parent bbbaeffde9
commit 05f344b980
3 changed files with 20 additions and 4 deletions

View File

@ -44,11 +44,18 @@
</div>
</div>
<div class="row mb-4 pb-3">
<div *ngIf="(canEdit || canReview) && isDraftDescription(description) && !isLocked" class="col-auto pr-0">
<div *ngIf="(canEdit || canReview) && isDraftDescription(description) && !isLocked; else previewButton" class="col-auto pr-0">
<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>
</button>
</div>
<ng-template #previewButton>
<div *ngIf="!isPublicView" class="col-auto pr-0">
<button (click)="editClicked(description)" mat-mini-fab class="mr-3 actions-btn" matTooltip="{{'DESCRIPTION-OVERVIEW.ACTIONS.PREVIEW' | translate}}" matTooltipPosition="above">
<mat-icon class="mat-mini-fab-icon">visibility</mat-icon>
</button>
</div>
</ng-template>
<div *ngIf="canEdit" class="col-auto pr-0">
<button (click)="openCopyToDmpDialog()" mat-mini-fab class="mr-3 actions-btn" matTooltip="{{'DESCRIPTION-OVERVIEW.ACTIONS.CLONE' | translate}}" matTooltipPosition="above">
<mat-icon class="mat-mini-fab-icon">content_copy</mat-icon>

View File

@ -52,11 +52,18 @@
</div>
<div class="row" *ngIf="(isDraftDmp(dmp) && !lockStatus) || canCloneDmp() || (canDeleteDmp() && !isLocked)">
<!-- <button *ngIf="isDraftDmp(dmp) && isDmpOwner(dmp) && !isLocked" (click)="editClicked(dmp)" mat-mini-fab class="mr-3 d-flex justify-content-center align-items-center" matTooltip="{{'DMP-OVERVIEW.ACTIONS.EDIT' | translate}}" matTooltipPosition="above"> -->
<div *ngIf="isDraftDmp(dmp) && !lockStatus" class="col-auto pr-0">
<div *ngIf="isDraftDmp(dmp) && !lockStatus; else previewButton" class="col-auto pr-0">
<button (click)="editClicked()" mat-mini-fab class="d-flex justify-content-center align-items-center" matTooltip="{{'DMP-OVERVIEW.ACTIONS.EDIT' | translate}}" matTooltipPosition="above">
<mat-icon class="mat-mini-fab-icon">create</mat-icon>
</button>
</div>
<ng-template #previewButton>
<div *ngIf="!isPublicView" class="col-auto pr-0">
<button (click)="editClicked()" mat-mini-fab class="d-flex justify-content-center align-items-center" matTooltip="{{'DMP-OVERVIEW.ACTIONS.PREVIEW' | translate}}" matTooltipPosition="above">
<mat-icon class="mat-mini-fab-icon">visibility</mat-icon>
</button>
</div>
</ng-template>
<div *ngIf="canCloneDmp()" class="col-auto pr-0">
<button (click)="cloneClicked()" mat-mini-fab class="d-flex justify-content-center align-items-center" matTooltip="{{'DMP-OVERVIEW.ACTIONS.CLONE' | translate}}" matTooltipPosition="above">
<mat-icon class="mat-mini-fab-icon">content_copy</mat-icon>

View File

@ -682,7 +682,8 @@
"EXPORT": "Export",
"NEW-VERSION": "Start new version",
"INVITE-SHORT": "Invite",
"REMOVE-AUTHOR": "Remove"
"REMOVE-AUTHOR": "Remove",
"PREVIEW": "Preview"
},
"UNDO-FINALIZATION-DIALOG": {
"TITLE": "Undo Finalization?",
@ -741,7 +742,8 @@
"REVERSE": "Undo Finalization",
"EXPORT": "Export",
"INVITE-SHORT": "Invite",
"REMOVE-AUTHOR": "Remove"
"REMOVE-AUTHOR": "Remove",
"PREVIEW": "Preview"
},
"COPY-DIALOG": {
"COPY": "Copy",