From be4e90e319cf65b368bb866165abc8d1fd4e074f Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sun, 1 Feb 2015 11:05:07 -0500 Subject: Add collapsible swimlanes (merge and improve pull-request #565) --- app/Model/Board.php | 2 ++ app/Template/board/swimlane.php | 23 ++++++++++++++++++----- 2 files changed, 20 insertions(+), 5 deletions(-) (limited to 'app') diff --git a/app/Model/Board.php b/app/Model/Board.php index 8dd68a80..030f1efe 100644 --- a/app/Model/Board.php +++ b/app/Model/Board.php @@ -243,10 +243,12 @@ class Board extends Base $swimlanes[$i]['columns'] = $columns; $swimlanes[$i]['nb_columns'] = $nb_columns; + $swimlanes[$i]['nb_tasks'] = 0; for ($j = 0; $j < $nb_columns; $j++) { $swimlanes[$i]['columns'][$j]['tasks'] = $this->taskFinder->getTasksByColumnAndSwimlane($project_id, $columns[$j]['id'], $swimlanes[$i]['id']); $swimlanes[$i]['columns'][$j]['nb_tasks'] = count($swimlanes[$i]['columns'][$j]['tasks']); + $swimlanes[$i]['nb_tasks'] += $swimlanes[$i]['columns'][$j]['nb_tasks']; } } diff --git a/app/Template/board/swimlane.php b/app/Template/board/swimlane.php index 5766141e..77bc4114 100644 --- a/app/Template/board/swimlane.php +++ b/app/Template/board/swimlane.php @@ -1,6 +1,20 @@ - + + + 0): ?> + + + + + + + e($swimlane['name']) ?> + + + () + + @@ -25,11 +39,10 @@ - + + - - e($swimlane['name']) ?> - + -- cgit v1.2.3