Improve form helpers and add more hooks
This commit is contained in:
@@ -22,7 +22,6 @@ class TaskViewController extends BaseController
|
||||
{
|
||||
$project = $this->projectModel->getByToken($this->request->getStringParam('token'));
|
||||
|
||||
// Token verification
|
||||
if (empty($project)) {
|
||||
throw AccessForbiddenException::getInstance()->withoutLayout();
|
||||
}
|
||||
@@ -63,19 +62,9 @@ class TaskViewController extends BaseController
|
||||
$task = $this->getTask();
|
||||
$subtasks = $this->subtaskModel->getAll($task['id']);
|
||||
|
||||
$values = array(
|
||||
'id' => $task['id'],
|
||||
'date_started' => $task['date_started'],
|
||||
'time_estimated' => $task['time_estimated'] ?: '',
|
||||
'time_spent' => $task['time_spent'] ?: '',
|
||||
);
|
||||
|
||||
$values = $this->dateParser->format($values, array('date_started'), $this->dateParser->getUserDateTimeFormat());
|
||||
|
||||
$this->response->html($this->helper->layout->task('task/show', array(
|
||||
'task' => $task,
|
||||
'project' => $this->projectModel->getById($task['project_id']),
|
||||
'values' => $values,
|
||||
'files' => $this->taskFileModel->getAllDocuments($task['id']),
|
||||
'images' => $this->taskFileModel->getAllImages($task['id']),
|
||||
'comments' => $this->commentModel->getAll($task['id'], $this->userSession->getCommentSorting()),
|
||||
|
||||
Reference in New Issue
Block a user