summaryrefslogtreecommitdiff
path: root/app/Template/task_move_position
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2016-08-28 22:30:48 -0400
committerFrederic Guillot <fred@kanboard.net>2016-08-28 22:30:48 -0400
commit08bdb708e7698c21b0e6fc9f21d19996fc3d593d (patch)
treeb7ab229dfd1568bb9435e40b20c77aa783eefcc2 /app/Template/task_move_position
parentb51c693cda1cfbda115e315de58b15c0ef275972 (diff)
Add the possibility to move tasks without drag and drop
Diffstat (limited to 'app/Template/task_move_position')
-rw-r--r--app/Template/task_move_position/show.php43
1 files changed, 43 insertions, 0 deletions
diff --git a/app/Template/task_move_position/show.php b/app/Template/task_move_position/show.php
new file mode 100644
index 00000000..29e1bcb1
--- /dev/null
+++ b/app/Template/task_move_position/show.php
@@ -0,0 +1,43 @@
+<div class="page-header">
+ <h2><?= t('Move task to another position on the board') ?></h2>
+</div>
+
+<script type="x/templates" id="template-task-move-position">
+ <?= $this->form->label(t('Swimlane'), 'swimlane') ?>
+ <select v-model="swimlaneId" @change="onChangeSwimlane()" id="form-swimlane">
+ <option v-for="swimlane in board" v-bind:value="swimlane.id">
+ {{ swimlane.name }}
+ </option>
+ </select>
+
+ <div v-if="columns.length > 0">
+ <?= $this->form->label(t('Column'), 'column') ?>
+ <select v-model="columnId" @change="onChangeColumn()" id="form-column">
+ <option v-for="column in columns" v-bind:value="column.id">
+ {{ column.title }}
+ </option>
+ </select>
+ </div>
+
+ <div v-if="tasks.length > 0">
+ <?= $this->form->label(t('Position'), 'position') ?>
+ <select v-model="position" id="form-position">
+ <option v-for="task in tasks" v-bind:value="task.position">
+ #{{ task.id }} - {{ task.title }}
+ </option>
+ </select>
+ <label><input type="radio" value="before" v-model="positionChoice"><?= t('Insert before this task') ?></label>
+ <label><input type="radio" value="after" v-model="positionChoice"><?= t('Insert after this task') ?></label>
+ </div>
+
+ <div class="form-actions">
+ <input type="button" value="<?= t('Save') ?>" class="btn btn-blue" @click="onSubmit">
+ <?= t('or') ?>
+ <?= $this->url->link(t('cancel'), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?>
+ </div>
+</script>
+
+<task-move-position
+ save-url="<?= $this->url->href('TaskMovePositionController', 'save', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>"
+ :board='<?= json_encode($board, JSON_HEX_APOS) ?>'
+></task-move-position>