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/Template/task | |
parent | ec66a779c9158830fe4bb0f96a44eadfe697ef00 (diff) |
Add external links for tasks with plugin api
Diffstat (limited to 'app/Template/task')
-rw-r--r-- | app/Template/task/comments.php | 3 | ||||
-rw-r--r-- | app/Template/task/show.php | 17 | ||||
-rw-r--r-- | app/Template/task/sidebar.php | 22 |
3 files changed, 30 insertions, 12 deletions
diff --git a/app/Template/task/comments.php b/app/Template/task/comments.php index 57fb305f..ef85287b 100644 --- a/app/Template/task/comments.php +++ b/app/Template/task/comments.php @@ -28,7 +28,8 @@ 'task_id' => $task['id'], ), 'errors' => array(), - 'task' => $task + 'task' => $task, + 'ajax' => $ajax, )) ?> <?php endif ?> </div> diff --git a/app/Template/task/show.php b/app/Template/task/show.php index f6d47e53..b848d49e 100644 --- a/app/Template/task/show.php +++ b/app/Template/task/show.php @@ -13,14 +13,6 @@ <?= $this->render('task/description', array('task' => $task)) ?> -<?= $this->render('tasklink/show', array( - 'task' => $task, - 'links' => $links, - 'link_label_list' => $link_label_list, - 'editable' => $this->user->hasProjectAccess('tasklink', 'edit', $project['id']), - 'is_public' => false, -)) ?> - <?= $this->render('subtask/show', array( 'task' => $task, 'subtasks' => $subtasks, @@ -29,6 +21,14 @@ 'editable' => $this->user->hasProjectAccess('subtask', 'edit', $project['id']), )) ?> +<?= $this->render('tasklink/show', array( + 'task' => $task, + 'links' => $links, + 'link_label_list' => $link_label_list, + 'editable' => $this->user->hasProjectAccess('tasklink', 'edit', $project['id']), + 'is_public' => false, +)) ?> + <?= $this->render('task/time_tracking_summary', array('task' => $task)) ?> <?= $this->render('file/show', array( @@ -42,4 +42,5 @@ 'comments' => $comments, 'project' => $project, 'editable' => $this->user->hasProjectAccess('comment', 'edit', $project['id']), + 'ajax' => $ajax, )) ?> diff --git a/app/Template/task/sidebar.php b/app/Template/task/sidebar.php index f522c1c4..b5a2c4b4 100644 --- a/app/Template/task/sidebar.php +++ b/app/Template/task/sidebar.php @@ -21,6 +21,25 @@ <?= $this->hook->render('template:task:sidebar:information') ?> </ul> + + <h2><?= t('Links') ?></h2> + <ul> + <li <?= $this->app->checkMenuSelection('tasklink', 'show') ?>> + <?= $this->url->link(t('View internal links'), 'tasklink', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> + </li> + <li <?= $this->app->checkMenuSelection('TaskExternalLink', 'show') ?>> + <?= $this->url->link(t('View external links'), 'TaskExternalLink', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> + </li> + <?php if ($this->user->hasProjectAccess('tasklink', 'create', $task['project_id'])): ?> + <li <?= $this->app->checkMenuSelection('tasklink', 'create') ?>> + <?= $this->url->link(t('Add internal link'), 'tasklink', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> + </li> + <li <?= $this->app->checkMenuSelection('TaskExternalLink', 'find') ?>> + <?= $this->url->link(t('Add external link'), 'TaskExternalLink', 'find', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> + </li> + <?php endif ?> + </ul> + <?php if ($this->user->hasProjectAccess('taskmodification', 'edit', $task['project_id'])): ?> <h2><?= t('Actions') ?></h2> <ul> @@ -36,9 +55,6 @@ <li <?= $this->app->checkMenuSelection('subtask', 'create') ?>> <?= $this->url->link(t('Add a sub-task'), 'subtask', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> </li> - <li <?= $this->app->checkMenuSelection('tasklink', 'create') ?>> - <?= $this->url->link(t('Add a link'), 'tasklink', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> - </li> <li <?= $this->app->checkMenuSelection('comment', 'create') ?>> <?= $this->url->link(t('Add a comment'), 'comment', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> </li> |