From ca6227715f1d612f547074717c7fedd8d03bb45c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jean-Andr=C3=A9=20Santoni?= Date: Fri, 10 Jul 2009 11:59:31 +0200 Subject: [PATCH] Several improvements to basket display. --- acqui/basket.pl | 24 +----- .../prog/en/modules/acqui/basket.tmpl | 83 ++++++++++--------- 2 files changed, 45 insertions(+), 62 deletions(-) diff --git a/acqui/basket.pl b/acqui/basket.pl index 811702c58c..849155b8c3 100755 --- a/acqui/basket.pl +++ b/acqui/basket.pl @@ -65,27 +65,6 @@ the supplier this script have to display the basket. my $query = new CGI; my $basketno = $query->param('basketno'); my $booksellerid = $query->param('supplierid'); -my $sort = $query->param('order') || "aqorders.ordernumber"; - -my @sort_loop; -if (defined $sort) { - foreach (split /\,/, $sort) { - my %sorthash = ( - string => $_, - ); - # other possibly valid tables for later: aqbookfund biblio biblioitems - if ( - (/^\s*(biblioitems)\.(\w+)\s*$/ and $2 eq 'publishercode') or - (/^\s*(aqorders)\.(\w+)\s*$/ and $2 eq 'ordernumber' ) - ) { - $sorthash{table} = $1; - $sorthash{field} = $2; - } else { - $sorthash{error} = 1; - } - push @sort_loop, \%sorthash; - } -} my ( $template, $loggedinuser, $cookie ) = get_template_and_user( { @@ -231,7 +210,7 @@ if ( $op eq 'delete_confirm' ) { "loggedinuser: $loggedinuser; creationdate: %s; authorisedby: %s", $basket->{creationdate}, $basket->{authorisedby}; - my @results = GetOrders( $basketno, $sort ); + my @results = GetOrders( $basketno ); my $count = scalar @results; my $sub_total; # total of line totals @@ -325,7 +304,6 @@ if ( $op eq 'delete_confirm' ) { address4 => $bookseller->{'address4'}, entrydate => format_date( $results[0]->{'entrydate'} ), books_loop => \@books_loop, - sort_loop => \@sort_loop, count => $count, gist => $gist ? sprintf( "%.2f", $gist ) : 0, gist_rate => sprintf( "%.2f", $prefgist * 100 ) . '%', diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tmpl index 52141e9b8f..b9265e60fa 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tmpl @@ -1,7 +1,20 @@ -Koha › Acquisitions › <!-- TMPL_UNLESS name="basketno" -->New <!-- /TMPL_UNLESS -->Basket <!-- TMPL_IF NAME="basketno" -->(<!-- TMPL_VAR NAME="basketno" -->)<!-- /TMPL_IF --> for <!-- TMPL_VAR NAME="name" --> +Koha › Acquisitions › <!-- TMPL_UNLESS name="basketno" -->New <!-- /TMPL_UNLESS --><!-- TMPL_IF NAME="delete_confirm" -->Delete <!-- /TMPL_IF -->Basket <!-- TMPL_VAR NAME="basketname" --> (<!-- TMPL_VAR NAME="basketno" -->) for <!-- TMPL_VAR NAME="name" --> + +