Referring to Owen Leonard's comment from Bug 15824: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15824#c18 Having both the link and the button makes sense with batch item modifications when the list of modified items is displayed. On the batch item deletion confirmation screen I think we should move the button into the [% IF ( not_deleted_loop ) %] block so that it is only shown if the page is listing items which could not be deleted.
Created attachment 53539 [details] [review] Bug 16948: 'Return to batch item deletion' button should only show when there are items that could not be deleted To test: 1) Go to Tools --> Batch item deletion 2) Put in an item barcode and click Continue 3) Deselect the item (so that you don't actually delete it) and click Delete selected items 4) Notice there are two links that say 'Return to batch item deletion' - one as a link and one as a button. 5) Apply patch and refresh page. You may have to go back and resend the form 6) Button should be gone, only one link shows. 7) Check out the same item that you are testing with to a patron 8) Put the barcode into batch item deletion again and follow the prompts. Do not deselect it after clicking Continue this time. (It will not be deleted as it has been checked out). 9) After clicking Delete selected items, you should be redirected and see a table with the item in it and the reason it can't be deleted. The button and the link saying 'Return to batch item deletion' should both be present. Sponsored-by: Catalyst IT
Created attachment 53558 [details] [review] Bug 16948: 'Return to batch item deletion' button should only show when there are items that could not be deleted To test: 1) Go to Tools --> Batch item deletion 2) Put in an item barcode and click Continue 3) Deselect the item (so that you don't actually delete it) and click Delete selected items 4) Notice there are two links that say 'Return to batch item deletion' - one as a link and one as a button. 5) Apply patch and refresh page. You may have to go back and resend the form 6) Button should be gone, only one link shows. 7) Check out the same item that you are testing with to a patron 8) Put the barcode into batch item deletion again and follow the prompts. Do not deselect it after clicking Continue this time. (It will not be deleted as it has been checked out). 9) After clicking Delete selected items, you should be redirected and see a table with the item in it and the reason it can't be deleted. The button and the link saying 'Return to batch item deletion' should both be present. Sponsored-by: Catalyst IT Signed-off-by: Claire Gravely <c.gravely@arts.ac.uk>
Created attachment 53595 [details] [review] Bug 16948: 'Return to batch item deletion' button should only show when there are items that could not be deleted To test: 1) Go to Tools --> Batch item deletion 2) Put in an item barcode and click Continue 3) Deselect the item (so that you don't actually delete it) and click Delete selected items 4) Notice there are two links that say 'Return to batch item deletion' - one as a link and one as a button. 5) Apply patch and refresh page. You may have to go back and resend the form 6) Button should be gone, only one link shows. 7) Check out the same item that you are testing with to a patron 8) Put the barcode into batch item deletion again and follow the prompts. Do not deselect it after clicking Continue this time. (It will not be deleted as it has been checked out). 9) After clicking Delete selected items, you should be redirected and see a table with the item in it and the reason it can't be deleted. The button and the link saying 'Return to batch item deletion' should both be present. Sponsored-by: Catalyst IT Signed-off-by: Claire Gravely <c.gravely@arts.ac.uk> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Pushed to master for 16.11, thanks Aleisha!