Bug 2889: Removed toggle variable from stopwords.pl and .tmpl.
authorGarry Collum <gcollum@gmail.com>
Wed, 10 Jun 2009 23:59:01 +0000 (19:59 -0400)
committerHenri-Damien LAURENT <henridamien.laurent@biblibre.com>
Wed, 16 Sep 2009 21:19:11 +0000 (23:19 +0200)
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>
admin/stopwords.pl
koha-tmpl/intranet-tmpl/prog/en/modules/admin/stopwords.tmpl

index c16a50c..d753085 100755 (executable)
@@ -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);
 
index 7fb574c..5c0f821 100644 (file)
                     <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>