summaryrefslogtreecommitdiff
path: root/app/Template/analytic/task_distribution.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Template/analytic/task_distribution.php')
-rw-r--r--app/Template/analytic/task_distribution.php34
1 files changed, 34 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..671d462f
--- /dev/null
+++ b/app/Template/analytic/task_distribution.php
@@ -0,0 +1,34 @@
+<?php if (! $is_ajax): ?>
+ <div class="page-header">
+ <h2><?= t('Task distribution') ?></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-task-distribution', array(
+ 'metrics' => $metrics,
+ )) ?>
+
+ <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 ?>