summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/board_edit.php7
-rw-r--r--templates/board_index.php16
-rw-r--r--templates/board_public.php5
3 files changed, 23 insertions, 5 deletions
diff --git a/templates/board_edit.php b/templates/board_edit.php
index 605773ae..800e1c1d 100644
--- a/templates/board_edit.php
+++ b/templates/board_edit.php
@@ -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&amp;action=confirm&amp;project_id=<?= $project['id'] ?>&amp;column_id=<?= $column_id ?>"><?= t('Remove') ?></a>
<?php endforeach ?>
diff --git a/templates/board_index.php b/templates/board_index.php
index 7a3f8ec1..aa581680 100644
--- a/templates/board_index.php
+++ b/templates/board_index.php
@@ -32,12 +32,26 @@
<th width="<?= $column_with ?>%">
<a href="?controller=task&amp;action=create&amp;project_id=<?= $column['project_id'] ?>&amp;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'] ?>">
diff --git a/templates/board_public.php b/templates/board_public.php
index 16c69ce2..339c8035 100644
--- a/templates/board_public.php
+++ b/templates/board_public.php
@@ -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'] ?>">