Bug 2889: Removed toggle variable from currency.tmpl. Used template __odd__ instead.

Removed toggle variable from currency.tmpl and currency.pl.  Used template __odd_ variable instead.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
This commit is contained in:
Garry Collum 2009-06-08 17:36:25 -04:00 committed by Galen Charlton
parent 527898f6f3
commit c09bdabaf4
2 changed files with 5 additions and 7 deletions

View file

@ -165,7 +165,6 @@ if ($op eq 'add_form') {
my ($count,$results)=StringSearch($searchfield,'web');
my @loop;
my $toggle = 0;
for (my $i=$offset; $i < ($offset+$pagesize<$count?$offset+$pagesize:$count); $i++){
my %row = (
currency => $results->[$i]{'currency'},
@ -173,7 +172,6 @@ if ($op eq 'add_form') {
symbol => $results->[$i]{'symbol'},
timestamp => format_date($results->[$i]{'timestamp'}),
);
($i % 2) and $row{toggle} = 1;
push @loop, \%row;
}
$template->param(loop => \@loop);

View file

@ -204,12 +204,12 @@
<th colspan="2">&nbsp;</th>
</tr>
<!-- TMPL_LOOP NAME="loop" -->
<!-- TMPL_IF NAME="toggle" -->
<tr class="highlight"><td class="highlight">
<!-- TMPL_UNLESS NAME="__odd__" -->
<tr class="highlight">
<!-- TMPL_ELSE -->
<tr><td>
<!-- /TMPL_IF -->
<!-- TMPL_VAR NAME="currency" --></td>
<tr>
<!-- /TMPL_UNLESS -->
<td><!-- TMPL_VAR NAME="currency" --></td>
<td><!-- TMPL_VAR NAME="rate" --></td>
<td><!-- TMPL_VAR NAME="symbol" --></td>
<td><!-- TMPL_VAR NAME="timestamp" --></td>