Bug 2889: Removed toggle variable from itemtypes.tmpl. (resubmittal)

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>
This commit is contained in:
Garry Collum 2009-06-08 19:58:13 -04:00 committed by Galen Charlton
parent 9dc44fefaf
commit 7f555830aa
2 changed files with 3 additions and 5 deletions

View file

@ -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 );

View 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>