diff --git a/lib/Tuba/File.pm b/lib/Tuba/File.pm index 4d653450..c090d4ab 100644 --- a/lib/Tuba/File.pm +++ b/lib/Tuba/File.pm @@ -11,7 +11,7 @@ use Tuba::DB::Objects qw/-nicknames/; sub list { my $c = shift; return $c->reply->not_found; - $c->stash(objects => Files->get_objects(with_objects => 'publications', page => $c->page)); + $c->stash(objects => Files->get_objects(with_objects => 'publications', page => $c->page, per_page => $c->per_page)); my $count = Files->get_objects_count; $c->set_pages($count); $c->SUPER::list(@_); diff --git a/lib/Tuba/Finding.pm b/lib/Tuba/Finding.pm index 166e78e8..c83bc128 100644 --- a/lib/Tuba/Finding.pm +++ b/lib/Tuba/Finding.pm @@ -14,7 +14,7 @@ sub list { my $meta = Finding->meta; my $report_identifier = $c->stash('report_identifier'); my $all = $c->param('all'); - my @page = $all ? () : (page => $c->page); + my @page = $all ? () : (page => $c->page, per_page => $c->per_page); if (my $chapter = $c->stash('chapter')) { $objects = Findings->get_objects( diff --git a/lib/Tuba/Organization.pm b/lib/Tuba/Organization.pm index e689bcbb..8dba07bd 100644 --- a/lib/Tuba/Organization.pm +++ b/lib/Tuba/Organization.pm @@ -31,7 +31,7 @@ sub list { if ($c->param('all')) { $c->stash(objects => Organizations->get_objects(@q)); } else { - $c->stash(objects => scalar Organizations->get_objects(@q, sort_by => 'name', page => $c->page)); + $c->stash(objects => scalar Organizations->get_objects(@q, sort_by => 'name', page => $c->page, per_page => $c->per_page)); $c->set_pages(Organizations->get_objects_count(@q)); } $c->SUPER::list(@_); diff --git a/lib/Tuba/Person.pm b/lib/Tuba/Person.pm index a9b3ef7f..325b95e0 100644 --- a/lib/Tuba/Person.pm +++ b/lib/Tuba/Person.pm @@ -21,7 +21,7 @@ sub list { if ($c->param('all')) { $c->stash(objects => Persons->get_objects(@q)); } else { - $c->stash(objects => scalar Persons->get_objects(@q, sort_by => 'last_name, first_name', page => $c->page)); + $c->stash(objects => scalar Persons->get_objects(@q, sort_by => 'last_name, first_name', page => $c->page, per_page => $c->per_page)); $c->set_pages(Persons->get_objects_count(@q)); } $c->SUPER::list(@_); diff --git a/lib/Tuba/Region.pm b/lib/Tuba/Region.pm index da5c0a78..45368eb3 100644 --- a/lib/Tuba/Region.pm +++ b/lib/Tuba/Region.pm @@ -19,7 +19,8 @@ sub list { $objects = Regions->get_objects( query => [ publication_id => $publication->id ], with_objects => [qw/publications/], - page => $c->page + page => $c->page, + per_page => $c->per_page ); $count = Regions->get_objects_count( query => [ publication_id => $publication->id ], @@ -27,7 +28,11 @@ sub list { ); } else { - $objects = Regions->get_objects(with_objects => 'publications', page => $c->page); + $objects = Regions->get_objects( + with_objects => 'publications', + page => $c->page, + per_page => $c->per_page + ); $count = Regions->get_objects_count; } $c->stash(objects => $objects); diff --git a/lib/Tuba/Table.pm b/lib/Tuba/Table.pm index b42b1010..3f56a064 100644 --- a/lib/Tuba/Table.pm +++ b/lib/Tuba/Table.pm @@ -13,7 +13,7 @@ sub list { my $tables; my $report_identifier = $c->stash('report_identifier'); my $all = $c->param('all'); - my @page = $all ? () : (page => $c->page); + my @page = $all ? () : (page => $c->page, per_page => $c->per_page); if (my $ch = $c->stash('chapter')) { $tables = Tables->get_objects( query => [chapter_identifier => $ch->identifier, report_identifier => $report_identifier], with_objects => ['chapter'],