diff options
Diffstat (limited to 'app/Template')
-rw-r--r-- | app/Template/task/sidebar.php | 3 | ||||
-rw-r--r-- | app/Template/task/transitions.php | 26 |
2 files changed, 29 insertions, 0 deletions
diff --git a/app/Template/task/sidebar.php b/app/Template/task/sidebar.php index f41be14d..cb3b3c69 100644 --- a/app/Template/task/sidebar.php +++ b/app/Template/task/sidebar.php @@ -4,6 +4,9 @@ <li> <?= $this->a(t('Summary'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> </li> + <li> + <?= $this->a(t('Transitions'), 'task', 'transitions', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> + </li> <?php if ($task['time_estimated'] > 0 || $task['time_spent'] > 0): ?> <li> <?= $this->a(t('Time tracking'), 'task', 'timesheet', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> 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 |