summaryrefslogtreecommitdiff
path: root/app/Templates/board_show.php
diff options
context:
space:
mode:
authorFrédéric Guillot <fred@kanboard.net>2014-05-22 12:28:28 -0400
committerFrédéric Guillot <fred@kanboard.net>2014-05-22 12:28:28 -0400
commit2230dd4e6b148346c0ec596b9e3e12996a762ed8 (patch)
treeef99ccde4f8b18592a3fb06a6ec45162c501fe38 /app/Templates/board_show.php
parenta750b8ab2a0cb715da6fd9025a7ec8375db68a4d (diff)
Code refactoring (add autoloader and change files organization)
Diffstat (limited to 'app/Templates/board_show.php')
-rw-r--r--app/Templates/board_show.php88
1 files changed, 88 insertions, 0 deletions
diff --git a/app/Templates/board_show.php b/app/Templates/board_show.php
new file mode 100644
index 00000000..719e3bdd
--- /dev/null
+++ b/app/Templates/board_show.php
@@ -0,0 +1,88 @@
+<table id="board" data-project-id="<?= $current_project_id ?>" data-time="<?= time() ?>" data-check-interval="<?= BOARD_CHECK_INTERVAL ?>">
+<tr>
+ <?php $column_with = round(100 / count($board), 2); ?>
+ <?php foreach ($board as $column): ?>
+ <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 ($board as $column): ?>
+ <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'] ?>"
+ >
+ <?php foreach ($column['tasks'] as $task): ?>
+ <div class="task draggable-item task-<?= $task['color_id'] ?>"
+ data-task-id="<?= $task['id'] ?>"
+ data-owner-id="<?= $task['owner_id'] ?>"
+ data-category-id="<?= $task['category_id'] ?>"
+ data-due-date="<?= $task['date_due'] ?>"
+ title="<?= t('View this task') ?>">
+
+ <a href="?controller=task&amp;action=edit&amp;task_id=<?= $task['id'] ?>" title="<?= t('Edit this task') ?>">#<?= $task['id'] ?></a> -
+
+ <span class="task-user">
+ <?php if (! empty($task['owner_id'])): ?>
+ <a href="?controller=board&amp;action=assign&amp;task_id=<?= $task['id'] ?>" title="<?= t('Change assignee') ?>"><?= t('Assigned to %s', $task['username']) ?></a>
+ <?php else: ?>
+ <a href="?controller=board&amp;action=assign&amp;task_id=<?= $task['id'] ?>" title="<?= t('Change assignee') ?>" class="task-nobody"><?= t('Nobody assigned') ?></a>
+ <?php endif ?>
+ </span>
+
+ <?php if ($task['score']): ?>
+ <span class="task-score"><?= Helper\escape($task['score']) ?></span>
+ <?php endif ?>
+
+ <div class="task-title">
+ <a href="?controller=task&amp;action=show&amp;task_id=<?= $task['id'] ?>" title="<?= t('View this task') ?>"><?= Helper\escape($task['title']) ?></a>
+ </div>
+
+ <?php if ($task['category_id']): ?>
+ <div class="task-category-container">
+ <span class="task-category">
+ <?= Helper\in_list($task['category_id'], $categories) ?>
+ </span>
+ </div>
+ <?php endif ?>
+
+ <?php if (! empty($task['date_due']) || ! empty($task['nb_comments']) || ! empty($task['description'])): ?>
+ <div class="task-footer">
+
+ <?php if (! empty($task['date_due'])): ?>
+ <div class="task-date">
+ <?= dt('%B %e, %G', $task['date_due']) ?>
+ </div>
+ <?php endif ?>
+
+ <div class="task-icons">
+ <?php if (! empty($task['nb_comments'])): ?>
+ <?= $task['nb_comments'] ?> <i class="fa fa-comment-o" title="<?= p($task['nb_comments'], t('%d comment', $task['nb_comments']), t('%d comments', $task['nb_comments'])) ?>"></i>
+ <?php endif ?>
+
+ <?php if (! empty($task['description'])): ?>
+ <i class="fa fa-file-text-o" title="<?= t('Description') ?>"></i>
+ <?php endif ?>
+ </div>
+ </div>
+ <?php endif ?>
+
+ </div>
+ <?php endforeach ?>
+ </td>
+ <?php endforeach ?>
+</tr>
+</table>