Save task list order in user session

This commit is contained in:
Timo
2020-04-23 05:40:39 +02:00
committed by GitHub
parent e089d3059a
commit 027f875ac6
3 changed files with 60 additions and 2 deletions

View File

@@ -35,11 +35,16 @@ class TaskListController extends BaseController
$formatter = $this->taskListFormatter;
}
list($order, $direction) = $this->userSession->getListOrder($project['id']);
$direction = $this->request->getStringParam('direction', $direction);
$order = $this->request->getStringParam('order', $order);
$this->userSession->setListOrder($project['id'], $order, $direction);
$paginator = $this->paginator
->setUrl('TaskListController', 'show', array('project_id' => $project['id']))
->setMax(30)
->setOrder(TaskModel::TABLE.'.id')
->setDirection('DESC')
->setOrder($order)
->setDirection($direction)
->setFormatter($formatter)
->setQuery($this->taskLexer
->build($search)