summaryrefslogtreecommitdiff
path: root/app/Template
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2015-09-26 15:03:15 -0400
committerFrederic Guillot <fred@kanboard.net>2015-09-26 15:03:15 -0400
commit02106b474710444cb02f87859c8f0dee8c8bd077 (patch)
tree4ce3d9aac1927d76ec86f672769c7c968a9b686d /app/Template
parent97430b94654ab93abe019d7e98f82f81bd3f7899 (diff)
Show "Open this task" in dropdown menu for closed tasks
Diffstat (limited to 'app/Template')
-rw-r--r--app/Template/board/task_menu.php6
-rw-r--r--app/Template/task_status/close.php2
-rw-r--r--app/Template/task_status/open.php6
3 files changed, 9 insertions, 5 deletions
diff --git a/app/Template/board/task_menu.php b/app/Template/board/task_menu.php
index 1434a1a0..3eb35705 100644
--- a/app/Template/board/task_menu.php
+++ b/app/Template/board/task_menu.php
@@ -8,6 +8,10 @@
<li><i class="fa fa-comment-o fa-fw"></i>&nbsp;<?= $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-code-fork fa-fw"></i>&nbsp;<?= $this->url->link(t('Add a link'), 'tasklink', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?></li>
<li><i class="fa fa-camera fa-fw"></i>&nbsp;<?= $this->url->link(t('Add a screenshot'), 'board', 'screenshot', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?></li>
- <li><i class="fa fa-close fa-fw"></i>&nbsp;<?= $this->url->link(t('Close this task'), 'taskstatus', 'close', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'redirect' => 'board'), false, 'popover') ?></li>
+ <?php if ($task['is_active'] == 1): ?>
+ <li><i class="fa fa-close fa-fw"></i>&nbsp;<?= $this->url->link(t('Close this task'), 'taskstatus', 'close', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'redirect' => 'board'), false, 'popover') ?></li>
+ <?php else: ?>
+ <li><i class="fa fa-check-square-o fa-fw"></i>&nbsp;<?= $this->url->link(t('Open this task'), 'taskstatus', 'open', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'redirect' => 'board'), false, 'popover') ?></li>
+ <?php endif ?>
</ul>
</span> \ No newline at end of file
diff --git a/app/Template/task_status/close.php b/app/Template/task_status/close.php
index 4de3dcb2..d32863bd 100644
--- a/app/Template/task_status/close.php
+++ b/app/Template/task_status/close.php
@@ -4,7 +4,7 @@
<div class="confirm">
<p class="alert alert-info">
- <?= t('Do you really want to close the task "%s" as well as all subtasks?', $this->e($task['title'])) ?>
+ <?= t('Do you really want to close the task "%s" as well as all subtasks?', $task['title']) ?>
</p>
<div class="form-actions">
diff --git a/app/Template/task_status/open.php b/app/Template/task_status/open.php
index 0043fdae..615b2464 100644
--- a/app/Template/task_status/open.php
+++ b/app/Template/task_status/open.php
@@ -4,12 +4,12 @@
<div class="confirm">
<p class="alert alert-info">
- <?= t('Do you really want to open this task: "%s"?', $this->e($task['title'])) ?>
+ <?= t('Do you really want to open this task: "%s"?', $task['title']) ?>
</p>
<div class="form-actions">
- <?= $this->url->link(t('Yes'), 'taskstatus', 'open', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'confirmation' => 'yes'), true, 'btn btn-red') ?>
+ <?= $this->url->link(t('Yes'), 'taskstatus', 'open', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'confirmation' => 'yes', 'redirect' => $redirect), true, 'btn btn-red') ?>
<?= t('or') ?>
- <?= $this->url->link(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
+ <?= $this->url->link(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?>
</div>
</div> \ No newline at end of file