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; |