[Koha-patches] [PATCH] Bug 2889: Removed toggle variable from overduerules.tmpl - added __odd__

Garry Collum gcollum at gmail.com
Mon Jun 8 21:45:01 CEST 2009


Removed toggle variable from overduerules.pl and overduerules.tmpl. Used template variable __odd__ instead.
---
 .../prog/en/modules/tools/overduerules.tmpl        |    4 ++--
 tools/overduerules.pl                              |    7 -------
 2 files changed, 2 insertions(+), 9 deletions(-)

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/overduerules.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/overduerules.tmpl
index 690642b..566b246 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/overduerules.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/overduerules.tmpl
@@ -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" -->" />
diff --git a/tools/overduerules.pl b/tools/overduerules.pl
index e390250..c0d6e50 100755
--- a/tools/overduerules.pl
+++ b/tools/overduerules.pl
@@ -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){
-- 
1.5.6.5




More information about the Koha-patches mailing list