Add task time tracking on the dashboard
This commit is contained in:
@@ -59,6 +59,8 @@ class TaskFinder extends Base
|
|||||||
'tasks.date_creation',
|
'tasks.date_creation',
|
||||||
'tasks.project_id',
|
'tasks.project_id',
|
||||||
'tasks.color_id',
|
'tasks.color_id',
|
||||||
|
'tasks.time_spent',
|
||||||
|
'tasks.time_estimated',
|
||||||
'projects.name AS project_name'
|
'projects.name AS project_name'
|
||||||
)
|
)
|
||||||
->join(Project::TABLE, 'id', 'project_id')
|
->join(Project::TABLE, 'id', 'project_id')
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
<th class="column-8"><?= $paginator->order('Id', 'tasks.id') ?></th>
|
<th class="column-8"><?= $paginator->order('Id', 'tasks.id') ?></th>
|
||||||
<th class="column-20"><?= $paginator->order(t('Project'), 'project_name') ?></th>
|
<th class="column-20"><?= $paginator->order(t('Project'), 'project_name') ?></th>
|
||||||
<th><?= $paginator->order(t('Task'), 'title') ?></th>
|
<th><?= $paginator->order(t('Task'), 'title') ?></th>
|
||||||
|
<th class="column-20"><?= t('Time tracking') ?></th>
|
||||||
<th class="column-20"><?= $paginator->order(t('Due date'), 'date_due') ?></th>
|
<th class="column-20"><?= $paginator->order(t('Due date'), 'date_due') ?></th>
|
||||||
</tr>
|
</tr>
|
||||||
<?php foreach ($paginator->getCollection() as $task): ?>
|
<?php foreach ($paginator->getCollection() as $task): ?>
|
||||||
@@ -20,6 +21,15 @@
|
|||||||
<td>
|
<td>
|
||||||
<?= $this->a($this->e($task['title']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
|
<?= $this->a($this->e($task['title']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
|
||||||
</td>
|
</td>
|
||||||
|
<td>
|
||||||
|
<?php if (! empty($task['time_spent'])): ?>
|
||||||
|
<strong><?= $this->e($task['time_spent']).'h' ?></strong> <?= t('spent') ?>
|
||||||
|
<?php endif ?>
|
||||||
|
|
||||||
|
<?php if (! empty($task['time_estimated'])): ?>
|
||||||
|
<strong><?= $this->e($task['time_estimated']).'h' ?></strong> <?= t('estimated') ?>
|
||||||
|
<?php endif ?>
|
||||||
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<?= dt('%B %e, %Y', $task['date_due']) ?>
|
<?= dt('%B %e, %Y', $task['date_due']) ?>
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
@@ -1828,12 +1828,12 @@ a.task-board-nobody {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.dashboard-left-column {
|
.dashboard-left-column {
|
||||||
width: 55%;
|
width: 58%;
|
||||||
float: left;
|
float: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dashboard-right-column {
|
.dashboard-right-column {
|
||||||
margin-left: 5%;
|
margin-left: 2%;
|
||||||
width: 40%;
|
width: 40%;
|
||||||
float: left;
|
float: left;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,12 +7,12 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.dashboard-left-column {
|
.dashboard-left-column {
|
||||||
width: 55%;
|
width: 58%;
|
||||||
float: left;
|
float: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dashboard-right-column {
|
.dashboard-right-column {
|
||||||
margin-left: 5%;
|
margin-left: 2%;
|
||||||
width: 40%;
|
width: 40%;
|
||||||
float: left;
|
float: left;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user