diff options
author | Frederic Guillot <fred@kanboard.net> | 2016-03-18 21:16:25 -0400 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2016-03-18 21:16:25 -0400 |
commit | 73bae9bb3425089babea5f2effe172e5a0938e2b (patch) | |
tree | 1c120b40de0434be3184b4083a8d5164748444f1 /app/Controller | |
parent | 854457baf0043b51ce9c30f36a6fecaed97cb04d (diff) |
Rename controller TaskLink to TaskInternalLink
Diffstat (limited to 'app/Controller')
-rw-r--r-- | app/Controller/TaskInternalLink.php (renamed from app/Controller/Tasklink.php) | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/app/Controller/Tasklink.php b/app/Controller/TaskInternalLink.php index a7f4914b..ac5e04b7 100644 --- a/app/Controller/Tasklink.php +++ b/app/Controller/TaskInternalLink.php @@ -3,13 +3,13 @@ namespace Kanboard\Controller; /** - * TaskLink controller + * TaskInternalLink Controller * * @package controller * @author Olivier Maridat * @author Frederic Guillot */ -class Tasklink extends Base +class TaskInternalLink extends Base { /** * Get the current link @@ -37,12 +37,11 @@ class Tasklink extends Base { $task = $this->getTask(); - $this->response->html($this->template->render('tasklink/create', array( + $this->response->html($this->template->render('task_internal_link/create', array( 'values' => $values, 'errors' => $errors, 'task' => $task, 'labels' => $this->link->getList(0, false), - 'title' => t('Add a new link') ))); } @@ -61,7 +60,7 @@ class Tasklink extends Base if ($valid) { if ($this->taskLink->create($values['task_id'], $values['opposite_task_id'], $values['link_id'])) { $this->flash->success(t('Link added successfully.')); - return $this->response->redirect($this->helper->url->to('task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])).'#links', true); + return $this->response->redirect($this->helper->url->to('task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])), true); } $errors = array('title' => array(t('The exact same link already exists'))); @@ -87,13 +86,12 @@ class Tasklink extends Base $values['title'] = '#'.$opposite_task['id'].' - '.$opposite_task['title']; } - $this->response->html($this->template->render('tasklink/edit', array( + $this->response->html($this->template->render('task_internal_link/edit', array( 'values' => $values, 'errors' => $errors, 'task_link' => $task_link, 'task' => $task, - 'labels' => $this->link->getList(0, false), - 'title' => t('Edit link') + 'labels' => $this->link->getList(0, false) ))); } @@ -131,7 +129,7 @@ class Tasklink extends Base $task = $this->getTask(); $link = $this->getTaskLink(); - $this->response->html($this->template->render('tasklink/remove', array( + $this->response->html($this->template->render('task_internal_link/remove', array( 'link' => $link, 'task' => $task, ))); @@ -153,6 +151,6 @@ class Tasklink extends Base $this->flash->failure(t('Unable to remove this link.')); } - $this->response->redirect($this->helper->url->to('task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])).'#links'); + $this->response->redirect($this->helper->url->to('task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']))); } } |