summaryrefslogtreecommitdiff
path: root/app/Templates
diff options
context:
space:
mode:
authorFrédéric Guillot <fred@kanboard.net>2014-08-30 22:35:50 -0800
committerFrédéric Guillot <fred@kanboard.net>2014-08-30 22:35:50 -0800
commit7e44dee903015399e221cdda52e540e75c2484f5 (patch)
tree48ddc68daa00b857bde78be9b6bd5ef5dbf36e5d /app/Templates
parent9e36f84fbc672e8d63a189c6c6365a6eca97f718 (diff)
Move a task to another project
Diffstat (limited to 'app/Templates')
-rw-r--r--app/Templates/task_edit_description.php11
-rw-r--r--app/Templates/task_move_project.php18
-rw-r--r--app/Templates/task_sidebar.php1
3 files changed, 24 insertions, 6 deletions
diff --git a/app/Templates/task_edit_description.php b/app/Templates/task_edit_description.php
index e3a3e8b9..d403190f 100644
--- a/app/Templates/task_edit_description.php
+++ b/app/Templates/task_edit_description.php
@@ -13,11 +13,10 @@
<div class="form-actions">
<input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
<?= 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 ?>
+ <?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>
-
diff --git a/app/Templates/task_move_project.php b/app/Templates/task_move_project.php
new file mode 100644
index 00000000..190a93d9
--- /dev/null
+++ b/app/Templates/task_move_project.php
@@ -0,0 +1,18 @@
+<div class="page-header">
+ <h2><?= t('Move the task to another project') ?></h2>
+</div>
+
+<form method="post" action="?controller=task&amp;action=move&amp;task_id=<?= $task['id'] ?>&amp;project_id=<?= $task['project_id'] ?>" autocomplete="off">
+
+ <?= Helper\form_csrf() ?>
+
+ <?= Helper\form_hidden('id', $values) ?>
+ <?= Helper\form_label(t('Project'), 'project_id') ?>
+ <?= Helper\form_select('project_id', $projects_list, $values, $errors) ?><br/>
+
+ <div class="form-actions">
+ <input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
+ <?= t('or') ?>
+ <a href="?controller=board&amp;action=show&amp;project_id=<?= $task['project_id'] ?>"><?= t('cancel') ?></a>
+ </div>
+</form> \ No newline at end of file
diff --git a/app/Templates/task_sidebar.php b/app/Templates/task_sidebar.php
index d97c44e2..ba9d7a86 100644
--- a/app/Templates/task_sidebar.php
+++ b/app/Templates/task_sidebar.php
@@ -9,6 +9,7 @@
<li><a href="?controller=comment&amp;action=create&amp;task_id=<?= $task['id'] ?>"><?= t('Add a comment') ?></a></li>
<li><a href="?controller=file&amp;action=create&amp;task_id=<?= $task['id'] ?>"><?= t('Attach a document') ?></a></li>
<li><a href="?controller=task&amp;action=duplicate&amp;project_id=<?= $task['project_id'] ?>&amp;task_id=<?= $task['id'] ?>"><?= t('Duplicate') ?></a></li>
+ <li><a href="?controller=task&amp;action=move&amp;project_id=<?= $task['project_id'] ?>&amp;task_id=<?= $task['id'] ?>"><?= t('Move to another project') ?></a></li>
<li>
<?php if ($task['is_active'] == 1): ?>
<a href="?controller=task&amp;action=confirmClose&amp;task_id=<?= $task['id'] ?>"><?= t('Close this task') ?></a>