summaryrefslogtreecommitdiff
path: root/app/Template/task/sidebar.php
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2016-01-30 20:38:20 -0500
committerFrederic Guillot <fred@kanboard.net>2016-01-30 20:38:20 -0500
commit5c92f467867b43034b9e66b46b3b465ba9db655c (patch)
treecb0855ea64d8bba3abe4dfe978c5dbabb745911d /app/Template/task/sidebar.php
parentec66a779c9158830fe4bb0f96a44eadfe697ef00 (diff)
Add external links for tasks with plugin api
Diffstat (limited to 'app/Template/task/sidebar.php')
-rw-r--r--app/Template/task/sidebar.php22
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>