Analytics: add the first graph (task repartition)
This commit is contained in:
18
app/Template/analytic/layout.php
Normal file
18
app/Template/analytic/layout.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?= Helper\js('assets/js/d3.v3.4.8.min.js') ?>
|
||||
<?= Helper\js('assets/js/dimple.v2.1.0.min.js') ?>
|
||||
|
||||
<section id="main">
|
||||
<div class="page-header">
|
||||
<ul>
|
||||
<li><i class="fa fa-table fa-fw"></i><?= Helper\a(t('Back to the board'), 'board', 'show', array('project_id' => $project['id'])) ?></li>
|
||||
</ul>
|
||||
</div>
|
||||
<section class="sidebar-container" id="analytic-section">
|
||||
|
||||
<?= Helper\template('analytic/sidebar', array('project' => $project)) ?>
|
||||
|
||||
<div class="sidebar-content">
|
||||
<?= $analytic_content_for_layout ?>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
29
app/Template/analytic/repartition.php
Normal file
29
app/Template/analytic/repartition.php
Normal file
@@ -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>
|
||||
8
app/Template/analytic/sidebar.php
Normal file
8
app/Template/analytic/sidebar.php
Normal file
@@ -0,0 +1,8 @@
|
||||
<div class="sidebar">
|
||||
<h2><?= t('Reportings') ?></h2>
|
||||
<ul>
|
||||
<li>
|
||||
<?= Helper\a(t('Task distribution'), 'analytic', 'repartition', array('project_id' => $project['id'])) ?>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -1,8 +1,4 @@
|
||||
<section id="main">
|
||||
<div class="page-header">
|
||||
<h2><?= t('Page not found') ?></h2>
|
||||
</div>
|
||||
|
||||
<p class="alert alert-error">
|
||||
<?= t('Sorry, I didn\'t found this information in my database!') ?>
|
||||
</p>
|
||||
|
||||
@@ -24,6 +24,10 @@
|
||||
<i class="fa fa-dashboard fa-fw"></i>
|
||||
<?= Helper\a(t('Activity'), 'project', 'activity', array('project_id' => $current_project_id)) ?>
|
||||
</li>
|
||||
<li>
|
||||
<i class="fa fa-line-chart fa-fw"></i>
|
||||
<?= Helper\a(t('Analytics'), 'analytic', 'repartition', array('project_id' => $current_project_id)) ?>
|
||||
</li>
|
||||
<?php if (Helper\is_admin()): ?>
|
||||
<li><i class="fa fa-cog fa-fw"></i>
|
||||
<?= Helper\a(t('Configure'), 'project', 'show', array('project_id' => $current_project_id)) ?>
|
||||
|
||||
Reference in New Issue
Block a user