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> -->
|
||||||
</mat-tab-group>
|
</mat-tab-group>
|
||||||
|
|
||||||
<span *ngIf="lockStatus">
|
<div class="d-flex justify-content-end pt-2 pb-4 pl-2">
|
||||||
<mat-icon color="accent" class="align-self-center mr-1">info_outlined</mat-icon>
|
<mat-icon *ngIf="lockStatus || !isUserOwner" 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>
|
<div *ngIf="lockStatus" class="align-self-center mr-3">{{'DMP-EDITOR.ACTIONS.LOCK' | translate}}</div>
|
||||||
</span>
|
<div *ngIf="!isUserOwner" class="align-self-center mr-3">{{'DMP-EDITOR.ACTIONS.PERMISSION' | translate}}</div>
|
||||||
<div *ngIf="!isFinalized" class="d-flex justify-content-end pt-2 pb-4 pl-2">
|
<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">
|
<div *ngIf="!isNew">
|
||||||
<button mat-raised-button color="primary" (click)="cancel(dmp.id)" type="button" class="text-uppercase mr-2">
|
<button mat-raised-button color="primary" (click)="cancel(dmp.id)" type="button" class="text-uppercase mr-2">
|
||||||
{{'DMP-EDITOR.ACTIONS.CANCEL' | translate}}
|
{{'DMP-EDITOR.ACTIONS.CANCEL' | translate}}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</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">
|
<div *ngIf="formGroup.enabled && !lockStatus">
|
||||||
<button *ngIf="!isNew" mat-raised-button type="submit" class="text-uppercase dark-theme mr-2" color="primary">
|
<button *ngIf="!isNew" mat-raised-button type="submit" class="text-uppercase dark-theme mr-2" color="primary">
|
||||||
{{'DMP-EDITOR.ACTIONS.SAVE-CHANGES' | translate}}
|
{{'DMP-EDITOR.ACTIONS.SAVE-CHANGES' | translate}}
|
||||||
</button>
|
</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>
|
||||||
<div *ngIf="formGroup.enabled && !isNew && !lockStatus">
|
<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}}
|
<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;
|
padding-right: 6px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.actions {
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
|
}
|
||||||
|
|
||||||
::ng-deep .mat-tab-labels {
|
::ng-deep .mat-tab-labels {
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
|
|
|
@ -698,7 +698,8 @@
|
||||||
"CANCEL": "Cancel",
|
"CANCEL": "Cancel",
|
||||||
"DELETE": "Delete",
|
"DELETE": "Delete",
|
||||||
"FINALISE": "Finalize",
|
"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": {
|
"SNACK-BAR": {
|
||||||
"UNSUCCESSFUL-DOI": "Unsuccessful DOI creation",
|
"UNSUCCESSFUL-DOI": "Unsuccessful DOI creation",
|
||||||
|
|
Loading…
Reference in New Issue