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/sidebar.php | |
parent | ec66a779c9158830fe4bb0f96a44eadfe697ef00 (diff) |
Add external links for tasks with plugin api
Diffstat (limited to 'app/Template/task/sidebar.php')
-rw-r--r-- | app/Template/task/sidebar.php | 22 |
1 files changed, 19 insertions, 3 deletions
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> |