diff options
author | Frederic Guillot <fred@kanboard.net> | 2016-01-30 20:38:20 -0500 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2016-01-30 20:38:20 -0500 |
commit | 5c92f467867b43034b9e66b46b3b465ba9db655c (patch) | |
tree | cb0855ea64d8bba3abe4dfe978c5dbabb745911d /app/Controller/Base.php | |
parent | ec66a779c9158830fe4bb0f96a44eadfe697ef00 (diff) |
Add external links for tasks with plugin api
Diffstat (limited to 'app/Controller/Base.php')
-rw-r--r-- | app/Controller/Base.php | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/app/Controller/Base.php b/app/Controller/Base.php index efeab31e..fb64bcf3 100644 --- a/app/Controller/Base.php +++ b/app/Controller/Base.php @@ -189,9 +189,15 @@ abstract class Base extends \Kanboard\Core\Base */ protected function taskLayout($template, array $params) { + $params['ajax'] = $this->request->isAjax() || $this->request->getIntegerParam('ajax') === 1; $content = $this->template->render($template, $params); - $params['task_content_for_layout'] = $content; + + if ($params['ajax']) { + return $content; + } + $params['title'] = $params['task']['project_name'].' > '.$params['task']['title']; + $params['task_content_for_layout'] = $content; $params['board_selector'] = $this->projectUserRole->getActiveProjectsByUser($this->userSession->getId()); return $this->template->layout('task/layout', $params); @@ -319,7 +325,8 @@ abstract class Base extends \Kanboard\Core\Base * @param array &$project * @return string */ - protected function getProjectDescription(array &$project) { + protected function getProjectDescription(array &$project) + { if ($project['owner_id'] > 0) { $description = t('Project owner: ').'**'.$this->template->e($project['owner_name'] ?: $project['owner_username']).'**'.PHP_EOL.PHP_EOL; |