summaryrefslogtreecommitdiff
path: root/app/Templates
diff options
context:
space:
mode:
authorFrédéric Guillot <fred@kanboard.net>2014-08-31 20:44:58 -0800
committerFrédéric Guillot <fred@kanboard.net>2014-08-31 20:44:58 -0800
commit7dd0a24411497509944c94373ad5831ff8b6c943 (patch)
tree8a87a8172fded3574ab0420e2323cc17b8c4b9b3 /app/Templates
parent7e44dee903015399e221cdda52e540e75c2484f5 (diff)
Improve project move view
Diffstat (limited to 'app/Templates')
-rw-r--r--app/Templates/task_move_project.php28
1 files changed, 17 insertions, 11 deletions
diff --git a/app/Templates/task_move_project.php b/app/Templates/task_move_project.php
index 190a93d9..3bc3bcb8 100644
--- a/app/Templates/task_move_project.php
+++ b/app/Templates/task_move_project.php
@@ -2,17 +2,23 @@
<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">
+<?php if (empty($projects_list)): ?>
+ <p class="alert"><?= t('No project') ?></p>
+<?php else: ?>
- <?= Helper\form_csrf() ?>
+ <form method="post" action="?controller=task&amp;action=move&amp;task_id=<?= $task['id'] ?>&amp;project_id=<?= $task['project_id'] ?>" autocomplete="off">
- <?= Helper\form_hidden('id', $values) ?>
- <?= Helper\form_label(t('Project'), 'project_id') ?>
- <?= Helper\form_select('project_id', $projects_list, $values, $errors) ?><br/>
+ <?= Helper\form_csrf() ?>
- <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
+ <?= 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=task&amp;action=show&amp;task_id=<?= $task['id'] ?>"><?= t('cancel') ?></a>
+ </div>
+ </form>
+
+<?php endif ?> \ No newline at end of file