Refactoring to implement new layout with filters: board/calendar/list views (work in progress)

This commit is contained in:
Frederic Guillot
2015-07-04 11:14:21 -04:00
parent a327f790ee
commit 554500aa49
52 changed files with 463 additions and 758 deletions

View File

@@ -512,6 +512,23 @@ class TaskFilter extends Base
return $this->query;
}
/**
* Get swimlanes and tasks to display the board
*
* @access public
* @return array
*/
public function getBoard($project_id)
{
$tasks = $this->filterByProject($project_id)->query->asc(Task::TABLE.'.position')->findAll();
return $this->board->getBoard($project_id, function ($project_id, $column_id, $swimlane_id) use ($tasks) {
return array_filter($tasks, function(array $task) use ($column_id, $swimlane_id) {
return $task['column_id'] == $column_id && $task['swimlane_id'] == $swimlane_id;
});
});
}
/**
* Format the results to the ajax autocompletion
*