[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] CVS: koha/opac opac-searchresults.pl,1.1.2.8,1.1.2.9
From: |
Steve Tonnesen |
Subject: |
[Koha-cvs] CVS: koha/opac opac-searchresults.pl,1.1.2.8,1.1.2.9 |
Date: |
Fri, 06 Dec 2002 12:25:03 -0800 |
Update of /cvsroot/koha/koha/opac
In directory sc8-pr-cvs1:/tmp/cvs-serv27236
Modified Files:
Tag: rel-1-2
opac-searchresults.pl
Log Message:
Fixed the numbered page indexes at the top of the search results. They were
calculated assuming 10 results per page, and the default was changed to 20. I
assume this is going to become a configurable parameter at some time (system
default, user preference).
Index: opac-searchresults.pl
===================================================================
RCS file: /cvsroot/koha/koha/opac/opac-searchresults.pl,v
retrieving revision 1.1.2.8
retrieving revision 1.1.2.9
diff -C2 -r1.1.2.8 -r1.1.2.9
*** opac-searchresults.pl 26 Nov 2002 04:40:02 -0000 1.1.2.8
--- opac-searchresults.pl 6 Dec 2002 20:24:58 -0000 1.1.2.9
***************
*** 61,65 ****
my $env;
$env->{itemcount}=1;
! my $number_of_results = 20;
my @results;
my $count;
--- 61,65 ----
my $env;
$env->{itemcount}=1;
! my $number_of_results_per_page = 20;
my @results;
my $count;
***************
*** 67,74 ****
my $subjectitems=$query->param('subjectitems');
if ($subjectitems) {
! @results = subsearch($env,$subjectitems, $number_of_results, $startfrom);
$count = $#results+1;
} else {
! ($count, @results) =
catalogsearch($env,'',\%search,$number_of_results,$startfrom);
}
--- 67,74 ----
my $subjectitems=$query->param('subjectitems');
if ($subjectitems) {
! @results = subsearch($env,$subjectitems, $number_of_results_per_page,
$startfrom);
$count = $#results+1;
} else {
! ($count, @results) =
catalogsearch($env,'',\%search,$number_of_results_per_page,$startfrom);
}
***************
*** 115,124 ****
my $numbers;
@$numbers = ();
! if ($count>10) {
! for (my $i=1; $i<$count/10+1; $i++) {
my $highlight=0;
my $themelang = $template->param('themelang');
! ($startfrom==($i-1)*10) && ($highlight=1);
! push @$numbers, { number => $i, highlight => $highlight , startfrom =>
($i-1)*10 };
}
}
--- 115,124 ----
my $numbers;
@$numbers = ();
! if ($count>$number_of_results_per_page) {
! for (my $i=1; $i<$count/$number_of_results_per_page+1; $i++) {
my $highlight=0;
my $themelang = $template->param('themelang');
! ($startfrom==($i-1)*$number_of_results_per_page) && ($highlight=1);
! push @$numbers, { number => $i, highlight => $highlight , startfrom =>
($i-1)*$number_of_results_per_page };
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] CVS: koha/opac opac-searchresults.pl,1.1.2.8,1.1.2.9,
Steve Tonnesen <=
- Prev by Date:
[Koha-cvs] CVS: koha/koha-tmpl/opac-tmpl/hlt/en/includes about-us-start.inc,1.1.2.1,1.1.2.2 kids-space-start.inc,1.1.2.1,1.1.2.2 main.css,1.1.2.5,1.1.2.6 maori-start.inc,1.1.2.1,1.1.2.2 membership-left-nav.inc,1.1.2.4,1.1.2.5 membership-start.inc,1.1.2.1,1.1.2.2 news-start.inc,1.1.2.1,1.1.2.2 search-left-nav.inc,1.1.2.3,1.1.2.4 search-start.inc,1.1.2.1,1.1.2.2 teens-zone-start.inc,1.1.2.1,1.1.2.2
- Next by Date:
[Koha-cvs] CVS: koha/opac opac-searchresults.pl,1.1.2.9,1.1.2.10
- Previous by thread:
[Koha-cvs] CVS: koha/koha-tmpl/opac-tmpl/hlt/en/includes about-us-start.inc,1.1.2.1,1.1.2.2 kids-space-start.inc,1.1.2.1,1.1.2.2 main.css,1.1.2.5,1.1.2.6 maori-start.inc,1.1.2.1,1.1.2.2 membership-left-nav.inc,1.1.2.4,1.1.2.5 membership-start.inc,1.1.2.1,1.1.2.2 news-start.inc,1.1.2.1,1.1.2.2 search-left-nav.inc,1.1.2.3,1.1.2.4 search-start.inc,1.1.2.1,1.1.2.2 teens-zone-start.inc,1.1.2.1,1.1.2.2
- Next by thread:
[Koha-cvs] CVS: koha/opac opac-searchresults.pl,1.1.2.9,1.1.2.10
- Index(es):