Add pagination and sorting to the dashboard

This commit is contained in:
Frédéric Guillot
2014-11-15 21:49:06 -05:00
parent af93754ec9
commit aa6fffb05a
21 changed files with 582 additions and 300 deletions

View File

@@ -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()),