6 |
|
|
7 |
use lib '/data/webpac2/lib'; |
use lib '/data/webpac2/lib'; |
8 |
use WebPAC::Search::Estraier 0.03; |
use WebPAC::Search::Estraier 0.03; |
9 |
|
use Data::SpreadPagination; |
10 |
|
|
11 |
|
|
12 |
=head1 NAME |
=head1 NAME |
202 |
$c->stash->{hints} = $webpac->hints; |
$c->stash->{hints} = $webpac->hints; |
203 |
|
|
204 |
$c->stash->{phrase} = $q; |
$c->stash->{phrase} = $q; |
205 |
$c->stash->{page} = $params->{'_page'}; |
$c->stash->{page} = $params->{_page}; |
206 |
$c->stash->{hits_on_page} = $hits_on_page; |
$c->stash->{hits_on_page} = $hits_on_page; |
207 |
|
|
208 |
|
# create pager |
209 |
|
$c->stash->{pager} = new Data::SpreadPagination({ |
210 |
|
totalEntries => $webpac->hints->{hit}, |
211 |
|
entriesPerPage => $hits_on_page, |
212 |
|
currentPage => $params->{_page}, |
213 |
|
maxPages => $c->config->{pager}->{max_pages} || 10, |
214 |
|
}); |
215 |
|
|
216 |
$c->stash->{template} = 'results.tt'; |
$c->stash->{template} = 'results.tt'; |
217 |
|
|
218 |
} |
} |