BUGFIX - pagination bar was not in template, so only the first 20 hits were

pagination bar was not in template, so only the first 20 hits were
 visible.  Probably it wasn't included because the script referenced a bogus base URL.
 Also debugified warn statement in script.  Note FIXME for bogus template reference.
 We probably don't need that template or the related selector lines for it.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
This commit is contained in:
Joe Atzberger 2008-05-19 15:36:37 -05:00 committed by Joshua Ferraro
parent 28731b7080
commit 775c74f566
2 changed files with 8 additions and 6 deletions

View file

@ -84,6 +84,7 @@ function add_item3(borrowernumber){
<!-- TMPL_IF NAME="resultsloop" -->
<div id="searchheader"> <h3>Results <!-- TMPL_VAR Name ="from" --> to <!-- TMPL_VAR Name ="to" --> of <!-- TMPL_VAR Name ="numresults" --> found for '<span class="ex"><!-- TMPL_VAR NAME="member" --></span>'</h3></div>
<!-- TMPL_IF NAME="paginationbar" --><div id="pagination_top"><!-- TMPL_VAR Name ="paginationbar" --></div><!-- /TMPL_IF -->
<form name="resultform" action="/cgi-bin/koha/labels/pcard-member-search.pl" method="get" class="checkboxed"><div style="float: right; margin-top: .5em;"><input type="submit" class="icon addchecked" value="Add checked" onclick="add_item('checked',<!-- TMPL_VAR NAME="batch_id" -->,'<!-- TMPL_VAR NAME="type" -->'); return false" /> <input type="button" class="close" value="Done" /></div>
<div style="line-height: 2em; margin-left: .7em;"><a id="CheckAll" href="/cgi-bin/koha/labels/pcard-member-search.pl">Select All</a><a id="CheckNone" href="/cgi-bin/koha/labels/pcard-member-search.pl">Clear All</a></div>
<div class="searchresults">

View file

@ -27,13 +27,14 @@ use C4::Auth;
use C4::Output;
use CGI;
use C4::Members;
use C4::Debug;
my $input = new CGI;
my $batch_id = $input->param('batch_id');
my $batch_type = $input->param('type');
warn "Passed Batch Id: $batch_id and Type: $batch_type";
$debug and warn "[In pcard-member-search] Batch Id: $batch_id, and Type: $batch_type";
my $quicksearch = $input->param('quicksearch');
my $startfrom = $input->param('startfrom')||1;
@ -42,7 +43,7 @@ my $resultsperpage = $input->param('resultsperpage')||C4::Context->preference("P
my ($template, $loggedinuser, $cookie);
if($quicksearch){
($template, $loggedinuser, $cookie)
= get_template_and_user({template_name => "members/member-quicksearch-results.tmpl",
= get_template_and_user({template_name => "members/member-quicksearch-results.tmpl", # FIXME: template doesn't exist
query => $input,
type => "intranet",
authnotrequired => 0,
@ -127,14 +128,14 @@ for (my $i=($startfrom-1)*$resultsperpage; $i < $to; $i++){
push(@resultsdata, \%row);
}
my $base_url =
'member.pl?&amp;'
'pcard-member-search.pl?'
. join(
'&amp;',
map { $_->{term} . '=' . $_->{val} } (
{ term => 'member', val => $member},
{ term => 'orderby', val => $orderby },
{ term => 'member', val => $member },
{ term => 'orderby', val => $orderby },
{ term => 'resultsperpage', val => $resultsperpage },
{ term => 'type', val => 'intranet' },
{ term => 'type', val => 'intranet' },
)
);