Skip to content
Snippets Groups Projects
Commit 962f3733 authored by Torsten Oppermann's avatar Torsten Oppermann
Browse files

[TASk] Started work on page browser

parent 939ad882
No related branches found
No related tags found
No related merge requests found
......@@ -76,9 +76,12 @@ class JoblistController extends ActionController {
$offset = $currentPageBrowserPage * $jobLimit;
}
// get all jobs
// get all jobs for the current page
$jobs = $this->jobRepository->findJobs($storagePid, [], FALSE, $jobLimit, $offset);
$numberOfPages = ($jobLimit <= 0 ? 0 : ceil(\count($jobs) / $jobLimit));
// get all jobs for the current page
$jobsCount = \count($this->jobRepository->findJobs($storagePid, [], FALSE, 0, $offset));
$numberOfPages = ($jobLimit <= 0 ? 0 : ceil($jobsCount / $jobLimit));
$this->view->assign('jobs', $jobs);
$this->view->assign('numberOfPages', $numberOfPages);
......@@ -132,7 +135,6 @@ class JoblistController extends ActionController {
ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK
)['settings']['redirectPage'];
$uriBuilder = $this->uriBuilder;
$uri = $uriBuilder
->reset()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment