Bug 2889: Removed toggle variable from stopwords.pl and .tmpl.

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

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
This commit is contained in:
Garry Collum 2009-06-10 19:59:01 -04:00 committed by Henri-Damien LAURENT
parent f90913bce1
commit 2db7c0fa14
2 changed files with 6 additions and 5 deletions

View File

@ -136,12 +136,9 @@ if ($op eq 'add_form') {
my $env;
my ($count,$results)=StringSearch($env,$searchfield,'web');
my @loop;
my $toggle = 0;
for (my $i=$offset; $i < ($offset+$pagesize<$count?$offset+$pagesize:$count); $i++){
my %row = (word => $results->[$i]{'word'},
toggle => $toggle);
my %row = (word => $results->[$i]{'word'});
push @loop, \%row;
$toggle = ($toggle eq 0) ? 1 : 0 ;
}
$template->param(loop => \@loop);

View File

@ -149,7 +149,11 @@
<th> </th>
</tr>
<!-- TMPL_LOOP NAME="loop" -->
<!-- TMPL_IF NAME="toggle" --> <tr><!-- TMPL_ELSE --><tr class="highlight"><!-- /TMPL_IF -->
<!-- TMPL_UNLESS NAME="__odd__" -->
<tr class="highlight">
<!-- TMPL_ELSE -->
<tr>
<!-- /TMPL_IF -->
<td><!-- TMPL_VAR NAME="word" --></td>
<td><a href="<!-- TMPL_VAR NAME="script_name" -->?op=delete_confirm&amp;searchfield=<!-- TMPL_VAR NAME="word" -->">Delete</a></td>
</tr>