diff options
Diffstat (limited to 'app/Template/user')
-rw-r--r-- | app/Template/user/sidebar.php | 3 | ||||
-rw-r--r-- | app/Template/user/timesheet.php | 27 |
2 files changed, 30 insertions, 0 deletions
diff --git a/app/Template/user/sidebar.php b/app/Template/user/sidebar.php index 4376aa18..05be2e84 100644 --- a/app/Template/user/sidebar.php +++ b/app/Template/user/sidebar.php @@ -28,6 +28,9 @@ <li> <?= $this->a(t('Persistent connections'), 'user', 'sessions', array('user_id' => $user['id'])) ?> </li> + <li> + <?= $this->a(t('Time tracking'), 'user', 'timesheet', array('user_id' => $user['id'])) ?> + </li> <?php endif ?> <?php if ($this->userSession->isAdmin()): ?> diff --git a/app/Template/user/timesheet.php b/app/Template/user/timesheet.php new file mode 100644 index 00000000..fb7e51f0 --- /dev/null +++ b/app/Template/user/timesheet.php @@ -0,0 +1,27 @@ +<div class="page-header"> + <h2><?= t('Time Tracking') ?></h2> +</div> + +<h3><?= t('Subtask timesheet') ?></h3> +<?php if ($subtask_paginator->isEmpty()): ?> + <p class="alert"><?= t('There is nothing to show.') ?></p> +<?php else: ?> + <table class="table-fixed"> + <tr> + <th class="column-20"><?= $subtask_paginator->order('Task', 'task_title') ?></th> + <th class="column-20"><?= $subtask_paginator->order('Subtask', 'subtask_title') ?></th> + <th><?= $subtask_paginator->order(t('Start'), 'start') ?></th> + <th><?= $subtask_paginator->order(t('End'), 'end') ?></th> + </tr> + <?php foreach ($subtask_paginator->getCollection() as $record): ?> + <tr> + <td><?= $this->a($this->e($record['task_title']), 'task', 'show', array('project_id' => $record['project_id'], 'task_id' => $record['task_id'])) ?></td> + <td><?= $this->a($this->e($record['subtask_title']), 'task', 'show', array('project_id' => $record['project_id'], 'task_id' => $record['task_id'])) ?></td> + <td><?= dt('%B %e, %Y at %k:%M %p', $record['start']) ?></td> + <td><?= dt('%B %e, %Y at %k:%M %p', $record['end']) ?></td> + </tr> + <?php endforeach ?> + </table> + + <?= $subtask_paginator ?> +<?php endif ?>
\ No newline at end of file |