mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
80195: Mimic back/save/discard buttons of other edit pages
This commit is contained in:
@@ -30,16 +30,24 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button (click)="moveCollection()" class="btn btn-primary" [disabled]=!canMove>
|
||||
<span *ngIf="!processing"> {{'item.edit.move.move' | translate}}</span>
|
||||
<span *ngIf="processing"><i class='fas fa-circle-notch fa-spin'></i>
|
||||
{{'item.edit.move.processing' | translate}}
|
||||
<div class="button-row bottom">
|
||||
<div class="float-right">
|
||||
<button [routerLink]="[(itemPageRoute$ | async), 'edit']" class="btn btn-outline-secondary">
|
||||
<i class="fas fa-arrow-left"></i> {{'item.edit.move.cancel' | translate}}
|
||||
</button>
|
||||
<button class="btn btn-primary mr-0" [disabled]="!canMove" (click)="moveCollection()">
|
||||
<span *ngIf="!processing">
|
||||
<i class="fas fa-save"></i> {{'item.edit.move.save-button' | translate}}
|
||||
</span>
|
||||
<span *ngIf="processing">
|
||||
<i class="fas fa-circle-notch fa-spin"></i> {{'item.edit.move.processing' | translate}}
|
||||
</span>
|
||||
</button>
|
||||
<button [routerLink]="[(itemPageRoute$ | async), 'edit']"
|
||||
class="btn btn-outline-secondary">
|
||||
{{'item.edit.move.cancel' | translate}}
|
||||
<button class="btn btn-danger" [disabled]="!canSubmit" (click)="discard()">
|
||||
<i class="fas fa-times"></i> {{"item.edit.move.discard-button" | translate}}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -121,6 +121,11 @@ export class ItemMoveComponent implements OnInit {
|
||||
);
|
||||
}
|
||||
|
||||
discard(): void {
|
||||
this.selectedCollection = null;
|
||||
this.canSubmit = false;
|
||||
}
|
||||
|
||||
get canMove(): boolean {
|
||||
return this.canSubmit && this.selectedCollection?.id !== this.originalCollection.id;
|
||||
}
|
||||
|
@@ -1623,7 +1623,11 @@
|
||||
|
||||
|
||||
|
||||
"item.edit.move.cancel": "Cancel",
|
||||
"item.edit.move.cancel": "Back",
|
||||
|
||||
"item.edit.move.save-button": "Save",
|
||||
|
||||
"item.edit.move.discard-button": "Discard",
|
||||
|
||||
"item.edit.move.description": "Select the collection you wish to move this item to. To narrow down the list of displayed collections, you can enter a search query in the box.",
|
||||
|
||||
|
Reference in New Issue
Block a user