summaryrefslogtreecommitdiff
path: root/app/Template
diff options
context:
space:
mode:
Diffstat (limited to 'app/Template')
-rw-r--r--app/Template/board/task_private.php4
-rw-r--r--app/Template/config/project.php1
-rw-r--r--app/Template/subtask/show.php28
3 files changed, 24 insertions, 9 deletions
diff --git a/app/Template/board/task_private.php b/app/Template/board/task_private.php
index 088f47bc..77f3b958 100644
--- a/app/Template/board/task_private.php
+++ b/app/Template/board/task_private.php
@@ -32,8 +32,8 @@
</span>
<div class="task-board-days">
- <span title="<?= t('Task age in days')?>" class="task-days-age"><?= $this->task->age($task['date_creation']) ?></span>
- <span title="<?= t('Days in this column')?>" class="task-days-incolumn"><?= $this->task->age($task['date_moved']) ?></span>
+ <span title="<?= t('Task age in days')?>" class="task-days-age"><?= $this->datetime->age($task['date_creation']) ?></span>
+ <span title="<?= t('Days in this column')?>" class="task-days-incolumn"><?= $this->datetime->age($task['date_moved']) ?></span>
</div>
<div class="task-board-title">
diff --git a/app/Template/config/project.php b/app/Template/config/project.php
index 90dd9c8e..1ab69e26 100644
--- a/app/Template/config/project.php
+++ b/app/Template/config/project.php
@@ -15,7 +15,6 @@
<p class="form-help"><?= t('Example: "Bug, Feature Request, Improvement"') ?></p>
<?= $this->form->checkbox('subtask_restriction', t('Allow only one subtask in progress at the same time for a user'), 1, $values['subtask_restriction'] == 1) ?>
- <?= $this->form->checkbox('subtask_time_tracking', t('Enable time tracking for subtasks'), 1, $values['subtask_time_tracking'] == 1) ?>
<div class="form-actions">
<input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
diff --git a/app/Template/subtask/show.php b/app/Template/subtask/show.php
index c9690f08..b91e830f 100644
--- a/app/Template/subtask/show.php
+++ b/app/Template/subtask/show.php
@@ -33,13 +33,29 @@
<?php endif ?>
</td>
<td>
- <?php if (! empty($subtask['time_spent'])): ?>
- <strong><?= $this->e($subtask['time_spent']).'h' ?></strong> <?= t('spent') ?>
- <?php endif ?>
+ <ul class="no-bullet">
+ <li>
+ <?php if (! empty($subtask['time_spent'])): ?>
+ <strong><?= $this->e($subtask['time_spent']).'h' ?></strong> <?= t('spent') ?>
+ <?php endif ?>
- <?php if (! empty($subtask['time_estimated'])): ?>
- <strong><?= $this->e($subtask['time_estimated']).'h' ?></strong> <?= t('estimated') ?>
- <?php endif ?>
+ <?php if (! empty($subtask['time_estimated'])): ?>
+ <strong><?= $this->e($subtask['time_estimated']).'h' ?></strong> <?= t('estimated') ?>
+ <?php endif ?>
+ </li>
+ <?php if (! isset($not_editable) && $subtask['user_id'] == $this->user->getId()): ?>
+ <li>
+ <?php if ($subtask['is_timer_started']): ?>
+ <i class="fa fa-pause"></i>
+ <?= $this->url->link(t('Stop timer'), 'timer', 'subtask', array('timer' => 'stop', 'project_id' => $task['project_id'], 'task_id' => $subtask['task_id'], 'subtask_id' => $subtask['id'])) ?>
+ (<?= $this->datetime->age($subtask['timer_start_date']) ?>)
+ <?php else: ?>
+ <i class="fa fa-play-circle-o"></i>
+ <?= $this->url->link(t('Start timer'), 'timer', 'subtask', array('timer' => 'start', 'project_id' => $task['project_id'], 'task_id' => $subtask['task_id'], 'subtask_id' => $subtask['id'])) ?>
+ <?php endif ?>
+ </li>
+ <?php endif ?>
+ </ul>
</td>
<?php if (! isset($not_editable)): ?>
<td>