From f3deb6492a74f1ffa9e3391274e0ab7947a04016 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sun, 26 Feb 2017 19:30:02 -0500 Subject: Add toggle button to show/hide subtasks in task list view --- app/Core/Base.php | 1 + app/Core/Session/SessionStorage.php | 2 +- app/Core/User/UserSession.php | 11 +++++++++++ 3 files changed, 13 insertions(+), 1 deletion(-) (limited to 'app/Core') diff --git a/app/Core/Base.php b/app/Core/Base.php index 8ef34bfb..28bbd534 100644 --- a/app/Core/Base.php +++ b/app/Core/Base.php @@ -76,6 +76,7 @@ use Pimple\Container; * @property \Kanboard\Formatter\TaskGanttFormatter $taskGanttFormatter * @property \Kanboard\Formatter\TaskICalFormatter $taskICalFormatter * @property \Kanboard\Formatter\TaskListFormatter $taskListFormatter + * @property \Kanboard\Formatter\TaskListSubtaskFormatter $taskListSubtaskFormatter * @property \Kanboard\Formatter\TaskSuggestMenuFormatter $taskSuggestMenuFormatter * @property \Kanboard\Formatter\UserAutoCompleteFormatter $userAutoCompleteFormatter * @property \Kanboard\Formatter\UserMentionFormatter $userMentionFormatter diff --git a/app/Core/Session/SessionStorage.php b/app/Core/Session/SessionStorage.php index e6478d8d..bb6771f1 100644 --- a/app/Core/Session/SessionStorage.php +++ b/app/Core/Session/SessionStorage.php @@ -18,7 +18,7 @@ namespace Kanboard\Core\Session; * @property string $commentSorting * @property bool $hasSubtaskInProgress * @property bool $hasRememberMe - * @property bool $boardCollapsed + * @property bool $subtaskListToggle * @property string $scope * @property bool $twoFactorBeforeCodeCalled * @property string $twoFactorSecret diff --git a/app/Core/User/UserSession.php b/app/Core/User/UserSession.php index 7917b223..f3f7359a 100644 --- a/app/Core/User/UserSession.php +++ b/app/Core/User/UserSession.php @@ -145,6 +145,17 @@ class UserSession extends Base return isset($this->sessionStorage->user['username']) ? $this->sessionStorage->user['username'] : ''; } + /** + * Return true if subtask list toggle is active + * + * @access public + * @return string + */ + public function hasSubtaskListActivated() + { + return isset($this->sessionStorage->subtaskListToggle) && ! empty($this->sessionStorage->subtaskListToggle); + } + /** * Check is the user is connected * -- cgit v1.2.3