diff --git a/app/Controller/Board.php b/app/Controller/Board.php
index caaa38efa..ac80a192a 100644
--- a/app/Controller/Board.php
+++ b/app/Controller/Board.php
@@ -310,4 +310,28 @@ class Board extends Base
'recurrence_basedate_list' => $this->task->getRecurrenceBasedateList(),
)));
}
+
+ /**
+ * Enable collapsed mode
+ *
+ * @access public
+ */
+ public function collapse()
+ {
+ $project_id = $this->request->getIntegerParam('project_id');
+ $this->userSession->setBoardDisplayMode($project_id, true);
+ $this->response->redirect($this->helper->url->to('board', 'show', array('project_id' => $project_id)));
+ }
+
+ /**
+ * Enable expanded mode
+ *
+ * @access public
+ */
+ public function expand()
+ {
+ $project_id = $this->request->getIntegerParam('project_id');
+ $this->userSession->setBoardDisplayMode($project_id, false);
+ $this->response->redirect($this->helper->url->to('board', 'show', array('project_id' => $project_id)));
+ }
}
diff --git a/app/Helper/Board.php b/app/Helper/Board.php
new file mode 100644
index 000000000..452a3b70e
--- /dev/null
+++ b/app/Helper/Board.php
@@ -0,0 +1,24 @@
+userSession->isBoardCollapsed($project_id);
+ }
+}
diff --git a/app/Model/UserSession.php b/app/Model/UserSession.php
index 6de4a1824..44a9c2a2e 100644
--- a/app/Model/UserSession.php
+++ b/app/Model/UserSession.php
@@ -118,4 +118,28 @@ class UserSession extends Base
{
$_SESSION['filters'][$project_id] = $filters;
}
+
+ /**
+ * Is board collapsed or expanded
+ *
+ * @access public
+ * @param integer $project_id
+ * @return boolean
+ */
+ public function isBoardCollapsed($project_id)
+ {
+ return ! empty($_SESSION['board_collapsed'][$project_id]) ? $_SESSION['board_collapsed'][$project_id] : false;
+ }
+
+ /**
+ * Set board display mode
+ *
+ * @access public
+ * @param integer $project_id
+ * @param boolean $collapsed
+ */
+ public function setBoardDisplayMode($project_id, $collapsed)
+ {
+ $_SESSION['board_collapsed'][$project_id] = $collapsed;
+ }
}
diff --git a/app/Template/board/task_private.php b/app/Template/board/task_private.php
index 3f4010ea4..7eaff580c 100644
--- a/app/Template/board/task_private.php
+++ b/app/Template/board/task_private.php
@@ -10,53 +10,55 @@
= $this->render('board/task_menu', array('task' => $task)) ?>
-
-
-
- = $this->e($this->user->getInitials($task['assignee_name'] ?: $task['assignee_username'])) ?>
- -
-
- url->link($this->e($task['title']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'task-board-collapsed-title') ?>
-
-
-
-
-
-
-
- (= $task['reference'] ?>)
-
-
-
-
- = $this->url->link(
- (! empty($task['owner_id']) ? ($task['assignee_name'] ?: $task['assignee_username']) : t('Nobody assigned')),
- 'board',
- 'changeAssignee',
- array('task_id' => $task['id'], 'project_id' => $task['project_id']),
- false,
- 'task-board-popover',
- t('Change assignee')
- ) ?>
-
-
-
-
-
= $this->dt->age($task['date_creation']) ?>
-
= $this->dt->age($task['date_moved']) ?>
+ board->isCollapsed($project['id'])): ?>
+
+
+
+ = $this->e($this->user->getInitials($task['assignee_name'] ?: $task['assignee_username'])) ?>
+ -
+
+ url->link($this->e($task['title']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'task-board-collapsed-title') ?>
+
-
-
= t('Closed') ?>
-
+
+
-
- = $this->url->link($this->e($task['title']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, '', t('View this task')) ?>
+
+
+ (= $task['reference'] ?>)
+
+
+
+
+ = $this->url->link(
+ (! empty($task['owner_id']) ? ($task['assignee_name'] ?: $task['assignee_username']) : t('Nobody assigned')),
+ 'board',
+ 'changeAssignee',
+ array('task_id' => $task['id'], 'project_id' => $task['project_id']),
+ false,
+ 'task-board-popover',
+ t('Change assignee')
+ ) ?>
+
+
+
+
+ = $this->dt->age($task['date_creation']) ?>
+ = $this->dt->age($task['date_moved']) ?>
+
+
+
= t('Closed') ?>
+
+
+
+ = $this->url->link($this->e($task['title']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, '', t('View this task')) ?>
+
+
+ = $this->render('board/task_footer', array(
+ 'task' => $task,
+ 'not_editable' => $not_editable,
+ )) ?>
-
- = $this->render('board/task_footer', array(
- 'task' => $task,
- 'not_editable' => $not_editable,
- )) ?>
-
+
diff --git a/app/Template/layout.php b/app/Template/layout.php
index d804d3d5c..a9f1cbc37 100644
--- a/app/Template/layout.php
+++ b/app/Template/layout.php
@@ -48,7 +48,7 @@
-
-