<%doc> =head1 pager This controls the pager display at the bottom (by default) of the list and search views. It expects a C template argument which responds to the L interface. % return unless $pager and ( $pager->first_page != $pager->last_page );

Pages: <%perl> my $begin_page = $pager->current_page - 10; $begin_page = $pager->first_page if $begin_page < 1; my $end_page = $pager->current_page + 10; $end_page = $pager->last_page if $pager->last_page < $end_page; foreach my $num ( $begin_page .. $end_page ) { if ( $num == $pager->current_page ) { <% $num %> <%perl> } else { my $args = "?page=$num"; $args .= "&order=" . $request->params->{order} if $request->params->{order}; $args .= "&o2=desc" if $request->params->{o2} eq "desc"; my $action = "list"; foreach my $col ( @{ $classmetadata->{columns} } ) { if ( $request->params->{ $col } ) { $args .= "&$col=" . $request->params->{ $col }; $action = "search"; } } <& link, table => $classmetadata->{table}, command => $action, additional => $args, label => $num &> % } % }