/[Arh]/lib/Arh/View/Units.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 /lib/Arh/View/Units.pm

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

revision 69 by dpavlin, Tue Apr 8 23:38:42 2008 UTC revision 70 by dpavlin, Wed Apr 9 12:28:16 2008 UTC
# Line 126  private template 'paging_top' => sub { Line 126  private template 'paging_top' => sub {
126          show( './paging_bottom', $collection, $page );          show( './paging_bottom', $collection, $page );
127  };  };
128    
129    private template paging_bottom => sub {
130            my $self           = shift;
131            my $collection = shift;
132            my $page           = shift;
133            div {
134                    { class is 'paging' };
135                    if ( $collection->pager->previous_page ) {
136                            span {
137                                    hyperlink(
138                                            label   => _("Previous Page"),
139                                            onclick => {
140                                                    args => { page => $collection->pager->previous_page }
141                                            }
142                                    );
143                            }
144                    }
145    
146                    foreach my $p ( $collection->pager->first_page .. $collection->pager->last_page ) {
147                            if ( $p == $page ) {
148                                    b { $p }
149                            } else {
150                                    span {
151                                            hyperlink(
152                                                    label   => $p,
153                                                    onclick =>
154                                                            { args => { page => $p } }
155                                            );
156                                    }
157                            }
158                    }
159                            
160    
161                    if ( $collection->pager->next_page ) {
162                            span {
163                                    hyperlink(
164                                            label   => _("Next Page"),
165                                            onclick =>
166                                                    { args => { page => $collection->pager->next_page } }
167                                    );
168                            }
169                    }
170            };
171    };
172    
173    
174  template 'view' => sub :CRUDView {  template 'view' => sub :CRUDView {
175          my $self   = shift;          my $self   = shift;

Legend:
Removed from v.69  
changed lines
  Added in v.70

  ViewVC Help
Powered by ViewVC 1.1.26