From 01371f8fad6efd30bf5a3b10bf3cf9f5eabbe5b5 Mon Sep 17 00:00:00 2001 From: Aleisha Amohia Date: Wed, 15 Feb 2017 00:30:57 +0000 Subject: [PATCH] Bug 10978: Redirect to basket list of a supplier after deleting a basket MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This patch redirects to the vendor's list of baskets after deleting a basket, fixes breadcrumbs after deletion and also hides the toolbar actions after deletion (seeing as you can't edit/export etc a basket that no longer exists). To test: 1) Go to Acquisitions -> find a vendor -> view a basket or create a new basket 2) Delete the basket. Notice you are taken to a list of all vendors and baskets 3) Apply patch and do step 1 again 4) Delete the basket. Notice appropriate breadcrumbs, no toolbar, and confirm link to return to baskets for the vendor works. Sponsored-by: Catalyst IT Followed test plan, works as expected (links to vendor's baskets and all baskets) Signed-off-by: Marc Véron Re-tested. Wording of buttons "Show baskets for vendor..." and "Show all active baskets" makes sense. Signed-off-by: Marc Véron Signed-off-by: Jonathan Druart Signed-off-by: Kyle M Hall --- acqui/basket.pl | 6 +++++- .../intranet-tmpl/prog/en/modules/acqui/basket.tt | 11 +++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/acqui/basket.pl b/acqui/basket.pl index 31b96bbaaa..284b082555 100755 --- a/acqui/basket.pl +++ b/acqui/basket.pl @@ -156,7 +156,11 @@ if ( $op eq 'delete_confirm' ) { } # delete the basket DelBasket($basketno,); - $template->param( delete_confirmed => 1 ); + $template->param( + delete_confirmed => 1, + name => $bookseller->name, + booksellerid => $booksellerid, + ); } elsif ( !$bookseller ) { $template->param( NO_BOOKSELLER => 1 ); } elsif ($op eq 'export') { diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt index 4502d2afc9..b7e080a708 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt @@ -167,7 +167,12 @@ [% INCLUDE 'acquisitions-search.inc' %] - +
@@ -182,6 +187,7 @@ [% IF !confirm_close && !edi_confirm %] [% UNLESS ( selectbasketg ) %] [% UNLESS ( closedate ) %] + [% UNLESS ( delete_confirmed ) %]
[% IF active %] @@ -211,6 +217,7 @@
[% END %]
+ [% END %]