summaryrefslogtreecommitdiff
path: root/app/Template/analytic
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2015-05-24 16:02:25 -0400
committerFrederic Guillot <fred@kanboard.net>2015-05-24 16:02:25 -0400
commiteeac2329baab1fdae7cbf6c707ed2ffd8beb4c1b (patch)
tree511c2fe47f8fbb1ea90e59e7a7a7f5e3530aa9ed /app/Template/analytic
parent65e9e5d1bed9f88ecfd43eb2c1e780a7c22c151f (diff)
Helpers refactoring
Diffstat (limited to 'app/Template/analytic')
-rw-r--r--app/Template/analytic/burndown.php14
-rw-r--r--app/Template/analytic/cfd.php14
-rw-r--r--app/Template/analytic/layout.php6
-rw-r--r--app/Template/analytic/sidebar.php8
-rw-r--r--app/Template/analytic/tasks.php2
-rw-r--r--app/Template/analytic/users.php2
6 files changed, 23 insertions, 23 deletions
diff --git a/app/Template/analytic/burndown.php b/app/Template/analytic/burndown.php
index 5ebe1032..839573be 100644
--- a/app/Template/analytic/burndown.php
+++ b/app/Template/analytic/burndown.php
@@ -6,24 +6,24 @@
<p class="alert"><?= t('Not enough data to show the graph.') ?></p>
<?php else: ?>
<section id="analytic-burndown">
- <div id="chart" data-url="<?= $this->u('analytic', 'burndown', array('project_id' => $project['id'], 'from' => $values['from'], 'to' => $values['to'])) ?>"></div>
+ <div id="chart" data-url="<?= $this->url->href('analytic', 'burndown', array('project_id' => $project['id'], 'from' => $values['from'], 'to' => $values['to'])) ?>"></div>
</section>
<?php endif ?>
<hr/>
-<form method="post" class="form-inline" action="<?= $this->u('analytic', 'burndown', array('project_id' => $project['id'])) ?>" autocomplete="off">
+<form method="post" class="form-inline" action="<?= $this->url->href('analytic', 'burndown', array('project_id' => $project['id'])) ?>" autocomplete="off">
- <?= $this->formCsrf() ?>
+ <?= $this->form->csrf() ?>
<div class="form-inline-group">
- <?= $this->formLabel(t('Start Date'), 'from') ?>
- <?= $this->formText('from', $values, array(), array('required', 'placeholder="'.$this->inList($date_format, $date_formats).'"'), 'form-date') ?>
+ <?= $this->form->label(t('Start Date'), 'from') ?>
+ <?= $this->form->text('from', $values, array(), array('required', 'placeholder="'.$this->text->in($date_format, $date_formats).'"'), 'form-date') ?>
</div>
<div class="form-inline-group">
- <?= $this->formLabel(t('End Date'), 'to') ?>
- <?= $this->formText('to', $values, array(), array('required', 'placeholder="'.$this->inList($date_format, $date_formats).'"'), 'form-date') ?>
+ <?= $this->form->label(t('End Date'), 'to') ?>
+ <?= $this->form->text('to', $values, array(), array('required', 'placeholder="'.$this->text->in($date_format, $date_formats).'"'), 'form-date') ?>
</div>
<div class="form-inline-group">
diff --git a/app/Template/analytic/cfd.php b/app/Template/analytic/cfd.php
index 58115e77..26696b31 100644
--- a/app/Template/analytic/cfd.php
+++ b/app/Template/analytic/cfd.php
@@ -6,24 +6,24 @@
<p class="alert"><?= t('Not enough data to show the graph.') ?></p>
<?php else: ?>
<section id="analytic-cfd">
- <div id="chart" data-url="<?= $this->u('analytic', 'cfd', array('project_id' => $project['id'], 'from' => $values['from'], 'to' => $values['to'])) ?>"></div>
+ <div id="chart" data-url="<?= $this->url->href('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="<?= $this->u('analytic', 'cfd', array('project_id' => $project['id'])) ?>" autocomplete="off">
+<form method="post" class="form-inline" action="<?= $this->url->href('analytic', 'cfd', array('project_id' => $project['id'])) ?>" autocomplete="off">
- <?= $this->formCsrf() ?>
+ <?= $this->form->csrf() ?>
<div class="form-inline-group">
- <?= $this->formLabel(t('Start Date'), 'from') ?>
- <?= $this->formText('from', $values, array(), array('required', 'placeholder="'.$this->inList($date_format, $date_formats).'"'), 'form-date') ?>
+ <?= $this->form->label(t('Start Date'), 'from') ?>
+ <?= $this->form->text('from', $values, array(), array('required', 'placeholder="'.$this->text->in($date_format, $date_formats).'"'), 'form-date') ?>
</div>
<div class="form-inline-group">
- <?= $this->formLabel(t('End Date'), 'to') ?>
- <?= $this->formText('to', $values, array(), array('required', 'placeholder="'.$this->inList($date_format, $date_formats).'"'), 'form-date') ?>
+ <?= $this->form->label(t('End Date'), 'to') ?>
+ <?= $this->form->text('to', $values, array(), array('required', 'placeholder="'.$this->text->in($date_format, $date_formats).'"'), 'form-date') ?>
</div>
<div class="form-inline-group">
diff --git a/app/Template/analytic/layout.php b/app/Template/analytic/layout.php
index c6e3a962..c3a36bdf 100644
--- a/app/Template/analytic/layout.php
+++ b/app/Template/analytic/layout.php
@@ -1,10 +1,10 @@
-<?= $this->js('assets/js/vendor/d3.v3.4.8.min.js') ?>
-<?= $this->js('assets/js/vendor/dimple.v2.1.2.min.js') ?>
+<?= $this->asset->js('assets/js/vendor/d3.v3.4.8.min.js') ?>
+<?= $this->asset->js('assets/js/vendor/dimple.v2.1.2.min.js') ?>
<section id="main">
<div class="page-header">
<ul>
- <li><i class="fa fa-table fa-fw"></i><?= $this->a(t('Back to the board'), 'board', 'show', array('project_id' => $project['id'])) ?></li>
+ <li><i class="fa fa-table fa-fw"></i><?= $this->url->link(t('Back to the board'), 'board', 'show', array('project_id' => $project['id'])) ?></li>
</ul>
</div>
<section class="sidebar-container" id="analytic-section">
diff --git a/app/Template/analytic/sidebar.php b/app/Template/analytic/sidebar.php
index f3515281..2d1a7c96 100644
--- a/app/Template/analytic/sidebar.php
+++ b/app/Template/analytic/sidebar.php
@@ -2,16 +2,16 @@
<h2><?= t('Reportings') ?></h2>
<ul>
<li>
- <?= $this->a(t('Task distribution'), 'analytic', 'tasks', array('project_id' => $project['id'])) ?>
+ <?= $this->url->link(t('Task distribution'), 'analytic', 'tasks', array('project_id' => $project['id'])) ?>
</li>
<li>
- <?= $this->a(t('User repartition'), 'analytic', 'users', array('project_id' => $project['id'])) ?>
+ <?= $this->url->link(t('User repartition'), 'analytic', 'users', array('project_id' => $project['id'])) ?>
</li>
<li>
- <?= $this->a(t('Cumulative flow diagram'), 'analytic', 'cfd', array('project_id' => $project['id'])) ?>
+ <?= $this->url->link(t('Cumulative flow diagram'), 'analytic', 'cfd', array('project_id' => $project['id'])) ?>
</li>
<li>
- <?= $this->a(t('Burndown chart'), 'analytic', 'burndown', array('project_id' => $project['id'])) ?>
+ <?= $this->url->link(t('Burndown chart'), 'analytic', 'burndown', array('project_id' => $project['id'])) ?>
</li>
</ul>
</div> \ No newline at end of file
diff --git a/app/Template/analytic/tasks.php b/app/Template/analytic/tasks.php
index b1a08a23..faa4bacc 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->u('analytic', 'tasks', array('project_id' => $project['id'])) ?>"></div>
+ <div id="chart" data-url="<?= $this->url->href('analytic', 'tasks', array('project_id' => $project['id'])) ?>"></div>
<table>
<tr>
diff --git a/app/Template/analytic/users.php b/app/Template/analytic/users.php
index 97328c02..982ef206 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->u('analytic', 'users', array('project_id' => $project['id'])) ?>"></div>
+ <div id="chart" data-url="<?= $this->url->href('analytic', 'users', array('project_id' => $project['id'])) ?>"></div>
<table>
<tr>