Add dropdown menu with inline popup for all task actions
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<div class="sidebar">
|
||||
<h2><?= t('Information') ?></h2>
|
||||
<h2><?= t('Task #%d', $task['id']) ?></h2>
|
||||
<ul>
|
||||
<li <?= $this->app->checkMenuSelection('task', 'show') ?>>
|
||||
<?= $this->url->link(t('Summary'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
|
||||
@@ -18,84 +18,16 @@
|
||||
<?= $this->url->link(t('Time tracking'), 'task', 'timetracking', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
|
||||
</li>
|
||||
<?php endif ?>
|
||||
<li <?= $this->app->checkMenuSelection('subtask', 'show') ?>>
|
||||
<?= $this->url->link(t('Sub-tasks'), 'subtask', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
|
||||
</li>
|
||||
<li <?= $this->app->checkMenuSelection('tasklink', 'show') ?>>
|
||||
<?= $this->url->link(t('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('External links'), 'TaskExternalLink', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
|
||||
</li>
|
||||
|
||||
<?= $this->hook->render('template:task:sidebar:information') ?>
|
||||
</ul>
|
||||
|
||||
<h2><?= t('Sub-Tasks') ?></h2>
|
||||
<ul>
|
||||
<li <?= $this->app->checkMenuSelection('subtask', 'show') ?>>
|
||||
<?= $this->url->link(t('View all sub-tasks'), 'subtask', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
|
||||
</li>
|
||||
<?php if ($this->user->hasProjectAccess('subtask', 'create', $task['project_id'])): ?>
|
||||
<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']), false, 'popover') ?>
|
||||
</li>
|
||||
<?php endif ?>
|
||||
</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>
|
||||
<li <?= $this->app->checkMenuSelection('taskmodification', 'edit') ?>>
|
||||
<?= $this->url->link(t('Edit the task'), 'taskmodification', 'edit', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
|
||||
</li>
|
||||
<li <?= $this->app->checkMenuSelection('taskmodification', 'description') ?>>
|
||||
<?= $this->url->link(t('Edit the description'), 'taskmodification', 'description', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
|
||||
</li>
|
||||
<li <?= $this->app->checkMenuSelection('taskmodification', 'recurrence') ?>>
|
||||
<?= $this->url->link(t('Edit recurrence'), 'taskmodification', 'recurrence', 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>
|
||||
<li <?= $this->app->checkMenuSelection('file', 'create') ?>>
|
||||
<?= $this->url->link(t('Attach a document'), 'file', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
|
||||
</li>
|
||||
<li <?= $this->app->checkMenuSelection('file', 'screenshot') ?>>
|
||||
<?= $this->url->link(t('Add a screenshot'), 'file', 'screenshot', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
|
||||
</li>
|
||||
<li <?= $this->app->checkMenuSelection('taskduplication', 'duplicate') ?>>
|
||||
<?= $this->url->link(t('Duplicate'), 'taskduplication', 'duplicate', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
|
||||
</li>
|
||||
<li <?= $this->app->checkMenuSelection('taskduplication', 'copy') ?>>
|
||||
<?= $this->url->link(t('Duplicate to another project'), 'taskduplication', 'copy', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
|
||||
</li>
|
||||
<li <?= $this->app->checkMenuSelection('taskduplication', 'move') ?>>
|
||||
<?= $this->url->link(t('Move to another project'), 'taskduplication', 'move', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
|
||||
</li>
|
||||
<li <?= $this->app->checkMenuSelection('taskstatus') ?>>
|
||||
<?php if ($task['is_active'] == 1): ?>
|
||||
<?= $this->url->link(t('Close this task'), 'taskstatus', 'close', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
|
||||
<?php else: ?>
|
||||
<?= $this->url->link(t('Open this task'), 'taskstatus', 'open', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
|
||||
<?php endif ?>
|
||||
</li>
|
||||
<?php if ($this->task->canRemove($task)): ?>
|
||||
<li <?= $this->app->checkMenuSelection('task', 'remove') ?>>
|
||||
<?= $this->url->link(t('Remove'), 'task', 'remove', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
|
||||
</li>
|
||||
<?php endif ?>
|
||||
|
||||
<?= $this->hook->render('template:task:sidebar:actions') ?>
|
||||
</ul>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user