Revision 3f214c12
Von Sven Schöling vor etwa 13 Jahren hinzugefügt
SL/DB/Helper/Paginated.pm | ||
---|---|---|
4 | 4 |
|
5 | 5 |
require Exporter; |
6 | 6 |
our @ISA = qw(Exporter); |
7 |
our @EXPORT = qw(paginate); |
|
7 |
our @EXPORT = qw(paginate disable_paginating);
|
|
8 | 8 |
|
9 | 9 |
use List::MoreUtils qw(any); |
10 | 10 |
|
... | ... | |
64 | 64 |
any { abs ($cur - $this) == $_ } 10, 50, 100, 500, 1000, 5000; |
65 | 65 |
} |
66 | 66 |
|
67 |
sub disable_paginating { |
|
68 |
my ($self, %params) = @_; |
|
69 |
|
|
70 |
delete $params{args}{page}; |
|
71 |
delete $params{args}{per_page}; |
|
72 |
} |
|
73 |
|
|
67 | 74 |
1; |
68 | 75 |
|
69 | 76 |
__END__ |
Auch abrufbar als: Unified diff
Paginating Helper: Funktion um paginating nachträglich zu deaktivieren
Wird für pdf/csv Exporte gebraucht.