From 2c307f3e92d6e4051a37f19bb17f60f45fded9d9 Mon Sep 17 00:00:00 2001 From: Mathieu Saby Date: Thu, 19 Sep 2013 10:57:44 +0200 Subject: [PATCH] Bug 7791: (follow-up) tidy up some cruft in the main patch This patch - delete warns - add a missing } - add a condition in template of avoiding asking to delete orders or records if the basket is empty To test : 1. Make the same tests as defined in test plan of main patch. It should behave the same way 2. Try to delete a basket with no records inside. You will only have a "Delete basket" button, with fewer warnings Signed-off-by: Cedric Vita Signed-off-by: Chris Cormack Signed-off-by: Marcel de Rooy Signed-off-by: Galen Charlton --- acqui/basket.pl | 4 +- .../prog/en/modules/acqui/basket.tt | 38 ++++++++++++------- 2 files changed, 25 insertions(+), 17 deletions(-) diff --git a/acqui/basket.pl b/acqui/basket.pl index df377887e4..03e5d0667e 100755 --- a/acqui/basket.pl +++ b/acqui/basket.pl @@ -115,7 +115,6 @@ if ( $op eq 'delete_confirm' ) { #Delete all orders included in that basket, and all items received. foreach my $myorder (@orders){ DelOrder($myorder->{biblionumber},$myorder->{ordernumber}); - warn "suppression de ".$myorder->{biblionumber}.' '.$myorder->{ordernumber}; } # if $delbiblio = 1, delete the records if possible if ((defined $delbiblio)and ($delbiblio ==1)){ @@ -126,9 +125,8 @@ if ( $op eq 'delete_confirm' ) { my @subscriptions = GetSubscriptionsId ($biblionumber); my $itemcount = GetItemsCount($biblionumber); DelBiblio($myorder->{biblionumber}) if ($countbiblio == 0 && $itemcount == 0 && !(@subscriptions)); - warn "suppression de la notice ".$myorder->{biblionumber}}; + } } - # delete the basket DelBasket($basketno,); $template->param( delete_confirmed => 1 ); 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 057ab5103e..23b94d9919 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt @@ -191,26 +191,36 @@ [% END %] - + - + [% ELSE %] [% UNLESS ( grouped ) %]
-- 2.39.5