summaryrefslogtreecommitdiff
path: root/app/Template/analytic/users.php
diff options
context:
space:
mode:
authorFrédéric Guillot <fred@kanboard.net>2014-11-13 20:37:37 -0500
committerFrédéric Guillot <fred@kanboard.net>2014-11-13 20:37:37 -0500
commit1487cb27634161ef558c367150213bc7077e4198 (patch)
tree5a5684152412abc3bc336cdb63dfe05b7bbb0c4a /app/Template/analytic/users.php
parente4efc73a90b0ef62b5d828db53a365184be40137 (diff)
Add graph for user repartition
Diffstat (limited to 'app/Template/analytic/users.php')
-rw-r--r--app/Template/analytic/users.php29
1 files changed, 29 insertions, 0 deletions
diff --git a/app/Template/analytic/users.php b/app/Template/analytic/users.php
new file mode 100644
index 00000000..89f00686
--- /dev/null
+++ b/app/Template/analytic/users.php
@@ -0,0 +1,29 @@
+<div class="page-header">
+ <h2><?= t('User repartition') ?></h2>
+</div>
+<section id="analytic-user-repartition">
+
+<div id="chart" data-url="<?= Helper\u('analytic', 'users', array('project_id' => $project['id'])) ?>"></div>
+
+<table>
+ <tr>
+ <th><?= t('User') ?></th>
+ <th><?= t('Number of tasks') ?></th>
+ <th><?= t('Percentage') ?></th>
+ </tr>
+ <?php foreach ($metrics as $metric): ?>
+ <tr>
+ <td>
+ <?= Helper\escape($metric['user']) ?>
+ </td>
+ <td>
+ <?= $metric['nb_tasks'] ?>
+ </td>
+ <td>
+ <?= n($metric['percentage']) ?>%
+ </td>
+ </tr>
+ <?php endforeach ?>
+</table>
+
+</section>