diff options
author | Frédéric Guillot <fred@kanboard.net> | 2014-11-15 21:49:06 -0500 |
---|---|---|
committer | Frédéric Guillot <fred@kanboard.net> | 2014-11-15 21:49:06 -0500 |
commit | aa6fffb05a7d84a36991341610675499b6ea8a79 (patch) | |
tree | e0eb08e76e61dfc5cc56ae0bfb7daf7dda49fc99 /app/Model/Project.php | |
parent | af93754ec99d8748677dc2cfd92137a8698a90fa (diff) |
Add pagination and sorting to the dashboard
Diffstat (limited to 'app/Model/Project.php')
-rw-r--r-- | app/Model/Project.php | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/app/Model/Project.php b/app/Model/Project.php index 2abee2aa..8b842519 100644 --- a/app/Model/Project.php +++ b/app/Model/Project.php @@ -96,40 +96,6 @@ class Project extends Base } /** - * Get project summary for a list of project (number of tasks for each column) - * - * @access public - * @param array $project_ids List of project id - * @param integer $status Project status - * @param string $order Sort on this column - * @param string $direction Sorting direction - * @return array Project properties - */ - public function getSummary(array $project_ids, $status = self::ACTIVE, $order = 'name', $direction = 'asc') - { - if (empty($project_ids)) { - return array(); - } - - $projects = $this->db->table(self::TABLE) - ->in('id', $project_ids) - ->eq('is_active', $status) - ->orderby($order, $direction) - ->findAll(); - - foreach ($projects as &$project) { - - $project['columns'] = $this->board->getColumns($project['id']); - - foreach ($project['columns'] as &$column) { - $column['nb_tasks'] = $this->taskFinder->countByColumnId($project['id'], $column['id']); - } - } - - return $projects; - } - - /** * Get all projects, optionaly fetch stats for each project and can check users permissions * * @access public |