diff options
author | Frédéric Guillot <contact@fredericguillot.com> | 2014-07-04 12:39:47 -0300 |
---|---|---|
committer | Frédéric Guillot <contact@fredericguillot.com> | 2014-07-04 12:39:47 -0300 |
commit | 8c428d377f1570faf1198ae692a6f56bdb66170c (patch) | |
tree | 73f365f681a59328f11ce12086bf5685b3ab821a /app/Templates | |
parent | ccd5e93c163a8bf35787506f70df4d136dd34b85 (diff) | |
parent | 6d65cfd88343aadc68e4963e66dcdc0688b4346c (diff) |
Merge pull request #163 from Typz/popover
Use popover to edit task and description directly from board.
Diffstat (limited to 'app/Templates')
-rw-r--r-- | app/Templates/board_task.php | 10 | ||||
-rw-r--r-- | app/Templates/task_edit.php | 11 | ||||
-rw-r--r-- | app/Templates/task_edit_description.php | 7 |
3 files changed, 20 insertions, 8 deletions
diff --git a/app/Templates/board_task.php b/app/Templates/board_task.php index fa745ac1..89f768e0 100644 --- a/app/Templates/board_task.php +++ b/app/Templates/board_task.php @@ -20,13 +20,13 @@ <?php else: ?> - <a href="?controller=task&action=edit&task_id=<?= $task['id'] ?>" title="<?= t('Edit this task') ?>">#<?= $task['id'] ?></a> - + <a class="task-board-popover" href="?controller=task&action=edit&task_id=<?= $task['id'] ?>" title="<?= t('Edit this task') ?>">#<?= $task['id'] ?></a> - <span class="task-board-user"> <?php if (! empty($task['owner_id'])): ?> - <a href="?controller=board&action=assign&task_id=<?= $task['id'] ?>" title="<?= t('Change assignee') ?>"><?= t('Assigned to %s', $task['username']) ?></a> + <a class="task-board-popover" href="?controller=board&action=assign&task_id=<?= $task['id'] ?>" title="<?= t('Change assignee') ?>"><?= t('Assigned to %s', $task['username']) ?></a> <?php else: ?> - <a href="?controller=board&action=assign&task_id=<?= $task['id'] ?>" title="<?= t('Change assignee') ?>" class="task-board-nobody"><?= t('Nobody assigned') ?></a> + <a class="task-board-popover" href="?controller=board&action=assign&task_id=<?= $task['id'] ?>" title="<?= t('Change assignee') ?>" class="task-board-nobody"><?= t('Nobody assigned') ?></a> <?php endif ?> </span> @@ -69,8 +69,8 @@ <?php endif ?> <?php if (! empty($task['description'])): ?> - <i class="fa fa-file-text-o" title="<?= t('Description') ?>"></i> + <a class="task-board-popover" href='?controller=task&action=editDescription&task_id=<?= $task['id'] ?>'><i class="fa fa-file-text-o" title="<?= t('Description') ?>"></i></a> <?php endif ?> </div> </div> -<?php endif ?>
\ No newline at end of file +<?php endif ?> 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&action=show&project_id=<?= $task['project_id'] ?>"><?= t('Back to the board') ?></a></li> </ul> +<?php endif ?> </div> <section> - <form method="post" action="?controller=task&action=update&task_id=<?= $task['id'] ?>" autocomplete="off"> + <form method="post" action="?controller=task&action=update&task_id=<?= $task['id'] ?>&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&action=show&task_id=<?= $task['id'] ?>"><?= t('cancel') ?></a> + <?= t('or') ?> +<?php if ($ajax): ?> + <a href="?controller=board&action=show&project_id=<?= $task['project_id'] ?>"><?= t('cancel') ?></a> +<?php else: ?> + <a href="?controller=task&action=show&task_id=<?= $task['id'] ?>"><?= t('cancel') ?></a> +<?php endif ?> </div> </form> </section> diff --git a/app/Templates/task_edit_description.php b/app/Templates/task_edit_description.php index 550dac73..ba0d3887 100644 --- a/app/Templates/task_edit_description.php +++ b/app/Templates/task_edit_description.php @@ -2,7 +2,7 @@ <h2><?= t('Edit the description') ?></h2> </div> -<form method="post" action="?controller=task&action=saveDescription&task_id=<?= $task['id'] ?>" autocomplete="off"> +<form method="post" action="?controller=task&action=saveDescription&task_id=<?= $task['id'] ?>&ajax=<?= $ajax ?>" autocomplete="off"> <?= Helper\form_csrf() ?> @@ -13,6 +13,11 @@ <div class="form-actions"> <input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/> <?= t('or') ?> +<?php if ($ajax): ?> + <a href="?controller=board&action=show&project_id=<?= $task['project_id'] ?>"><?= t('cancel') ?></a> +<?php else: ?> <a href="?controller=task&action=show&task_id=<?= $task['id'] ?>"><?= t('cancel') ?></a> +<?php endif ?> </div> </form> + |