Fix for bug 1539
authorChris Cormack <crc@liblime.com>
Mon, 14 Jan 2008 01:43:07 +0000 (19:43 -0600)
committerJoshua Ferraro <jmf@liblime.com>
Mon, 14 Jan 2008 22:48:12 +0000 (16:48 -0600)
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
acqui/booksellers.pl
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/booksellers.tmpl

index ba22532..c6cc8d5 100755 (executable)
@@ -80,7 +80,11 @@ my $supplier = $query->param('supplier');
 
 my @suppliers = GetBookSeller($supplier);
 my $count = scalar @suppliers;
-
+if ($count == 1){
+       $template->param( supplier_name => $suppliers[0]->{'name'},
+               id => $suppliers[0]->{'id'}
+       );
+}
 # check if we have to "close" a basket before building page
 my $op     = $query->param('op');
 my $basket = $query->param('basketno');
index 680e5a2..7f1cdc6 100644 (file)
        <div class="yui-b">
        
 <!-- TMPL_INCLUDE NAME="acquisitions-toolbar.inc" -->
-       
+<!-- TMPL_IF EXPR="count == 1" -->     
+<h1> <!-- TMPL_VAR NAME="supplier_name" --> </h1>
+<!-- TMPL_ELSE -->
 <h1>You searched on <b>vendor <!-- TMPL_VAR name="supplier" -->,</b> <!-- TMPL_VAR name="count" --> results found</h1>
+<!-- /TMPL_IF -->
 <div id="acqui_order_supplierlist">
        <table>
        <tr>