Bug 2889: Removed toggle variable from overduerules.tmpl - added __odd__
authorGarry Collum <gcollum@gmail.com>
Mon, 8 Jun 2009 19:45:01 +0000 (15:45 -0400)
committerGalen Charlton <galen.charlton@liblime.com>
Mon, 8 Jun 2009 21:47:58 +0000 (16:47 -0500)
Removed toggle variable from overduerules.pl and overduerules.tmpl. Used template variable __odd__ instead.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
koha-tmpl/intranet-tmpl/prog/en/modules/tools/overduerules.tmpl
tools/overduerules.pl

index 690642b..566b246 100644 (file)
@@ -80,11 +80,11 @@ $(document).ready(function() {
                         <th scope="col">Delay</th><th scope="col">Letter</th><th scope="col">Debar</th><th scope="col">Delay</th><th scope="col">Letter</th><th scope="col">Debar</th><th scope="col">Delay</th><th scope="col">Letter</th><th scope="col">Debar</th>
                     </tr>
                     <!-- TMPL_LOOP NAME="table" -->
-                     <!-- TMPL_IF NAME="toggle" -->
+                     <!-- TMPL_UNLESS NAME="__odd__" -->
                                 <tr class="highlight">
                             <!-- TMPL_ELSE -->
                                 <tr>
-                            <!-- /TMPL_IF -->
+                            <!-- /TMPL_UNLESS -->
                             <th scope="row"><!-- TMPL_VAR NAME="line" --></th>
 <td>
                                 <input name="delay1-<!-- TMPL_VAR NAME="overduename" -->" size="5" value="<!-- TMPL_VAR NAME="delay1" -->" />
index e390250..c0d6e50 100755 (executable)
@@ -182,17 +182,10 @@ my $letters = GetLetters("circulation");
 my $countletters = scalar $letters;
 
 my @line_loop;
-my $toggle = 1;
 
 for my $data (@categories) {
-    if ( $toggle eq 1 ) {
-        $toggle = 0;
-    } else {
-        $toggle = 1;
-    }
     my %row = (
         overduename => $data->{'categorycode'},
-        toggle      => $toggle,
         line        => $data->{'description'}
     );
     if (%temphash and not $input_saved){