diff options
Diffstat (limited to 'app/Template/analytic/avg_time_columns.php')
-rw-r--r-- | app/Template/analytic/avg_time_columns.php | 34 |
1 files changed, 18 insertions, 16 deletions
diff --git a/app/Template/analytic/avg_time_columns.php b/app/Template/analytic/avg_time_columns.php index 5f6c6b35..1af69c8b 100644 --- a/app/Template/analytic/avg_time_columns.php +++ b/app/Template/analytic/avg_time_columns.php @@ -1,29 +1,31 @@ -<div class="page-header"> - <h2><?= t('Average time spent into each column') ?></h2> -</div> +<?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: ?> - <section id="analytic-avg-time-column"> - - <div id="chart" data-metrics='<?= json_encode($metrics, JSON_HEX_APOS) ?>' data-label="<?= t('Average time spent') ?>"></div> + <?= $this->app->component('chart-project-avg-time-column', array( + 'metrics' => $metrics, + 'label' => t('Average time spent'), + )) ?> - <table class="table-stripped"> + <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> + <tr> + <td><?= $this->text->e($column['title']) ?></td> + <td><?= $this->dt->duration($column['average']) ?></td> + </tr> <?php endforeach ?> - </table> + </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> + <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 ?> |