summaryrefslogtreecommitdiff
path: root/app/Template
diff options
context:
space:
mode:
authorFrédéric Guillot <fred@kanboard.net>2014-11-16 20:51:59 -0500
committerFrédéric Guillot <fred@kanboard.net>2014-11-16 20:51:59 -0500
commit8bf50d6a7ff460820efe098413626307216f8c34 (patch)
tree6c2f7ea359a57fa2c3adf9ae6c5bbe3d1882d7fa /app/Template
parent4494566fc7a536232cf564b940dfae6b46c20bcd (diff)
Add cumulative flow diagram
Diffstat (limited to 'app/Template')
-rw-r--r--app/Template/analytic/cfd.php26
-rw-r--r--app/Template/analytic/sidebar.php3
2 files changed, 29 insertions, 0 deletions
diff --git a/app/Template/analytic/cfd.php b/app/Template/analytic/cfd.php
new file mode 100644
index 00000000..46cee47e
--- /dev/null
+++ b/app/Template/analytic/cfd.php
@@ -0,0 +1,26 @@
+<div class="page-header">
+ <h2><?= t('Cumulative flow diagram') ?></h2>
+</div>
+
+<?php if (! $display_graph): ?>
+ <p class="alert"><?= t('Not enough data to show the graph.') ?></p>
+<?php else: ?>
+ <section id="analytic-cfd">
+ <div id="chart" data-url="<?= Helper\u('analytic', 'cfd', array('project_id' => $project['id'], 'from' => $values['from'], 'to' => $values['to'])) ?>"></div>
+ </section>
+<?php endif ?>
+
+<hr/>
+
+<form method="post" class="form-inline" action="<?= Helper\u('analytic', 'cfd', array('project_id' => $project['id'])) ?>" autocomplete="off">
+
+ <?= Helper\form_csrf() ?>
+
+ <?= Helper\form_label(t('Start Date'), 'from') ?>
+ <?= Helper\form_text('from', $values, array(), array('required', 'placeholder="'.Helper\in_list($date_format, $date_formats).'"'), 'form-date') ?>
+
+ <?= Helper\form_label(t('End Date'), 'to') ?>
+ <?= Helper\form_text('to', $values, array(), array('required', 'placeholder="'.Helper\in_list($date_format, $date_formats).'"'), 'form-date') ?>
+
+ <input type="submit" value="<?= t('Execute') ?>" class="btn btn-blue"/>
+</form>
diff --git a/app/Template/analytic/sidebar.php b/app/Template/analytic/sidebar.php
index dded245a..9b2fd9f6 100644
--- a/app/Template/analytic/sidebar.php
+++ b/app/Template/analytic/sidebar.php
@@ -7,5 +7,8 @@
<li>
<?= Helper\a(t('User repartition'), 'analytic', 'users', array('project_id' => $project['id'])) ?>
</li>
+ <li>
+ <?= Helper\a(t('Cumulative flow diagram'), 'analytic', 'cfd', array('project_id' => $project['id'])) ?>
+ </li>
</ul>
</div> \ No newline at end of file