summaryrefslogtreecommitdiff
path: root/app/Template/analytic/avg_time_columns.php
blob: 1af69c8b9cba3b9e2c0c46ff72b1dc54964b60ae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?php if (! $is_ajax): ?>
    <div class="page-header">
        <h2><?= t('Average time spent into each column') ?></h2>
    </div>
<?php endif ?>

<?php if (empty($metrics)): ?>
    <p class="alert"><?= t('Not enough data to show the graph.') ?></p>
<?php else: ?>
    <?= $this->app->component('chart-project-avg-time-column', array(
        'metrics' => $metrics,
        'label' => t('Average time spent'),
    )) ?>

    <table class="table-striped">
        <tr>
            <th><?= t('Column') ?></th>
            <th><?= t('Average time spent') ?></th>
        </tr>
        <?php foreach ($metrics as $column): ?>
            <tr>
                <td><?= $this->text->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>
<?php endif ?>