diff options
author | Frédéric Guillot <fred@kanboard.net> | 2014-12-28 11:28:50 -0500 |
---|---|---|
committer | Frédéric Guillot <fred@kanboard.net> | 2014-12-28 11:28:50 -0500 |
commit | 34d7450d3c13342715e90ec21bceaa13e1baa876 (patch) | |
tree | a2d8f2f22ad3fe9b56f01fe2db0357f9b963e660 /app/Template/analytic | |
parent | 88d84073aecbe8bdc5f10825b6d7ca6b81c5f7b1 (diff) |
Template helpers refactoring
Diffstat (limited to 'app/Template/analytic')
-rw-r--r-- | app/Template/analytic/cfd.php | 14 | ||||
-rw-r--r-- | app/Template/analytic/layout.php | 8 | ||||
-rw-r--r-- | app/Template/analytic/sidebar.php | 6 | ||||
-rw-r--r-- | app/Template/analytic/tasks.php | 4 | ||||
-rw-r--r-- | app/Template/analytic/users.php | 4 |
5 files changed, 18 insertions, 18 deletions
diff --git a/app/Template/analytic/cfd.php b/app/Template/analytic/cfd.php index d8dd5517..58115e77 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="<?= Helper\u('analytic', 'cfd', array('project_id' => $project['id'], 'from' => $values['from'], 'to' => $values['to'])) ?>"></div> + <div id="chart" data-url="<?= $this->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"> +<form method="post" class="form-inline" action="<?= $this->u('analytic', 'cfd', array('project_id' => $project['id'])) ?>" autocomplete="off"> - <?= Helper\form_csrf() ?> + <?= $this->formCsrf() ?> <div class="form-inline-group"> - <?= 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') ?> + <?= $this->formLabel(t('Start Date'), 'from') ?> + <?= $this->formText('from', $values, array(), array('required', 'placeholder="'.$this->inList($date_format, $date_formats).'"'), 'form-date') ?> </div> <div class="form-inline-group"> - <?= 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') ?> + <?= $this->formLabel(t('End Date'), 'to') ?> + <?= $this->formText('to', $values, array(), array('required', 'placeholder="'.$this->inList($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 2dd7a4f5..f2506917 100644 --- a/app/Template/analytic/layout.php +++ b/app/Template/analytic/layout.php @@ -1,15 +1,15 @@ -<?= Helper\js('assets/js/d3.v3.4.8.min.js') ?> -<?= Helper\js('assets/js/dimple.v2.1.0.min.js') ?> +<?= $this->js('assets/js/d3.v3.4.8.min.js') ?> +<?= $this->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> + <li><i class="fa fa-table fa-fw"></i><?= $this->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)) ?> + <?= $this->render('analytic/sidebar', array('project' => $project)) ?> <div class="sidebar-content"> <?= $analytic_content_for_layout ?> diff --git a/app/Template/analytic/sidebar.php b/app/Template/analytic/sidebar.php index 9b2fd9f6..a7076db9 100644 --- a/app/Template/analytic/sidebar.php +++ b/app/Template/analytic/sidebar.php @@ -2,13 +2,13 @@ <h2><?= t('Reportings') ?></h2> <ul> <li> - <?= Helper\a(t('Task distribution'), 'analytic', 'tasks', array('project_id' => $project['id'])) ?> + <?= $this->a(t('Task distribution'), 'analytic', 'tasks', array('project_id' => $project['id'])) ?> </li> <li> - <?= Helper\a(t('User repartition'), 'analytic', 'users', array('project_id' => $project['id'])) ?> + <?= $this->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'])) ?> + <?= $this->a(t('Cumulative flow diagram'), 'analytic', 'cfd', 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 b8b630f9..b1a08a23 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="<?= Helper\u('analytic', 'tasks', array('project_id' => $project['id'])) ?>"></div> + <div id="chart" data-url="<?= $this->u('analytic', 'tasks', array('project_id' => $project['id'])) ?>"></div> <table> <tr> @@ -18,7 +18,7 @@ <?php foreach ($metrics as $metric): ?> <tr> <td> - <?= Helper\escape($metric['column_title']) ?> + <?= $this->e($metric['column_title']) ?> </td> <td> <?= $metric['nb_tasks'] ?> diff --git a/app/Template/analytic/users.php b/app/Template/analytic/users.php index 007f7bc6..97328c02 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="<?= Helper\u('analytic', 'users', array('project_id' => $project['id'])) ?>"></div> + <div id="chart" data-url="<?= $this->u('analytic', 'users', array('project_id' => $project['id'])) ?>"></div> <table> <tr> @@ -18,7 +18,7 @@ <?php foreach ($metrics as $metric): ?> <tr> <td> - <?= Helper\escape($metric['user']) ?> + <?= $this->e($metric['user']) ?> </td> <td> <?= $metric['nb_tasks'] ?> |