From a5bb002540745d4f0fe8dd438ca389afdc89f24a Mon Sep 17 00:00:00 2001 From: Mathieu Saby Date: Thu, 19 Sep 2013 10:57:44 +0200 Subject: [PATCH] Bug 7791 Followup: delete warns, add missing curly braket and make a simpler message if basket is void Content-Type: text/plain; charset=utf-8 This patch - delete warns - add a missing } - add a condition in template of avoiding asking to suppress orders or records if the basket is void 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 less warnings Signed-off-by: Cedric Vita Signed-off-by: Chris Cormack Signed-off-by: Marcel de Rooy --- acqui/basket.pl | 4 +-- .../intranet-tmpl/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 df37788..03e5d06 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 057ab51..23b94d9 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 ) %]
-- 1.7.7.6