summaryrefslogtreecommitdiff
path: root/app/Template/task
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2016-03-17 23:12:16 -0400
committerFrederic Guillot <fred@kanboard.net>2016-03-17 23:12:16 -0400
commitf1e4fb92b361b409d2da8d84440653ac469b7d4f (patch)
tree686122e12ebb31ee639069745bfe9a4de44d093c /app/Template/task
parent24c224ddc224f68521f3143d66754742311d2a83 (diff)
Put back task actions on the sidebar
Diffstat (limited to 'app/Template/task')
-rw-r--r--app/Template/task/description.php6
-rw-r--r--app/Template/task/sidebar.php72
2 files changed, 75 insertions, 3 deletions
diff --git a/app/Template/task/description.php b/app/Template/task/description.php
index f823e7d6..b84e9f42 100644
--- a/app/Template/task/description.php
+++ b/app/Template/task/description.php
@@ -2,6 +2,12 @@
<div id="description" class="task-show-section">
<div class="page-header">
<h2><?= t('Description') ?></h2>
+ <ul>
+ <li>
+ <i class="fa fa-edit fa-fw"></i>
+ <?= $this->url->link(t('Edit the description'), 'taskmodification', 'description', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
+ </li>
+ </ul>
</div>
<article class="markdown task-show-description">
diff --git a/app/Template/task/sidebar.php b/app/Template/task/sidebar.php
index 951c5095..e9af71a5 100644
--- a/app/Template/task/sidebar.php
+++ b/app/Template/task/sidebar.php
@@ -1,33 +1,99 @@
-<div class="sidebar">
+<div class="sidebar sidebar-icons">
<h2><?= t('Task #%d', $task['id']) ?></h2>
<ul>
<li <?= $this->app->checkMenuSelection('task', 'show') ?>>
+ <i class="fa fa-newspaper-o fa-fw"></i>
<?= $this->url->link(t('Summary'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
</li>
<li <?= $this->app->checkMenuSelection('activity', 'task') ?>>
+ <i class="fa fa-dashboard fa-fw"></i>
<?= $this->url->link(t('Activity stream'), 'activity', 'task', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
</li>
<li <?= $this->app->checkMenuSelection('task', 'transitions') ?>>
+ <i class="fa fa-arrows-h fa-fw"></i>
<?= $this->url->link(t('Transitions'), 'task', 'transitions', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
</li>
<li <?= $this->app->checkMenuSelection('task', 'analytics') ?>>
+ <i class="fa fa-bar-chart fa-fw"></i>
<?= $this->url->link(t('Analytics'), 'task', 'analytics', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
</li>
<?php if ($task['time_estimated'] > 0 || $task['time_spent'] > 0): ?>
<li <?= $this->app->checkMenuSelection('task', 'timetracking') ?>>
+ <i class="fa fa-clock-o fa-fw"></i>
<?= $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') ?>>
+ <i class="fa fa-tasks fa-fw"></i>
<?= $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') ?>>
+ <i class="fa fa-code-fork fa-fw"></i>
<?= $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') ?>>
+ <i class="fa fa-external-link fa-fw"></i>
<?= $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', array('task' => $task)) ?>
</ul>
+ <h2><?= t('Actions') ?></h2>
+ <ul>
+ <li>
+ <i class="fa fa-pencil-square-o fa-fw"></i>
+ <?= $this->url->link(t('Edit the task'), 'taskmodification', 'edit', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
+ </li>
+ <li>
+ <i class="fa fa-align-left fa-fw"></i>
+ <?= $this->url->link(t('Edit the description'), 'taskmodification', 'description', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
+ </li>
+ <li>
+ <i class="fa fa-refresh fa-rotate-90 fa-fw"></i>
+ <?= $this->url->link(t('Edit recurrence'), 'TaskRecurrence', 'edit', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
+ </li>
+ <li>
+ <i class="fa fa-plus fa-fw"></i>
+ <?= $this->url->link(t('Add a sub-task'), 'subtask', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
+ </li>
+ <li>
+ <i class="fa fa-comment-o fa-fw"></i>
+ <?= $this->url->link(t('Add a comment'), 'comment', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
+ </li>
+ <li>
+ <i class="fa fa-file fa-fw"></i>
+ <?= $this->url->link(t('Attach a document'), 'TaskFile', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
+ </li>
+ <li>
+ <i class="fa fa-camera fa-fw"></i>
+ <?= $this->url->link(t('Add a screenshot'), 'TaskFile', 'screenshot', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
+ </li>
+ <li>
+ <i class="fa fa-files-o fa-fw"></i>
+ <?= $this->url->link(t('Duplicate'), 'taskduplication', 'duplicate', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
+ </li>
+ <li>
+ <i class="fa fa-clipboard fa-fw"></i>
+ <?= $this->url->link(t('Duplicate to another project'), 'taskduplication', 'copy', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
+ </li>
+ <li>
+ <i class="fa fa-clone fa-fw"></i>
+ <?= $this->url->link(t('Move to another project'), 'taskduplication', 'move', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
+ </li>
+ <li>
+ <?php if ($task['is_active'] == 1): ?>
+ <i class="fa fa-times fa-fw"></i>
+ <?= $this->url->link(t('Close this task'), 'taskstatus', 'close', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
+ <?php else: ?>
+ <i class="fa fa-check-square-o fa-fw"></i>
+ <?= $this->url->link(t('Open this task'), 'taskstatus', 'open', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
+ <?php endif ?>
+ </li>
+ <?php if ($this->task->canRemove($task)): ?>
+ <li>
+ <i class="fa fa-trash-o fa-fw"></i>
+ <?= $this->url->link(t('Remove'), 'task', 'remove', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
+ </li>
+ <?php endif ?>
+ </ul>
+
+ <?= $this->hook->render('template:task:sidebar', array('task' => $task)) ?>
</div>