From 172a93357d3e42c822bdca25e88cc90d7d6a30dd 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 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 --- acqui/basket.pl | 6 +++++- koha-tmpl/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 31b96bb..284b082 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 43af8be..d45e9d8 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 %]