Add new analytic page: Average time spent into each column
This commit is contained in:
29
app/Template/analytic/avg_time_columns.php
Normal file
29
app/Template/analytic/avg_time_columns.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<div class="page-header">
|
||||
<h2><?= t('Average time spent into each column') ?></h2>
|
||||
</div>
|
||||
|
||||
<?php if (empty($metrics)): ?>
|
||||
<p class="alert"><?= t('Not enough data to show the graph.') ?></p>
|
||||
<?php else: ?>
|
||||
<section id="analytic-avg-time-column">
|
||||
|
||||
<div id="chart" data-metrics='<?= json_encode($metrics) ?>' data-label="<?= t('Average time spent') ?>"></div>
|
||||
|
||||
<table class="table-stripped">
|
||||
<tr>
|
||||
<th><?= t('Column') ?></th>
|
||||
<th><?= t('Average time spent') ?></th>
|
||||
</tr>
|
||||
<?php foreach ($metrics as $column): ?>
|
||||
<tr>
|
||||
<td><?= $this->e($column['title']) ?></td>
|
||||
<td><?= $this->dt->duration($column['average']) ?></td>
|
||||
</tr>
|
||||
<?php endforeach ?>
|
||||
</table>
|
||||
|
||||
<p class="alert alert-info">
|
||||
<?= t('This chart show the average time spent into each column for the last %d tasks.', 1000) ?>
|
||||
</p>
|
||||
</section>
|
||||
<?php endif ?>
|
||||
@@ -13,5 +13,8 @@
|
||||
<li>
|
||||
<?= $this->url->link(t('Burndown chart'), 'analytic', 'burndown', array('project_id' => $project['id'])) ?>
|
||||
</li>
|
||||
<li>
|
||||
<?= $this->url->link(t('Average time into each column'), 'analytic', 'averageTimeByColumn', array('project_id' => $project['id'])) ?>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
Reference in New Issue
Block a user