[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] CVS: koha/html-template cmsdsearchresults.tmpl,1.3,1.4 search
From: |
Steve Tonnesen |
Subject: |
[Koha-cvs] CVS: koha/html-template cmsdsearchresults.tmpl,1.3,1.4 search.pl,1.5,1.6 |
Date: |
Fri, 10 May 2002 15:18:50 -0700 |
Update of /cvsroot/koha/koha/html-template
In directory usw-pr-cvs1:/tmp/cvs-serv8186
Modified Files:
cmsdsearchresults.tmpl search.pl
Log Message:
Modified to use Search.pm and KeywordSearch().
Note that I had to modify Search.pm as well to get it to return something other
than that bizarre @stuff array. :)
Index: cmsdsearchresults.tmpl
===================================================================
RCS file: /cvsroot/koha/koha/html-template/cmsdsearchresults.tmpl,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** cmsdsearchresults.tmpl 10 May 2002 21:26:24 -0000 1.3
--- cmsdsearchresults.tmpl 10 May 2002 22:18:48 -0000 1.4
***************
*** 5,14 ****
<TMPL_INCLUDE NAME="searchheader.tmpl">
<table border=1>
! <tr><th>Title</th><th>Author</th><th>Notes</th></tr>
<TMPL_LOOP NAME=SEARCH_RESULTS>
<tr>
<td> <TMPL_VAR NAME=title> </td>
<td> <TMPL_VAR NAME=author> </td>
! <td> <TMPL_VAR NAME=notes> </td>
</tr>
</TMPL_LOOP>
--- 5,14 ----
<TMPL_INCLUDE NAME="searchheader.tmpl">
<table border=1>
! <tr><th>Title</th><th>Author</th><th>Dewey</th></tr>
<TMPL_LOOP NAME=SEARCH_RESULTS>
<tr>
<td> <TMPL_VAR NAME=title> </td>
<td> <TMPL_VAR NAME=author> </td>
! <td> <TMPL_VAR NAME=dewey> </td>
</tr>
</TMPL_LOOP>
Index: search.pl
===================================================================
RCS file: /cvsroot/koha/koha/html-template/search.pl,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** search.pl 10 May 2002 21:26:24 -0000 1.5
--- search.pl 10 May 2002 22:18:48 -0000 1.6
***************
*** 5,8 ****
--- 5,9 ----
use C4::Database;
use CGI;
+ use C4::Search;
my $query=new CGI;
***************
*** 19,28 ****
my $template = HTML::Template->new(filename => $templatename,
die_on_bad_params => 0);
! my @results;
! my $sth=$dbh->prepare("select * from biblio where author like 's%' order by
author limit $startfrom,20");
! $sth->execute;
! while (my $data=$sth->fetchrow_hashref){
! push @results, $data;
! }
--- 20,36 ----
my $template = HTML::Template->new(filename => $templatename,
die_on_bad_params => 0);
! ##my @results;
! #my $sth=$dbh->prepare("select * from biblio where author like 's%' order by
author limit $startfrom,20");
! #$sth->execute;
! #while (my $data=$sth->fetchrow_hashref){
! # push @results, $data;
! #}
!
! my $blah;
! my %search;
! $search{'keyword'}='bear';
!
! my ($count, $resultshash, @results) = &KeywordSearch(\$blah, 'intra',
\%search, 20, $startfrom);
!
***************
*** 32,36 ****
$template->param(nextstartfrom => $startfrom);
$template->param(template => $templatename);
! $template->param(SEARCH_RESULTS => address@hidden);
print "Content-Type: text/html\n\n", $template->output;
--- 40,44 ----
$template->param(nextstartfrom => $startfrom);
$template->param(template => $templatename);
! $template->param(SEARCH_RESULTS => $resultshash);
print "Content-Type: text/html\n\n", $template->output;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] CVS: koha/html-template cmsdsearchresults.tmpl,1.3,1.4 search.pl,1.5,1.6,
Steve Tonnesen <=
- Prev by Date:
[Koha-cvs] CVS: koha/html-template cmsdsearchresults.tmpl,1.2,1.3 search.pl,1.4,1.5 searchheader.tmpl,1.1,1.2 searchresults.tmpl,1.5,1.6
- Next by Date:
[Koha-cvs] CVS: koha/html-template Search.pm,NONE,1.1
- Previous by thread:
[Koha-cvs] CVS: koha/html-template cmsdsearchresults.tmpl,1.2,1.3 search.pl,1.4,1.5 searchheader.tmpl,1.1,1.2 searchresults.tmpl,1.5,1.6
- Next by thread:
[Koha-cvs] CVS: koha/html-template Search.pm,NONE,1.1
- Index(es):