diff options
Diffstat (limited to 'app/Template')
-rw-r--r-- | app/Template/analytic/burndown.php | 2 | ||||
-rw-r--r-- | app/Template/analytic/cfd.php | 4 | ||||
-rw-r--r-- | app/Template/analytic/layout.php | 4 | ||||
-rw-r--r-- | app/Template/analytic/tasks.php | 2 | ||||
-rw-r--r-- | app/Template/analytic/users.php | 2 | ||||
-rw-r--r-- | app/Template/budget/index.php | 7 |
6 files changed, 11 insertions, 10 deletions
diff --git a/app/Template/analytic/burndown.php b/app/Template/analytic/burndown.php index 839573be..48a4c1c1 100644 --- a/app/Template/analytic/burndown.php +++ b/app/Template/analytic/burndown.php @@ -6,7 +6,7 @@ <p class="alert"><?= t('Not enough data to show the graph.') ?></p> <?php else: ?> <section id="analytic-burndown"> - <div id="chart" data-url="<?= $this->url->href('analytic', 'burndown', array('project_id' => $project['id'], 'from' => $values['from'], 'to' => $values['to'])) ?>"></div> + <div id="chart" data-metrics='<?= json_encode($metrics) ?>' data-date-format="<?= e('%%Y-%%m-%%d') ?>" data-label-total="<?= t('Total for all columns') ?>"></div> </section> <?php endif ?> diff --git a/app/Template/analytic/cfd.php b/app/Template/analytic/cfd.php index 26696b31..ab706d56 100644 --- a/app/Template/analytic/cfd.php +++ b/app/Template/analytic/cfd.php @@ -3,10 +3,10 @@ </div> <?php if (! $display_graph): ?> - <p class="alert"><?= t('Not enough data to show the graph.') ?></p> + <p class="alert"><?= t('You need at least 2 days of data to show the chart.') ?></p> <?php else: ?> <section id="analytic-cfd"> - <div id="chart" data-url="<?= $this->url->href('analytic', 'cfd', array('project_id' => $project['id'], 'from' => $values['from'], 'to' => $values['to'])) ?>"></div> + <div id="chart" data-metrics='<?= json_encode($metrics) ?>' data-date-format="<?= e('%%Y-%%m-%%d') ?>"></div> </section> <?php endif ?> diff --git a/app/Template/analytic/layout.php b/app/Template/analytic/layout.php index de8d0de9..72aab4d8 100644 --- a/app/Template/analytic/layout.php +++ b/app/Template/analytic/layout.php @@ -1,5 +1,5 @@ -<?= $this->asset->js('assets/js/vendor/d3.v3.4.8.min.js') ?> -<?= $this->asset->js('assets/js/vendor/dimple.v2.1.2.min.js') ?> +<?= $this->asset->js('assets/js/vendor/d3.v3.min.js') ?> +<?= $this->asset->js('assets/js/vendor/c3.min.js') ?> <section id="main"> <div class="page-header"> diff --git a/app/Template/analytic/tasks.php b/app/Template/analytic/tasks.php index faa4bacc..36f36a23 100644 --- a/app/Template/analytic/tasks.php +++ b/app/Template/analytic/tasks.php @@ -7,7 +7,7 @@ <?php else: ?> <section id="analytic-task-repartition"> - <div id="chart" data-url="<?= $this->url->href('analytic', 'tasks', array('project_id' => $project['id'])) ?>"></div> + <div id="chart" data-metrics='<?= json_encode($metrics) ?>'></div> <table> <tr> diff --git a/app/Template/analytic/users.php b/app/Template/analytic/users.php index 982ef206..263ea0ef 100644 --- a/app/Template/analytic/users.php +++ b/app/Template/analytic/users.php @@ -7,7 +7,7 @@ <?php else: ?> <section id="analytic-user-repartition"> - <div id="chart" data-url="<?= $this->url->href('analytic', 'users', array('project_id' => $project['id'])) ?>"></div> + <div id="chart" data-metrics='<?= json_encode($metrics) ?>'></div> <table> <tr> diff --git a/app/Template/budget/index.php b/app/Template/budget/index.php index 4fe8ac69..3b594017 100644 --- a/app/Template/budget/index.php +++ b/app/Template/budget/index.php @@ -1,5 +1,5 @@ -<?= $this->asset->js('assets/js/vendor/d3.v3.4.8.min.js') ?> -<?= $this->asset->js('assets/js/vendor/dimple.v2.1.2.min.js') ?> +<?= $this->asset->js('assets/js/vendor/d3.v3.min.js') ?> +<?= $this->asset->js('assets/js/vendor/c3.min.js') ?> <div class="page-header"> <h2><?= t('Budget overview') ?></h2> @@ -8,7 +8,8 @@ <?php if (! empty($daily_budget)): ?> <div id="budget-chart"> <div id="chart" - data-serie='<?= json_encode($daily_budget) ?>' + data-date-format="<?= e('%%Y-%%m-%%d') ?>" + data-metrics='<?= json_encode($daily_budget) ?>' data-labels='<?= json_encode(array('in' => t('Budget line'), 'out' => t('Expenses'), 'left' => t('Remaining'), 'value' => t('Amount'), 'date' => t('Date'), 'type' => t('Type'))) ?>'></div> </div> <hr/> |