From c6c9a47d70710bc597b68cb38c6f022ea0ba0903 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 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 --- acqui/basket.pl | 4 +- .../intranet-tmpl/prog/en/modules/acqui/basket.tt | 40 ++++++++++++-------- 2 files changed, 26 insertions(+), 18 deletions(-) diff --git a/acqui/basket.pl b/acqui/basket.pl index 6385b21..02a36a7 100755 --- a/acqui/basket.pl +++ b/acqui/basket.pl @@ -102,7 +102,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)){ @@ -113,9 +112,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 091e881..41bd6e9 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt @@ -153,26 +153,36 @@ [% END %] - + + [% UNLESS book_foot_loop.size > 0 %] + + + [% ELSE %] + + + [% END %] - + [% ELSE %] [% UNLESS ( grouped ) %]
-- 1.7.10.4