diff options
author | Frederic Guillot <fred@kanboard.net> | 2016-02-03 20:53:07 -0500 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2016-02-03 20:53:07 -0500 |
commit | 346151e103431e8de12520b26daae10676b8faf5 (patch) | |
tree | bc74ec361007a2567d68372b3a16d57ff5aa560c /app/Template/task/sidebar.php | |
parent | 6d388ec48d04481883aeb08b3aa4cbb9063ce3a4 (diff) |
Add dropdown menu with inline popup for all task actions
Diffstat (limited to 'app/Template/task/sidebar.php')
-rw-r--r-- | app/Template/task/sidebar.php | 78 |
1 files changed, 5 insertions, 73 deletions
diff --git a/app/Template/task/sidebar.php b/app/Template/task/sidebar.php index c184e095..c60a1810 100644 --- a/app/Template/task/sidebar.php +++ b/app/Template/task/sidebar.php @@ -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 ?> - - <?= $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') ?> + <?= $this->url->link(t('Sub-tasks'), 'subtask', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> </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'])) ?> + <?= $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('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'])) ?> + <?= $this->url->link(t('External links'), 'TaskExternalLink', 'show', 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') ?> + <?= $this->hook->render('template:task:sidebar:information') ?> </ul> - <?php endif ?> </div> |