Store comment sorting direction in user metadata
This commit is contained in:
@@ -4,6 +4,7 @@ namespace Kanboard\Controller;
|
||||
|
||||
use Kanboard\Core\Controller\AccessForbiddenException;
|
||||
use Kanboard\Core\Controller\PageNotFoundException;
|
||||
use Kanboard\Model\UserMetadataModel;
|
||||
|
||||
/**
|
||||
* Task Controller
|
||||
@@ -61,13 +62,14 @@ class TaskViewController extends BaseController
|
||||
{
|
||||
$task = $this->getTask();
|
||||
$subtasks = $this->subtaskModel->getAll($task['id']);
|
||||
$commentSortingDirection = $this->userMetadataCacheDecorator->get(UserMetadataModel::KEY_COMMENT_SORTING_DIRECTION, 'ASC');
|
||||
|
||||
$this->response->html($this->helper->layout->task('task/show', array(
|
||||
'task' => $task,
|
||||
'project' => $this->projectModel->getById($task['project_id']),
|
||||
'files' => $this->taskFileModel->getAllDocuments($task['id']),
|
||||
'images' => $this->taskFileModel->getAllImages($task['id']),
|
||||
'comments' => $this->commentModel->getAll($task['id'], $this->userSession->getCommentSorting()),
|
||||
'comments' => $this->commentModel->getAll($task['id'], $commentSortingDirection),
|
||||
'subtasks' => $subtasks,
|
||||
'internal_links' => $this->taskLinkModel->getAllGroupedByLabel($task['id']),
|
||||
'external_links' => $this->taskExternalLinkModel->getAll($task['id']),
|
||||
|
||||
Reference in New Issue
Block a user