Improved DMP editor (expert) lock message styling and added message if the user is not allowed to edit the DMP in the first place
This commit is contained in:
parent
cd4f68f8f5
commit
e32cfba6ab
|
@ -95,28 +95,32 @@
|
|||
</mat-tab> -->
|
||||
</mat-tab-group>
|
||||
|
||||
<span *ngIf="lockStatus">
|
||||
<mat-icon color="accent" class="align-self-center mr-1">info_outlined</mat-icon>
|
||||
<div class="align-self-center mr-3">{{'DMP-EDITOR.ACTIONS.LOCK' | translate}}</div>
|
||||
</span>
|
||||
<div *ngIf="!isFinalized" class="d-flex justify-content-end pt-2 pb-4 pl-2">
|
||||
<div class="d-flex justify-content-end pt-2 pb-4 pl-2">
|
||||
<mat-icon *ngIf="lockStatus || !isUserOwner" color="accent" class="align-self-center mr-1">info_outlined</mat-icon>
|
||||
<div *ngIf="lockStatus" class="align-self-center mr-3">{{'DMP-EDITOR.ACTIONS.LOCK' | translate}}</div>
|
||||
<div *ngIf="!isUserOwner" class="align-self-center mr-3">{{'DMP-EDITOR.ACTIONS.PERMISSION' | translate}}</div>
|
||||
<div *ngIf="isNew || lockStatus || !isUserOwner">
|
||||
<button mat-raised-button color="primary" (click)="cancel()" type="button" class="text-uppercase mr-2">
|
||||
{{'DMP-EDITOR.ACTIONS.CANCEL' | translate}}
|
||||
</button>
|
||||
</div>
|
||||
<div>
|
||||
<button *ngIf="isNew" mat-raised-button type="button" (click)="addDataset()" class="text-uppercase dark-theme mr-2" color="primary">
|
||||
{{'DMP-EDITOR.ACTIONS.SAVE' | translate}}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="!isFinalized && !isNew" class="d-flex justify-content-end pt-2 pb-4 pl-2">
|
||||
<div *ngIf="!isNew">
|
||||
<button mat-raised-button color="primary" (click)="cancel(dmp.id)" type="button" class="text-uppercase mr-2">
|
||||
{{'DMP-EDITOR.ACTIONS.CANCEL' | translate}}
|
||||
</button>
|
||||
</div>
|
||||
<div *ngIf="isNew && !lockStatus">
|
||||
<button mat-raised-button color="primary" (click)="cancel()" type="button" class="text-uppercase mr-2">
|
||||
{{'DMP-EDITOR.ACTIONS.CANCEL' | translate}}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div *ngIf="formGroup.enabled && !lockStatus">
|
||||
<button *ngIf="!isNew" mat-raised-button type="submit" class="text-uppercase dark-theme mr-2" color="primary">
|
||||
{{'DMP-EDITOR.ACTIONS.SAVE-CHANGES' | translate}}
|
||||
</button>
|
||||
<button *ngIf="isNew" mat-raised-button type="button" (click)="addDataset()" class="text-uppercase dark-theme mr-2" color="primary">
|
||||
{{'DMP-EDITOR.ACTIONS.SAVE' | translate}}
|
||||
</button>
|
||||
</div>
|
||||
<div *ngIf="formGroup.enabled && !isNew && !lockStatus">
|
||||
<button type="button" mat-raised-button color="primary" class="text-uppercase mr-2" (click)="saveAndFinalize()">{{'DMP-EDITOR.ACTIONS.FINALISE' | translate}}
|
||||
|
|
|
@ -29,6 +29,11 @@
|
|||
padding-right: 6px;
|
||||
}
|
||||
|
||||
.actions {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
::ng-deep .mat-tab-labels {
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
|
|
@ -698,7 +698,8 @@
|
|||
"CANCEL": "Cancel",
|
||||
"DELETE": "Delete",
|
||||
"FINALISE": "Finalize",
|
||||
"LOCK": "DMP is locked by another user"
|
||||
"LOCK": "DMP is locked by another user",
|
||||
"PERMISSION": "You have no permission to edit this DMP"
|
||||
},
|
||||
"SNACK-BAR": {
|
||||
"UNSUCCESSFUL-DOI": "Unsuccessful DOI creation",
|
||||
|
|
Loading…
Reference in New Issue