Removed toggle variable from stopwords.pl and stopwords.tmpl. Used template 
__odd_ variable instead.
---
 admin/stopwords.pl                                 |    5 +----
 .../prog/en/modules/admin/stopwords.tmpl           |    6 +++++-
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/admin/stopwords.pl b/admin/stopwords.pl
index c16a50c..d753085 100755
--- a/admin/stopwords.pl
+++ b/admin/stopwords.pl
@@ -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);
 
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/stopwords.tmpl 
b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/stopwords.tmpl
index 7fb574c..5c0f821 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/stopwords.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/stopwords.tmpl
@@ -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>
-- 
1.5.6.5

_______________________________________________
Koha-patches mailing list
[email protected]
http://lists.koha.org/mailman/listinfo/koha-patches

Reply via email to