[Koha-patches] [PATCH] Bug 2889: Removed unused toggle variable from authtypes.pl

Garry Collum gcollum at gmail.com
Wed Jun 10 00:08:46 CEST 2009


Removed unused toggle variable from authtypes.pl and add template __odd__ logic for highlighting to authtypes.tmpl
---
 admin/authtypes.pl                                 |    6 ------
 .../prog/en/modules/admin/authtypes.tmpl           |    4 ++++
 2 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/admin/authtypes.pl b/admin/authtypes.pl
index d360680..533d1eb 100755
--- a/admin/authtypes.pl
+++ b/admin/authtypes.pl
@@ -143,15 +143,9 @@ if ($op eq 'add_form') {
 ################## DEFAULT ##################################
 } else { # DEFAULT
     my ($count,$results)=StringSearch($searchfield,'web');
-    my $toggle="white";
     my @loop_data;
     for (my $i=$offset; $i < ($offset+$pagesize<$count?$offset+$pagesize:$count); $i++){
         my %row_data;
-        if ($toggle eq 'white'){
-            $row_data{toggle}="#ffffcc";
-        } else {
-            $row_data{toggle}="white";
-        }
         $row_data{authtypecode} = $results->[$i]{'authtypecode'};
         $row_data{authtypetext} = $results->[$i]{'authtypetext'};
         $row_data{auth_tag_to_report} = $results->[$i]{'auth_tag_to_report'};
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authtypes.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authtypes.tmpl
index 774d947..b9161e1 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authtypes.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authtypes.tmpl
@@ -145,7 +145,11 @@ function Check(f) {
 	</tr>
 	
 	<!-- TMPL_LOOP NAME="loop" -->
+	<!-- TMPL_UNLESS NAME="__odd__" -->
+		<tr class="highlight">
+	<!-- TMPL_ELSE -->
 		<tr>
+	<!-- /TMPL_UNLESS -->
 			<td><!-- TMPL_VAR NAME="authtypecode" --></td>
 			<td><!-- TMPL_VAR NAME="authtypetext" --></td>
 			<td><!-- TMPL_VAR NAME="summary" --></td>
-- 
1.5.6.5




More information about the Koha-patches mailing list