summaryrefslogtreecommitdiff
path: root/app/Template/task/transitions.php
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2015-03-26 22:40:46 -0400
committerFrederic Guillot <fred@kanboard.net>2015-03-26 22:40:46 -0400
commit87d2c6d99e6eb26b526f5da22b3496e3d02d11ed (patch)
treeedb8ef750b85fda13ebb2c4f7089eef94328d0f1 /app/Template/task/transitions.php
parent93fa9b5cba4bf343d3c5dd97420cea81beaf6e88 (diff)
Add task transitions history
Diffstat (limited to 'app/Template/task/transitions.php')
-rw-r--r--app/Template/task/transitions.php26
1 files changed, 26 insertions, 0 deletions
diff --git a/app/Template/task/transitions.php b/app/Template/task/transitions.php
new file mode 100644
index 00000000..2f45eb39
--- /dev/null
+++ b/app/Template/task/transitions.php
@@ -0,0 +1,26 @@
+<div class="page-header">
+ <h2><?= t('Transitions') ?></h2>
+</div>
+
+<?php if (empty($transitions)): ?>
+ <p class="alert"><?= t('There is nothing to show.') ?></p>
+<?php else: ?>
+ <table class="table-stripped">
+ <tr>
+ <th><?= t('Date') ?></th>
+ <th><?= t('Source column') ?></th>
+ <th><?= t('Destination column') ?></th>
+ <th><?= t('Executer') ?></th>
+ <th><?= t('Time spent in the column') ?></th>
+ </tr>
+ <?php foreach ($transitions as $transition): ?>
+ <tr>
+ <td><?= dt('%B %e, %Y at %k:%M %p', $transition['date']) ?></td>
+ <td><?= $this->e($transition['src_column']) ?></td>
+ <td><?= $this->e($transition['dst_column']) ?></td>
+ <td><?= $this->a($this->e($transition['name'] ?: $transition['username']), 'user', 'show', array('user_id' => $transition['user_id'])) ?></td>
+ <td><?= n(round($transition['time_spent'] / 3600, 2)).' '.t('hours') ?></td>
+ </tr>
+ <?php endforeach ?>
+ </table>
+<?php endif ?> \ No newline at end of file