Add task limit for each column
This commit is contained in:
@@ -12,9 +12,10 @@
|
||||
|
||||
<?php $i = 0; ?>
|
||||
|
||||
<?php foreach ($columns as $column_id => $column_title): ?>
|
||||
<?= Helper\form_label(t('Column %d', ++$i), 'title['.$column_id.']') ?>
|
||||
<?= Helper\form_text('title['.$column_id.']', $values, $errors, array('required')) ?>
|
||||
<?php foreach ($columns as $column): ?>
|
||||
<?= Helper\form_label(t('Column %d', ++$i), 'title['.$column['id'].']') ?>
|
||||
<?= Helper\form_text('title['.$column['id'].']', $values, $errors, array('required')) ?>
|
||||
<?= Helper\form_number('task_limit['.$column['id'].']', $values, $errors, array('placeholder="'.t('limit').'"')) ?>
|
||||
<a href="?controller=board&action=confirm&project_id=<?= $project['id'] ?>&column_id=<?= $column_id ?>"><?= t('Remove') ?></a>
|
||||
<?php endforeach ?>
|
||||
|
||||
|
||||
@@ -32,12 +32,26 @@
|
||||
<th width="<?= $column_with ?>%">
|
||||
<a href="?controller=task&action=create&project_id=<?= $column['project_id'] ?>&column_id=<?= $column['id'] ?>" title="<?= t('Add a new task') ?>">+</a>
|
||||
<?= Helper\escape($column['title']) ?>
|
||||
<?php if ($column['task_limit']): ?>
|
||||
<span title="<?= t('Task limit') ?>" class="task-limit">
|
||||
(
|
||||
<span id="task-number-column-<?= $column['id'] ?>"><?= count($column['tasks']) ?></span>
|
||||
/
|
||||
<?= Helper\escape($column['task_limit']) ?>
|
||||
)
|
||||
</span>
|
||||
<?php endif ?>
|
||||
</th>
|
||||
<?php endforeach ?>
|
||||
</tr>
|
||||
<tr>
|
||||
<?php foreach ($columns as $column): ?>
|
||||
<td id="column-<?= $column['id'] ?>" class="column" data-column-id="<?= $column['id'] ?>" dropzone="copy">
|
||||
<td
|
||||
id="column-<?= $column['id'] ?>"
|
||||
class="column <?= $column['task_limit'] && count($column['tasks']) > $column['task_limit'] ? 'task-limit-warning' : '' ?>"
|
||||
data-column-id="<?= $column['id'] ?>"
|
||||
data-task-limit="<?= $column['task_limit'] ?>"
|
||||
dropzone="copy">
|
||||
<?php foreach ($column['tasks'] as $task): ?>
|
||||
<div class="draggable-item" draggable="true">
|
||||
<div class="task task-<?= $task['color_id'] ?>" data-task-id="<?= $task['id'] ?>">
|
||||
|
||||
@@ -9,12 +9,15 @@
|
||||
<?php foreach ($columns as $column): ?>
|
||||
<th width="<?= $column_with ?>%">
|
||||
<?= Helper\escape($column['title']) ?>
|
||||
<?php if ($column['task_limit']): ?>
|
||||
<span title="<?= t('Task limit') ?>" class="task-limit">(<?= Helper\escape(count($column['tasks']).'/'.$column['task_limit']) ?>)</span>
|
||||
<?php endif ?>
|
||||
</th>
|
||||
<?php endforeach ?>
|
||||
</tr>
|
||||
<tr>
|
||||
<?php foreach ($columns as $column): ?>
|
||||
<td class="column">
|
||||
<td class="column <?= $column['task_limit'] && count($column['tasks']) > $column['task_limit'] ? 'task-limit-warning' : '' ?>">
|
||||
<?php foreach ($column['tasks'] as $task): ?>
|
||||
<div class="draggable-item">
|
||||
<div class="task task-<?= $task['color_id'] ?>">
|
||||
|
||||
Reference in New Issue
Block a user