summaryrefslogtreecommitdiff
path: root/app/Template/analytic/users.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Template/analytic/users.php')
-rw-r--r--app/Template/analytic/users.php34
1 files changed, 34 insertions, 0 deletions
diff --git a/app/Template/analytic/users.php b/app/Template/analytic/users.php
new file mode 100644
index 00000000..982ef206
--- /dev/null
+++ b/app/Template/analytic/users.php
@@ -0,0 +1,34 @@
+<div class="page-header">
+ <h2><?= t('User repartition') ?></h2>
+</div>
+
+<?php if (empty($metrics)): ?>
+ <p class="alert"><?= t('Not enough data to show the graph.') ?></p>
+<?php else: ?>
+ <section id="analytic-user-repartition">
+
+ <div id="chart" data-url="<?= $this->url->href('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>
+ <?= $this->e($metric['user']) ?>
+ </td>
+ <td>
+ <?= $metric['nb_tasks'] ?>
+ </td>
+ <td>
+ <?= n($metric['percentage']) ?>%
+ </td>
+ </tr>
+ <?php endforeach ?>
+ </table>
+
+ </section>
+<?php endif ?>