diff options
| author | Frederic Guillot <fred@kanboard.net> | 2016-09-03 20:39:13 -0400 |
|---|---|---|
| committer | Frederic Guillot <fred@kanboard.net> | 2016-09-03 20:39:13 -0400 |
| commit | 8c07a0d03e64227c552f3b4530d3a1e1ba53402b (patch) | |
| tree | 1d60285831f41beae2067fe55bd820affda6ebe3 /app/Template/analytic/task_distribution.php | |
| parent | 59fd3c366cd34cf1be3f20d44b424107c88c030b (diff) | |
Convert task distribution chart to Vue.js component
Diffstat (limited to 'app/Template/analytic/task_distribution.php')
| -rw-r--r-- | app/Template/analytic/task_distribution.php | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/app/Template/analytic/task_distribution.php b/app/Template/analytic/task_distribution.php new file mode 100644 index 00000000..311e8c65 --- /dev/null +++ b/app/Template/analytic/task_distribution.php @@ -0,0 +1,30 @@ +<div class="page-header"> + <h2><?= t('Task distribution') ?></h2> +</div> + +<?php if (empty($metrics)): ?> + <p class="alert"><?= t('Not enough data to show the graph.') ?></p> +<?php else: ?> + <chart-project-task-distribution :metrics='<?= json_encode($metrics, JSON_HEX_APOS) ?>'></chart-project-task-distribution> + + <table class="table-striped"> + <tr> + <th><?= t('Column') ?></th> + <th><?= t('Number of tasks') ?></th> + <th><?= t('Percentage') ?></th> + </tr> + <?php foreach ($metrics as $metric): ?> + <tr> + <td> + <?= $this->text->e($metric['column_title']) ?> + </td> + <td> + <?= $metric['nb_tasks'] ?> + </td> + <td> + <?= n($metric['percentage']) ?>% + </td> + </tr> + <?php endforeach ?> + </table> +<?php endif ?> |
