[Koha-patches] [PATCH] Bug 3391: Invalid xhtml in spent.tmpl.

Garry Collum gcollum at gmail.com
Sun Jul 5 00:51:18 CEST 2009


Missing quotes in an href.

This patch also removes a toggle variable in spent.pl and adds a __odd__ definition to spent.tmpl. (in reference to but 2889).
---
 acqui/spent.pl                                     |    8 --------
 .../intranet-tmpl/prog/en/modules/acqui/spent.tmpl |   10 +++++-----
 2 files changed, 5 insertions(+), 13 deletions(-)

diff --git a/acqui/spent.pl b/acqui/spent.pl
index c9c13ea..59da082 100755
--- a/acqui/spent.pl
+++ b/acqui/spent.pl
@@ -54,7 +54,6 @@ my $sth = $dbh->prepare($query);
 $sth->execute( $bookfund, $start, $end );
 
 my $total = 0;
-my $toggle;
 my @spent_loop;
 while ( my $data = $sth->fetchrow_hashref ) {
     my $recv = $data->{'qrev'};
@@ -63,13 +62,6 @@ while ( my $data = $sth->fetchrow_hashref ) {
         $data->{'subtotal'} = $subtotal;
         $data->{'unitprice'} += 0;
         $total               += $subtotal;
-        if ($toggle) {
-            $toggle = 0;
-        }
-        else {
-            $toggle = 1;
-        }
-        $data->{'toggle'} = $toggle;
         push @spent_loop, $data;
     }
 
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/spent.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/spent.tmpl
index 50b8455..7b069d1 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/spent.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/spent.tmpl
@@ -33,17 +33,17 @@
 </tr>
 
 <!--TMPL_LOOP NAME="SPENTLOOP"-->
-	<!--TMPL_IF name="toggle"-->
-		<tr class="hilighted">
+	<!--TMPL_UNLESS name="__odd__"-->
+		<tr class="highlight">
 	<!--TMPL_ELSE-->
-		<tr class="hilighted2">
-	<!--/TMPL_IF-->
+		<tr>
+	<!--/TMPL_UNLESS-->
 	
 		<td><!--TMPL_VAR NAME="title"-->	</td>
 		<td>
                   <a href="/cgi-bin/koha/acqui/acquire.pl?recieve=<!-- TMPL_VAR NAME="ordnum"-->&amp;biblio=<!--TMPL_VAR NAME="biblionumber"-->&amp;invoice=<!--TMPL_VAR NAME="booksellerinvoicenumber"-->&amp;supplierid=<!--TMPL_VAR NAME="booksellerid"-->&amp;catview=yes"><!-- TMPL_VAR NAME="ordnum"--></a></td>
 		<td><!--TMPL_VAR NAME="booksellerid"-->	</td>
-		<td>	<a href=/cgi-bin/koha/acqui/receive.pl?invoice=<!--TMPL_VAR NAME="booksellerinvoicenumber"-->&amp;supplierid=<!--TMPL_VAR NAME="booksellerid"-->><!--TMPL_VAR NAME="booksellerinvoicenumber"--></a></td>
+		<td>	<a href="/cgi-bin/koha/acqui/receive.pl?invoice=<!--TMPL_VAR NAME="booksellerinvoicenumber"-->&amp;supplierid=<!--TMPL_VAR NAME="booksellerid"-->"><!--TMPL_VAR NAME="booksellerinvoicenumber"--></a></td>
 		<td><!--TMPL_VAR NAME="itemtype"-->	</td>
 		<td><!--TMPL_VAR NAME="qrev"-->	</td>
 		<td><!--TMPL_VAR NAME="unitprice"-->		</td>
-- 
1.5.6.5




More information about the Koha-patches mailing list