summaryrefslogtreecommitdiff
path: root/app/Template/analytic/repartition.php
diff options
context:
space:
mode:
authorFrédéric Guillot <fred@kanboard.net>2014-11-09 17:59:02 -0500
committerFrédéric Guillot <fred@kanboard.net>2014-11-09 17:59:02 -0500
commite89ba5e9e692f33427fedb05a095255f27480a6b (patch)
tree59cbca6ac75a8eff45be14f6ae4ab487e0a427b1 /app/Template/analytic/repartition.php
parent3df63e051fac84cec98c912668722f87d6e8183e (diff)
Analytics: add the first graph (task repartition)
Diffstat (limited to 'app/Template/analytic/repartition.php')
-rw-r--r--app/Template/analytic/repartition.php29
1 files changed, 29 insertions, 0 deletions
diff --git a/app/Template/analytic/repartition.php b/app/Template/analytic/repartition.php
new file mode 100644
index 00000000..f20b6a0c
--- /dev/null
+++ b/app/Template/analytic/repartition.php
@@ -0,0 +1,29 @@
+<div class="page-header">
+ <h2><?= t('Task distribution') ?></h2>
+</div>
+<section id="analytic-repartition">
+
+<div id="chart" data-url="<?= Helper\u('analytic', 'repartition', array('project_id' => $project['id'])) ?>"></div>
+
+<table>
+ <tr>
+ <th><?= t('Column') ?></th>
+ <th><?= t('Number of tasks') ?></th>
+ <th><?= t('Percentage') ?></th>
+ </tr>
+ <?php foreach ($metrics as $metric): ?>
+ <tr>
+ <td>
+ <?= Helper\escape($metric['column_title']) ?>
+ </td>
+ <td>
+ <?= $metric['nb_tasks'] ?>
+ </td>
+ <td>
+ <?= n($metric['percentage']) ?>%
+ </td>
+ </tr>
+ <?php endforeach ?>
+</table>
+
+</section>