Add external links for tasks with plugin api

This commit is contained in:
Frederic Guillot
2016-01-30 20:38:20 -05:00
parent ec66a779c9
commit 5c92f46786
81 changed files with 2544 additions and 75 deletions

View File

@@ -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;