1<?php if (! $is_ajax): ?>
2    <div class="page-header">
3        <h2><?= t('Estimated vs actual time per column') ?></h2>
4    </div>
5<?php endif ?>
6
7<?php if (empty($metrics)): ?>
8    <p class="alert"><?= t('Not enough data to show the graph.') ?></p>
9<?php else: ?>
10    <?= $this->app->component('chart-project-estimated-actual-column', array(
11        'metrics' => $metrics,
12        'labelSpent' => t('Hours Spent'),
13        'labelEstimated' => t('Hours Estimated'),
14    )) ?>
15
16    <table class="table-striped">
17        <tr>
18            <th><?= t('Column') ?></th>
19            <th><?= t('Hours Spent') ?></th>
20            <th><?= t('Hours Estimated') ?></th>
21        </tr>
22        <?php foreach ($metrics as $column): ?>
23            <tr>
24                <td><?= $this->text->e($column['title']) ?></td>
25                <td><?= $this->dt->durationHours($column['hours_spent']) ?></td>
26                <td><?= $this->dt->durationHours($column['hours_estimated']) ?></td>
27            </tr>
28        <?php endforeach ?>
29    </table>
30<?php endif ?>