summaryrefslogtreecommitdiff
path: root/app/Templates/task_edit.php
diff options
context:
space:
mode:
authorFrancois Ferrand <thetypz@gmail.com>2014-06-26 15:52:39 +0200
committerFrancois Ferrand <thetypz@gmail.com>2014-07-01 11:16:19 +0200
commit6d65cfd88343aadc68e4963e66dcdc0688b4346c (patch)
tree1615e89e40f1068166d2f59d910681813e451c67 /app/Templates/task_edit.php
parent06d0b7048ebcdfdf6e24eec3ac7dc8fb0327dd6f (diff)
Use popover to edit task and description directly from board.
- Click on 'description' icon opens the 'edit-description' page. - Edit task and edit description now open in popover, like the assign dialog.
Diffstat (limited to 'app/Templates/task_edit.php')
-rw-r--r--app/Templates/task_edit.php11
1 files changed, 9 insertions, 2 deletions
diff --git a/app/Templates/task_edit.php b/app/Templates/task_edit.php
index 015f746d..07c3539b 100644
--- a/app/Templates/task_edit.php
+++ b/app/Templates/task_edit.php
@@ -1,12 +1,14 @@
<section id="main">
<div class="page-header">
<h2><?= t('Edit a task') ?></h2>
+<?php if (!$ajax): ?>
<ul>
<li><a href="?controller=board&amp;action=show&amp;project_id=<?= $task['project_id'] ?>"><?= t('Back to the board') ?></a></li>
</ul>
+<?php endif ?>
</div>
<section>
- <form method="post" action="?controller=task&amp;action=update&amp;task_id=<?= $task['id'] ?>" autocomplete="off">
+ <form method="post" action="?controller=task&amp;action=update&amp;task_id=<?= $task['id'] ?>&amp;ajax=<?= $ajax ?>" autocomplete="off">
<?= Helper\form_csrf() ?>
@@ -47,7 +49,12 @@
<div class="form-actions">
<input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
- <?= t('or') ?> <a href="?controller=task&amp;action=show&amp;task_id=<?= $task['id'] ?>"><?= t('cancel') ?></a>
+ <?= t('or') ?>
+<?php if ($ajax): ?>
+ <a href="?controller=board&amp;action=show&amp;project_id=<?= $task['project_id'] ?>"><?= t('cancel') ?></a>
+<?php else: ?>
+ <a href="?controller=task&amp;action=show&amp;task_id=<?= $task['id'] ?>"><?= t('cancel') ?></a>
+<?php endif ?>
</div>
</form>
</section>