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

@@ -28,7 +28,8 @@
'task_id' => $task['id'],
),
'errors' => array(),
'task' => $task
'task' => $task,
'ajax' => $ajax,
)) ?>
<?php endif ?>
</div>

View File

@@ -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,
)) ?>

View File

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