koha-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Koha-cvs] koha/opac search [dev_week]


From: Joshua Ferraro
Subject: [Koha-cvs] koha/opac search [dev_week]
Date: Sat, 23 Sep 2006 21:36:25 +0000

CVSROOT:        /sources/koha
Module name:    koha
Branch:         dev_week
Changes by:     Joshua Ferraro <kados>  06/09/23 21:36:25

Modified files:
        opac           : search 

Log message:
        show availability context

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/opac/search?cvsroot=koha&only_with_tag=dev_week&r1=1.1.2.2&r2=1.1.2.3

Patches:
Index: search
===================================================================
RCS file: /sources/koha/koha/opac/Attic/search,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -u -b -r1.1.2.2 -r1.1.2.3
--- search      19 Sep 2006 04:46:31 -0000      1.1.2.2
+++ search      23 Sep 2006 21:36:24 -0000      1.1.2.3
@@ -2,7 +2,7 @@
 # Script to perform searching
 # For documentation try 'perldoc /path/to/search'
 #
-# $Header: /sources/koha/koha/opac/Attic/search,v 1.1.2.2 2006/09/19 04:46:31 
kados Exp $
+# $Header: /sources/koha/koha/opac/Attic/search,v 1.1.2.3 2006/09/23 21:36:24 
kados Exp $
 #
 # Copyright 2006 LibLime
 #
@@ -163,7 +163,8 @@
 
 # decide which template to use
 my $template_name;
-if (($cgi->param("limit")) || ($cgi->param("q")) ) {
+my @params = $cgi->param("limit");
+if ((@params>1) || ($cgi->param("q")) ) {
        #warn "loading results";
        $template_name = 'opac-results.tmpl';
 }
@@ -294,7 +295,7 @@
 
     my $expanded_options = $cgi->param('expanded_options');
     $template->param(expanded_options => $expanded_options);
-    warn "loading the template";
+    #warn "loading the template";
     output_html_with_http_headers $cgi, $cookie, $template->output;
     exit;
 }
@@ -334,6 +335,14 @@
 # limits are use to limit to results to a pre-defined category such as branch 
or language
 my @limits;
 @limits = split("\0",$params->{'limit'}) if $params->{'limit'};
+
+my $available;
+foreach my $limit(@limits) {
+       if ($limit =~/available/) {
+               $available = 1;
+       }
+}
+$template->param(available => $available);
 push @limits, map "yr:".$_, split("\0",$params->{'limit-yr'}) if 
$params->{'limit-yr'};
 
 # Params that can only have one value




reply via email to

[Prev in Thread] Current Thread [Next in Thread]