/[webpac2]/Webpacus/lib/Webpacus/Controller/Search.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /Webpacus/lib/Webpacus/Controller/Search.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 439 by dpavlin, Mon Feb 20 15:33:03 2006 UTC revision 440 by dpavlin, Sun Apr 30 23:20:12 2006 UTC
# Line 6  use base 'Catalyst::Controller'; Line 6  use base 'Catalyst::Controller';
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
# Line 201  sub results_ajax : Path( 'results/ajax' Line 202  sub results_ajax : Path( 'results/ajax'
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  }  }

Legend:
Removed from v.439  
changed lines
  Added in v.440

  ViewVC Help
Powered by ViewVC 1.1.26