--- lib/Arh/View/Units.pm 2008/04/08 23:38:42 69 +++ lib/Arh/View/Units.pm 2008/04/09 12:28:16 70 @@ -126,6 +126,50 @@ show( './paging_bottom', $collection, $page ); }; +private template paging_bottom => sub { + my $self = shift; + my $collection = shift; + my $page = shift; + div { + { class is 'paging' }; + if ( $collection->pager->previous_page ) { + span { + hyperlink( + label => _("Previous Page"), + onclick => { + args => { page => $collection->pager->previous_page } + } + ); + } + } + + foreach my $p ( $collection->pager->first_page .. $collection->pager->last_page ) { + if ( $p == $page ) { + b { $p } + } else { + span { + hyperlink( + label => $p, + onclick => + { args => { page => $p } } + ); + } + } + } + + + if ( $collection->pager->next_page ) { + span { + hyperlink( + label => _("Next Page"), + onclick => + { args => { page => $collection->pager->next_page } } + ); + } + } + }; +}; + template 'view' => sub :CRUDView { my $self = shift;