[Koha-patches] [PATCH] Bug 2889: Removed toggle variable from koha2marclinks.tmpl. Used template __odd__ variable.
Garry Collum
gcollum at gmail.com
Mon Jun 8 22:54:23 CEST 2009
Removed toggle variable from koha2marclinks.tmpl and koh2marclinks.pl. Used template __odd__ variable instead.
---
admin/koha2marclinks.pl | 8 --------
.../prog/en/modules/admin/koha2marclinks.tmpl | 6 +++++-
2 files changed, 5 insertions(+), 9 deletions(-)
diff --git a/admin/koha2marclinks.pl b/admin/koha2marclinks.pl
index c23c39d..e65e1e5 100755
--- a/admin/koha2marclinks.pl
+++ b/admin/koha2marclinks.pl
@@ -140,15 +140,8 @@ else { # DEFAULT
my $sth2 = $dbh->prepare("SHOW COLUMNS from $tablename");
$sth2->execute;
- my $toggle = 1;
my @loop_data = ();
while ( ( my $field ) = $sth2->fetchrow_array ) {
- if ( $toggle eq 1 ) {
- $toggle = 0;
- }
- else {
- $toggle = 1;
- }
my %row_data; # get a fresh hash for the row data
$row_data{tagfield} = $fields{ $tablename . "." . $field }->{tagfield};
$row_data{tagsubfield} =
@@ -158,7 +151,6 @@ else { # DEFAULT
$row_data{kohafield} = $field;
$row_data{edit} =
"$script_name?op=add_form&tablename=$tablename&kohafield=$field";
- $row_data{toggle} = $toggle;
push( @loop_data, \%row_data );
}
$template->param(
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/koha2marclinks.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/koha2marclinks.tmpl
index e4e59f3..366c005 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/koha2marclinks.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/koha2marclinks.tmpl
@@ -155,7 +155,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><a href="<!-- TMPL_VAR name="edit" -->"><!-- TMPL_VAR name="kohafield" --></a></td>
<td><!-- TMPL_VAR name="tagfield" --></td>
<td><!-- TMPL_VAR name="tagsubfield" --></td>
--
1.5.6.5
More information about the Koha-patches
mailing list