diff options
Diffstat (limited to 'app/Template')
-rw-r--r-- | app/Template/analytic/layout.php | 18 | ||||
-rw-r--r-- | app/Template/analytic/repartition.php | 29 | ||||
-rw-r--r-- | app/Template/analytic/sidebar.php | 8 | ||||
-rw-r--r-- | app/Template/app_notfound.php | 4 | ||||
-rw-r--r-- | app/Template/board_index.php | 4 |
5 files changed, 59 insertions, 4 deletions
diff --git a/app/Template/analytic/layout.php b/app/Template/analytic/layout.php new file mode 100644 index 00000000..2dd7a4f5 --- /dev/null +++ b/app/Template/analytic/layout.php @@ -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>
\ No newline at end of file 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> diff --git a/app/Template/analytic/sidebar.php b/app/Template/analytic/sidebar.php new file mode 100644 index 00000000..df6835ee --- /dev/null +++ b/app/Template/analytic/sidebar.php @@ -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>
\ No newline at end of file diff --git a/app/Template/app_notfound.php b/app/Template/app_notfound.php index 734d16a4..686f1fa0 100644 --- a/app/Template/app_notfound.php +++ b/app/Template/app_notfound.php @@ -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> diff --git a/app/Template/board_index.php b/app/Template/board_index.php index d15d455f..e478680f 100644 --- a/app/Template/board_index.php +++ b/app/Template/board_index.php @@ -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)) ?> |