diff options
author | Frédéric Guillot <fred@kanboard.net> | 2018-05-09 11:21:57 -0700 |
---|---|---|
committer | Frédéric Guillot <fred@kanboard.net> | 2018-05-09 11:21:57 -0700 |
commit | 6ae97d399dc96bd9a0e854bea6d09fa68e078ab5 (patch) | |
tree | 63592644f6f1802c62ec2c2f9bc62e2573950049 /app/Pagination | |
parent | cc17cb32071c8fbf3bfa781b98d415638ebb966e (diff) |
Improve dashboard pagination
Diffstat (limited to 'app/Pagination')
-rw-r--r-- | app/Pagination/DashboardPagination.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/Pagination/DashboardPagination.php b/app/Pagination/DashboardPagination.php index 0149a42b..9669cb9d 100644 --- a/app/Pagination/DashboardPagination.php +++ b/app/Pagination/DashboardPagination.php @@ -32,13 +32,13 @@ class DashboardPagination extends Base $this->hook->reference('pagination:dashboard:task:query', $query); $paginator = $this->paginator - ->setUrl('DashboardController', 'show', array('user_id' => $userId)) - ->setMax(50) + ->setUrl('DashboardController', 'show', array('user_id' => $userId, 'pagination' => 'tasks-'.$projectId), 'project-tasks-'.$projectId) + ->setMax(15) ->setOrder(TaskModel::TABLE.'.priority') ->setDirection('DESC') ->setFormatter($this->taskListSubtaskAssigneeFormatter->withUserId($userId)) ->setQuery($query) - ->calculate(); + ->calculateOnlyIf($this->request->getStringParam('pagination') === 'tasks-'.$projectId); if ($paginator->getTotal() > 0) { $paginators[] = array( |