Add timer for subtasks and remove settings for subtask time tracking

This commit is contained in:
Frederic Guillot
2015-06-24 20:39:06 -04:00
parent 58c96b8c4e
commit 6efac784fc
41 changed files with 297 additions and 79 deletions

View File

@@ -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>