summaryrefslogtreecommitdiff
path: root/app/Controller/Project.php
diff options
context:
space:
mode:
authorFrédéric Guillot <fred@kanboard.net>2014-11-15 21:49:06 -0500
committerFrédéric Guillot <fred@kanboard.net>2014-11-15 21:49:06 -0500
commitaa6fffb05a7d84a36991341610675499b6ea8a79 (patch)
treee0eb08e76e61dfc5cc56ae0bfb7daf7dda49fc99 /app/Controller/Project.php
parentaf93754ec99d8748677dc2cfd92137a8698a90fa (diff)
Add pagination and sorting to the dashboard
Diffstat (limited to 'app/Controller/Project.php')
-rw-r--r--app/Controller/Project.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/app/Controller/Project.php b/app/Controller/Project.php
index a479b1d6..cac5e0b8 100644
--- a/app/Controller/Project.php
+++ b/app/Controller/Project.php
@@ -428,8 +428,8 @@ class Project extends Base
$limit = 25;
if ($search !== '') {
- $tasks = $this->taskFinder->search($project['id'], $search, $offset, $limit, $order, $direction);
- $nb_tasks = $this->taskFinder->countSearch($project['id'], $search);
+ $tasks = $this->taskPaginator->searchTasks($project['id'], $search, $offset, $limit, $order, $direction);
+ $nb_tasks = $this->taskPaginator->countSearchTasks($project['id'], $search);
}
$this->response->html($this->template->layout('project_search', array(
@@ -472,8 +472,8 @@ class Project extends Base
$offset = $this->request->getIntegerParam('offset', 0);
$limit = 25;
- $tasks = $this->taskFinder->getClosedTasks($project['id'], $offset, $limit, $order, $direction);
- $nb_tasks = $this->taskFinder->countByProjectId($project['id'], array(TaskModel::STATUS_CLOSED));
+ $tasks = $this->taskPaginator->closedTasks($project['id'], $offset, $limit, $order, $direction);
+ $nb_tasks = $this->taskPaginator->countClosedTasks($project['id']);
$this->response->html($this->template->layout('project_tasks', array(
'board_selector' => $this->projectPermission->getAllowedProjects($this->acl->getUserId()),