Bug 2889: Removed unused toggle variables from booksellers.pl. Added table highlighting to booksellers.tmpl.

Removed unused toggle and line(even) variables from booksellers.pl.  Added highlighting to the two display tables in booksellers.tmpl.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
This commit is contained in:
Garry Collum 2009-06-11 17:38:59 -04:00 committed by Galen Charlton
parent f226b02dd4
commit 4cd469fe2e
2 changed files with 9 additions and 8 deletions

View File

@ -98,19 +98,12 @@ if ($query->param('op') eq 'close') {
}
#build result page
my $toggle = 0;
my @loop_suppliers;
for ( my $i = 0 ; $i < $count ; $i++ ) {
my $orders = GetPendingOrders( $suppliers[$i]->{'id'}, "grouped" );
my $ordcount = scalar @$orders;
my %line;
if ( $toggle == 0 ) {
$line{even} = 1;
$toggle = 1;
} else {
$line{even} = 0;
$toggle = 0;
}
$line{supplierid} = $suppliers[$i]->{'id'};
$line{name} = $suppliers[$i]->{'name'};
$line{active} = $suppliers[$i]->{'active'};

View File

@ -30,7 +30,11 @@
</tr>
<!-- TMPL_LOOP name="loop_suppliers" -->
<!-- TMPL_UNLESS name="__odd__" -->
<tr class="highlight">
<!-- TMPL_ELSE -->
<tr>
<!-- /TMPL_UNLESS -->
<td> <!-- TMPL_IF name="active" -->
<a href="basket.pl?supplierid=<!-- TMPL_VAR name="supplierid" -->">Add order</a>
<!-- TMPL_ELSE -->
@ -54,7 +58,11 @@
<th>&nbsp;</th>
</tr>
<!-- TMPL_LOOP NAME="loop_basket" -->
<!-- TMPL_UNLESS NAME="__odd__" -->
<tr class="highlight">
<!-- TMPL_ELSE -->
<tr>
<!-- /TMPL_UNLESS -->
<td><!-- TMPL_VAR NAME="basketno" --></td>
<td><TMPL_VAR NAME="total"></td>
<td> <!-- TMPL_VAR name="firstname" -->