Bug 2889: Removed unused toggle variables from booksellers.pl. Added table highlighti...
authorGarry Collum <gcollum@gmail.com>
Thu, 11 Jun 2009 21:38:59 +0000 (17:38 -0400)
committerGalen Charlton <galen.charlton@liblime.com>
Fri, 12 Jun 2009 14:58:54 +0000 (09:58 -0500)
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>
acqui/booksellers.pl
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/booksellers.tmpl

index 24677ec..afda2a8 100755 (executable)
@@ -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'};
index 3a40109..54d5508 100644 (file)
        </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 -->
                                                        <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" -->