[Koha-patches] [PATCH] Bug 2889: Removed toggle variable from Serials vendor search.
Garry Collum
gcollum at gmail.com
Thu Jul 23 05:53:00 CEST 2009
Removed toggle variable from acqui-search-result.pl. Added highlighting using __odd__ to acqui-search-result.tmpl.
---
.../en/modules/serials/acqui-search-result.tmpl | 6 +++++-
serials/acqui-search-result.pl | 8 --------
2 files changed, 5 insertions(+), 9 deletions(-)
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/acqui-search-result.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/acqui-search-result.tmpl
index 2e8717d..8ee1e13 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/acqui-search-result.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/acqui-search-result.tmpl
@@ -27,7 +27,11 @@ function GetIt(aqbooksellerid,name)
<th>Select</th>
</tr>
<!-- TMPL_LOOP name="loop_suppliers" -->
- <tr>
+ <!-- TMPL_UNLESS name="__odd__">
+ <tr class="highlight">
+ <!-- TMPL_ELSE -->
+ <tr>
+ <!-- /TMPL_UNLESS -->
<td><!-- TMPL_VAR name="name" --></td>
<td><a href="#" onclick="GetIt(<!-- TMPL_VAR NAME="aqbooksellerid" -->,'<!-- TMPL_VAR escape="URL" NAME="name" -->')">Choose</a></td>
</tr>
diff --git a/serials/acqui-search-result.pl b/serials/acqui-search-result.pl
index 6066bdd..4f410bd 100755
--- a/serials/acqui-search-result.pl
+++ b/serials/acqui-search-result.pl
@@ -63,20 +63,12 @@ my @suppliers = GetBookSeller($supplier);
my $count = scalar @suppliers;
#build result page
-my $toggle=0;
my @loop_suppliers;
for (my $i=0; $i<$count; $i++) {
my $orders = GetPendingOrders($suppliers[$i]->{'id'});
my $ordcount = scalar @$orders;
my %line;
- if ($toggle==0){
- $line{even}=1;
- $toggle=1;
- } else {
- $line{even}=0;
- $toggle=0;
- }
$line{aqbooksellerid} =$suppliers[$i]->{'id'};
$line{name} = $suppliers[$i]->{'name'};
$line{active} = $suppliers[$i]->{'active'};
--
1.5.6.5
More information about the Koha-patches
mailing list