Improve task summary sections
This commit is contained in:
@@ -10,23 +10,6 @@ namespace Kanboard\Controller;
|
||||
*/
|
||||
class Subtask extends Base
|
||||
{
|
||||
/**
|
||||
* Show list of subtasks
|
||||
*/
|
||||
public function show()
|
||||
{
|
||||
$task = $this->getTask();
|
||||
|
||||
$this->response->html($this->helper->layout->task('subtask/show', array(
|
||||
'users_list' => $this->projectUserRole->getAssignableUsersList($task['project_id']),
|
||||
'task' => $task,
|
||||
'project' => $this->getProject(),
|
||||
'subtasks' => $this->subtask->getAll($task['id']),
|
||||
'editable' => true,
|
||||
'show_title' => true,
|
||||
)));
|
||||
}
|
||||
|
||||
/**
|
||||
* Creation form
|
||||
*
|
||||
|
||||
@@ -76,7 +76,8 @@ class Task extends Base
|
||||
'images' => $this->taskFile->getAllImages($task['id']),
|
||||
'comments' => $this->comment->getAll($task['id'], $this->userSession->getCommentSorting()),
|
||||
'subtasks' => $subtasks,
|
||||
'links' => $this->taskLink->getAllGroupedByLabel($task['id']),
|
||||
'internal_links' => $this->taskLink->getAllGroupedByLabel($task['id']),
|
||||
'external_links' => $this->taskExternalLink->getAll($task['id']),
|
||||
'task' => $task,
|
||||
'values' => $values,
|
||||
'link_label_list' => $this->link->getList(0, false),
|
||||
|
||||
@@ -12,22 +12,6 @@ use Kanboard\Core\ExternalLink\ExternalLinkProviderNotFound;
|
||||
*/
|
||||
class TaskExternalLink extends Base
|
||||
{
|
||||
/**
|
||||
* Creation form
|
||||
*
|
||||
* @access public
|
||||
*/
|
||||
public function show()
|
||||
{
|
||||
$task = $this->getTask();
|
||||
|
||||
$this->response->html($this->helper->layout->task('task_external_link/show', array(
|
||||
'links' => $this->taskExternalLink->getAll($task['id']),
|
||||
'task' => $task,
|
||||
'title' => t('List of external links'),
|
||||
)));
|
||||
}
|
||||
|
||||
/**
|
||||
* First creation form
|
||||
*
|
||||
@@ -90,7 +74,7 @@ class TaskExternalLink extends Base
|
||||
|
||||
if ($valid && $this->taskExternalLink->create($values)) {
|
||||
$this->flash->success(t('Link added successfully.'));
|
||||
return $this->response->redirect($this->helper->url->to('TaskExternalLink', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])), true);
|
||||
return $this->response->redirect($this->helper->url->to('task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])), true);
|
||||
}
|
||||
|
||||
$this->edit($values, $errors);
|
||||
@@ -137,7 +121,7 @@ class TaskExternalLink extends Base
|
||||
|
||||
if ($valid && $this->taskExternalLink->update($values)) {
|
||||
$this->flash->success(t('Link updated successfully.'));
|
||||
return $this->response->redirect($this->helper->url->to('TaskExternalLink', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])), true);
|
||||
return $this->response->redirect($this->helper->url->to('task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])), true);
|
||||
}
|
||||
|
||||
$this->edit($values, $errors);
|
||||
@@ -180,6 +164,6 @@ class TaskExternalLink extends Base
|
||||
$this->flash->failure(t('Unable to remove this link.'));
|
||||
}
|
||||
|
||||
$this->response->redirect($this->helper->url->to('TaskExternalLink', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])));
|
||||
$this->response->redirect($this->helper->url->to('task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,27 +28,6 @@ class Tasklink extends Base
|
||||
return $link;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show links
|
||||
*
|
||||
* @access public
|
||||
*/
|
||||
public function show()
|
||||
{
|
||||
$task = $this->getTask();
|
||||
$project = $this->project->getById($task['project_id']);
|
||||
|
||||
$this->response->html($this->helper->layout->task('tasklink/show', array(
|
||||
'links' => $this->taskLink->getAllGroupedByLabel($task['id']),
|
||||
'task' => $task,
|
||||
'project' => $project,
|
||||
'link_label_list' => $this->link->getList(0, false),
|
||||
'editable' => true,
|
||||
'is_public' => false,
|
||||
'show_title' => true,
|
||||
)));
|
||||
}
|
||||
|
||||
/**
|
||||
* Creation form
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user