summaryrefslogtreecommitdiff
path: root/app/Template/user
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2015-02-04 22:19:32 -0500
committerFrederic Guillot <fred@kanboard.net>2015-02-04 22:19:32 -0500
commitb24b1e7e4e5ee0551ee56aa0f21c4425b479db2e (patch)
tree5fffaeb461707dada9f2909101d51c9da3c77a50 /app/Template/user
parent2d070627d751bf5728ec98a5efaf163532594cd9 (diff)
Add subtasks restrictions and time tracking
Diffstat (limited to 'app/Template/user')
-rw-r--r--app/Template/user/sidebar.php3
-rw-r--r--app/Template/user/timesheet.php27
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