From 8498a169795a60463987afbd8b87b1b3c8b8e153 Mon Sep 17 00:00:00 2001 From: Yana De Pauw <yana@atmire.com> Date: Fri, 30 Nov 2018 11:18:57 +0100 Subject: [PATCH] 55990: Item move - tweaks --- resources/i18n/en.json | 4 +++- .../edit-item-page/item-move/item-move.component.html | 4 ++-- .../edit-item-page/item-move/item-move.component.ts | 4 ++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/resources/i18n/en.json b/resources/i18n/en.json index 3cdf0bc180..cf87e423a7 100644 --- a/resources/i18n/en.json +++ b/resources/i18n/en.json @@ -113,7 +113,9 @@ "checkbox": "Inherit policies" }, "move": "Move", - "cancel": "Cancel" + "cancel": "Cancel", + "success": "The item has been moved succesfully", + "error": "An error occured when attempting to move the item" } } }, diff --git a/src/app/+item-page/edit-item-page/item-move/item-move.component.html b/src/app/+item-page/edit-item-page/item-move/item-move.component.html index b3627e65bb..063028c719 100644 --- a/src/app/+item-page/edit-item-page/item-move/item-move.component.html +++ b/src/app/+item-page/edit-item-page/item-move/item-move.component.html @@ -1,7 +1,7 @@ <div class="container"> <div class="row"> <div class="col-12"> - <h2>{{'item.edit.move.head' | translate: { id: (itemRD$ | async)?.payload?.id} }}</h2> + <h2>{{'item.edit.move.head' | translate: { id: (itemRD$ | async)?.payload?.handle} }}</h2> <p>{{'item.edit.move.description' | translate}}</p> <div class="row"> <div class="col-12"> @@ -33,7 +33,7 @@ <button (click)="moveCollection()" class="btn btn-outline-secondary">{{'item.edit.move.move' | translate}} </button> - <button [routerLink]="['/items/', (itemRD$ | async)?.payload?.id]" class="btn btn-outline-secondary"> + <button [routerLink]="['/items/', (itemRD$ | async)?.payload?.id, 'edit']" class="btn btn-outline-secondary"> {{'item.edit.move.cancel' | translate}} </button> </div> diff --git a/src/app/+item-page/edit-item-page/item-move/item-move.component.ts b/src/app/+item-page/edit-item-page/item-move/item-move.component.ts index 359c04c8e7..07894c4504 100644 --- a/src/app/+item-page/edit-item-page/item-move/item-move.component.ts +++ b/src/app/+item-page/edit-item-page/item-move/item-move.component.ts @@ -104,9 +104,9 @@ export class ItemMoveComponent implements OnInit { (response: RestResponse) => { this.router.navigate([getItemEditPath(this.itemId)]); if (response.isSuccessful) { - this.notificationsService.success(this.translateService.get('item.move.success')); + this.notificationsService.success(this.translateService.get('item.edit.move.success')); } else { - this.notificationsService.error(this.translateService.get('item.move.error')); + this.notificationsService.error(this.translateService.get('item.edit.move.error')); } } ); -- GitLab