[Koha-patches] [PATCH] Bug 2889: Removed toggle variable from itemtypes.tmpl. (resubmittal)
Garry Collum
gcollum at gmail.com
Tue Jun 9 01:58:13 CEST 2009
Removed toggle variable from itemtypes.tmpl and itemtypes.pl. Used the __odd__ template variable instead.
Resubmittal - first patch contained a typo.
---
admin/itemtypes.pl | 2 --
.../prog/en/modules/admin/itemtypes.tmpl | 6 +++---
2 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/admin/itemtypes.pl b/admin/itemtypes.pl
index 345e172..9f0395c 100755
--- a/admin/itemtypes.pl
+++ b/admin/itemtypes.pl
@@ -240,10 +240,8 @@ else { # DEFAULT
# if we are on the last page, the number of the last word to display
# must not exceed the length of the results array
my $last = min( $first + $pagesize - 1, scalar @{$results} - 1, );
- my $toggle = 0;
my @loop;
foreach my $itemtype ( @{$results}[ $first .. $last ] ) {
- $itemtype->{toggle} = ($toggle++ % 2) ? 0 : 1 ;
$itemtype->{imageurl} = getitemtypeimagelocation( 'intranet', $itemtype->{imageurl} );
$itemtype->{rentalcharge} = sprintf( '%.2f', $itemtype->{rentalcharge} );
push( @loop, $itemtype );
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tmpl
index 93bcfb9..a519c0e 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tmpl
@@ -290,10 +290,10 @@ Item Types Administration
<th>Actions</th>
</tr>
<!-- TMPL_LOOP name="loop" -->
- <!-- TMPL_IF NAME="toggle" -->
- <tr>
- <!-- TMPL_ELSE -->
+ <!-- TMPL_UNLESS name="__odd__" -->
<tr class="highlight">
+ <!-- TMPL_ELSE -->
+ <tr>
<!-- /TMPL_IF -->
<!-- TMPL_UNLESS NAME="noItemTypeImages" --> <td><img src="<!-- TMPL_VAR name="imageurl" -->" alt="" /></td><!-- /TMPL_UNLESS -->
<td>
--
1.5.6.5
More information about the Koha-patches
mailing list