Change a category directly from the board

This commit is contained in:
Frédéric Guillot
2014-09-03 14:25:17 -07:00
parent d68ff648b1
commit 749136361e
16 changed files with 150 additions and 37 deletions

View File

@@ -1,14 +1,12 @@
<section id="main">
<div class="page-header board">
<h2>
<?= t('Project "%s"', $current_project_name) ?>
</h2>
<h2><?= t('Project "%s"', $current_project_name) ?></h2>
</div>
<section>
<h3><?= t('Change assignee for the task "%s"', $values['title']) ?></h3>
<form method="post" action="?controller=board&amp;action=assignTask" autocomplete="off">
<form method="post" action="?controller=board&amp;action=updateAssignee" autocomplete="off">
<?= Helper\form_csrf() ?>
<?= Helper\form_hidden('id', $values) ?>
<?= Helper\form_hidden('project_id', $values) ?>

View File

@@ -0,0 +1,24 @@
<section id="main">
<div class="page-header board">
<h2><?= t('Project "%s"', $current_project_name) ?></h2>
</div>
<section>
<h3><?= t('Change category for the task "%s"', $values['title']) ?></h3>
<form method="post" action="?controller=board&amp;action=updateCategory" autocomplete="off">
<?= Helper\form_csrf() ?>
<?= Helper\form_hidden('id', $values) ?>
<?= Helper\form_hidden('project_id', $values) ?>
<?= Helper\form_label(t('Category'), 'category_id') ?>
<?= Helper\form_select('category_id', $categories_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=<?= $values['project_id'] ?>"><?= t('cancel') ?></a>
</div>
</form>
</section>
</section>

View File

@@ -23,11 +23,13 @@
<a class="task-edit-popover" href="?controller=task&amp;action=edit&amp;task_id=<?= $task['id'] ?>" title="<?= t('Edit this task') ?>">#<?= $task['id'] ?></a> -
<span class="task-board-user">
<?php if (! empty($task['owner_id'])): ?>
<a class="assignee-popover" href="?controller=board&amp;action=assign&amp;task_id=<?= $task['id'] ?>" title="<?= t('Change assignee') ?>"><?= t('Assigned to %s', $task['assignee_name'] ?: $task['assignee_username']) ?></a>
<?php else: ?>
<a class="assignee-popover" href="?controller=board&amp;action=assign&amp;task_id=<?= $task['id'] ?>" title="<?= t('Change assignee') ?>" class="task-board-nobody"><?= t('Nobody assigned') ?></a>
<?php endif ?>
<a class="assignee-popover" href="?controller=board&amp;action=changeAssignee&amp;task_id=<?= $task['id'] ?>" title="<?= t('Change assignee') ?>">
<?php if (! empty($task['owner_id'])): ?>
<?= t('Assigned to %s', $task['assignee_name'] ?: $task['assignee_username']) ?></a>
<?php else: ?>
<?= t('Nobody assigned') ?>
<?php endif ?>
</a>
</span>
<?php if ($task['score']): ?>
@@ -44,7 +46,9 @@
<?php if ($task['category_id']): ?>
<div class="task-board-category-container">
<span class="task-board-category">
<?= Helper\in_list($task['category_id'], $categories) ?>
<a class="category-popover" href="?controller=board&amp;action=changeCategory&amp;task_id=<?= $task['id'] ?>" title="<?= t('Change category') ?>">
<?= Helper\in_list($task['category_id'], $categories) ?>
</a>
</span>
</div>
<?php endif ?>