Bug 2889: Removed toggle variable from itemtypes.tmpl. (resubmittal)
authorGarry Collum <gcollum@gmail.com>
Mon, 8 Jun 2009 23:58:13 +0000 (19:58 -0400)
committerHenri-Damien LAURENT <henridamien.laurent@biblibre.com>
Wed, 16 Sep 2009 21:19:10 +0000 (23:19 +0200)
Removed toggle variable from itemtypes.tmpl and itemtypes.pl.  Used the __odd__ template variable instead.

Resubmittal - first patch contained a typo.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
admin/itemtypes.pl
koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tmpl

index 345e172..9f0395c 100755 (executable)
@@ -240,10 +240,8 @@ else {    # DEFAULT
     # if we are on the last page, the number of the last word to display
     # must not exceed the length of the results array
     my $last = min( $first + $pagesize - 1, scalar @{$results} - 1, );
-    my $toggle = 0;
     my @loop;
     foreach my $itemtype ( @{$results}[ $first .. $last ] ) {
-        $itemtype->{toggle} = ($toggle++ % 2) ? 0 : 1 ;
         $itemtype->{imageurl} = getitemtypeimagelocation( 'intranet', $itemtype->{imageurl} );
         $itemtype->{rentalcharge} = sprintf( '%.2f', $itemtype->{rentalcharge} );
         push( @loop, $itemtype );
index 93bcfb9..a519c0e 100644 (file)
@@ -290,10 +290,10 @@ Item Types Administration
     <th>Actions</th>
   </tr>
   <!-- TMPL_LOOP name="loop" -->
-    <!-- TMPL_IF NAME="toggle" -->
-  <tr>
-    <!-- TMPL_ELSE -->
+    <!-- TMPL_UNLESS name="__odd__" -->
   <tr class="highlight">
+    <!-- TMPL_ELSE -->
+  <tr>
     <!-- /TMPL_IF -->
    <!-- TMPL_UNLESS NAME="noItemTypeImages" --> <td><img src="<!-- TMPL_VAR name="imageurl" -->" alt="" /></td><!-- /TMPL_UNLESS -->
     <td>