diff options
author | Frederic Guillot <fred@kanboard.net> | 2015-05-24 16:02:25 -0400 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2015-05-24 16:02:25 -0400 |
commit | eeac2329baab1fdae7cbf6c707ed2ffd8beb4c1b (patch) | |
tree | 511c2fe47f8fbb1ea90e59e7a7a7f5e3530aa9ed /app/Template/column | |
parent | 65e9e5d1bed9f88ecfd43eb2c1e780a7c22c151f (diff) |
Helpers refactoring
Diffstat (limited to 'app/Template/column')
-rw-r--r-- | app/Template/column/edit.php | 20 | ||||
-rw-r--r-- | app/Template/column/index.php | 28 | ||||
-rw-r--r-- | app/Template/column/remove.php | 4 |
3 files changed, 26 insertions, 26 deletions
diff --git a/app/Template/column/edit.php b/app/Template/column/edit.php index 7e16c326..4d9848a9 100644 --- a/app/Template/column/edit.php +++ b/app/Template/column/edit.php @@ -2,25 +2,25 @@ <h2><?= t('Edit column "%s"', $column['title']) ?></h2> </div> -<form method="post" action="<?= $this->u('column', 'update', array('project_id' => $project['id'], 'column_id' => $column['id'])) ?>" autocomplete="off"> +<form method="post" action="<?= $this->url->href('column', 'update', array('project_id' => $project['id'], 'column_id' => $column['id'])) ?>" autocomplete="off"> - <?= $this->formCsrf() ?> + <?= $this->form->csrf() ?> - <?= $this->formHidden('id', $values) ?> - <?= $this->formHidden('project_id', $values) ?> + <?= $this->form->hidden('id', $values) ?> + <?= $this->form->hidden('project_id', $values) ?> - <?= $this->formLabel(t('Title'), 'title') ?> - <?= $this->formText('title', $values, $errors, array('autofocus', 'required', 'maxlength="50"')) ?> + <?= $this->form->label(t('Title'), 'title') ?> + <?= $this->form->text('title', $values, $errors, array('autofocus', 'required', 'maxlength="50"')) ?> - <?= $this->formLabel(t('Task limit'), 'task_limit') ?> - <?= $this->formNumber('task_limit', $values, $errors) ?> + <?= $this->form->label(t('Task limit'), 'task_limit') ?> + <?= $this->form->number('task_limit', $values, $errors) ?> - <?= $this->formLabel(t('Description'), 'description') ?> + <?= $this->form->label(t('Description'), 'description') ?> <div class="form-tabs"> <div class="write-area"> - <?= $this->formTextarea('description', $values, $errors) ?> + <?= $this->form->textarea('description', $values, $errors) ?> </div> <div class="preview-area"> <div class="markdown"></div> diff --git a/app/Template/column/index.php b/app/Template/column/index.php index e5772923..18e7f284 100644 --- a/app/Template/column/index.php +++ b/app/Template/column/index.php @@ -18,7 +18,7 @@ <tr> <td class="column-60"><?= $this->e($column['title']) ?> <?php if (! empty($column['description'])): ?> - <span class="column-tooltip" title='<?= $this->e($this->markdown($column['description'])) ?>'> + <span class="column-tooltip" title='<?= $this->e($this->text->markdown($column['description'])) ?>'> <i class="fa fa-info-circle"></i> </span> <?php endif ?> @@ -27,20 +27,20 @@ <td class="column-30"> <ul> <li> - <?= $this->a(t('Edit'), 'column', 'edit', array('project_id' => $project['id'], 'column_id' => $column['id'])) ?> + <?= $this->url->link(t('Edit'), 'column', 'edit', array('project_id' => $project['id'], 'column_id' => $column['id'])) ?> </li> <?php if ($column['position'] != $first_position): ?> <li> - <?= $this->a(t('Move Up'), 'column', 'move', array('project_id' => $project['id'], 'column_id' => $column['id'], 'direction' => 'up'), true) ?> + <?= $this->url->link(t('Move Up'), 'column', 'move', array('project_id' => $project['id'], 'column_id' => $column['id'], 'direction' => 'up'), true) ?> </li> <?php endif ?> <?php if ($column['position'] != $last_position): ?> <li> - <?= $this->a(t('Move Down'), 'column', 'move', array('project_id' => $project['id'], 'column_id' => $column['id'], 'direction' => 'down'), true) ?> + <?= $this->url->link(t('Move Down'), 'column', 'move', array('project_id' => $project['id'], 'column_id' => $column['id'], 'direction' => 'down'), true) ?> </li> <?php endif ?> <li> - <?= $this->a(t('Remove'), 'column', 'confirm', array('project_id' => $project['id'], 'column_id' => $column['id'])) ?> + <?= $this->url->link(t('Remove'), 'column', 'confirm', array('project_id' => $project['id'], 'column_id' => $column['id'])) ?> </li> </ul> </td> @@ -51,23 +51,23 @@ <?php endif ?> <h3><?= t('Add a new column') ?></h3> -<form method="post" action="<?= $this->u('column', 'create', array('project_id' => $project['id'])) ?>" autocomplete="off"> +<form method="post" action="<?= $this->url->href('column', 'create', array('project_id' => $project['id'])) ?>" autocomplete="off"> - <?= $this->formCsrf() ?> + <?= $this->form->csrf() ?> - <?= $this->formHidden('project_id', $values) ?> + <?= $this->form->hidden('project_id', $values) ?> - <?= $this->formLabel(t('Title'), 'title') ?> - <?= $this->formText('title', $values, $errors, array('required', 'maxlength="50"')) ?> + <?= $this->form->label(t('Title'), 'title') ?> + <?= $this->form->text('title', $values, $errors, array('required', 'maxlength="50"')) ?> - <?= $this->formLabel(t('Task limit'), 'task_limit') ?> - <?= $this->formNumber('task_limit', $values, $errors) ?> + <?= $this->form->label(t('Task limit'), 'task_limit') ?> + <?= $this->form->number('task_limit', $values, $errors) ?> - <?= $this->formLabel(t('Description'), 'description') ?> + <?= $this->form->label(t('Description'), 'description') ?> <div class="form-tabs"> <div class="write-area"> - <?= $this->formTextarea('description', $values, $errors) ?> + <?= $this->form->textarea('description', $values, $errors) ?> </div> <div class="preview-area"> <div class="markdown"></div> diff --git a/app/Template/column/remove.php b/app/Template/column/remove.php index 3dcbd62f..28d0928f 100644 --- a/app/Template/column/remove.php +++ b/app/Template/column/remove.php @@ -9,7 +9,7 @@ </p> <div class="form-actions"> - <?= $this->a(t('Yes'), 'column', 'remove', array('project_id' => $project['id'], 'column_id' => $column['id'], 'remove' => 'yes'), true, 'btn btn-red') ?> - <?= t('or') ?> <?= $this->a(t('cancel'), 'column', 'index', array('project_id' => $project['id'])) ?> + <?= $this->url->link(t('Yes'), 'column', 'remove', array('project_id' => $project['id'], 'column_id' => $column['id'], 'remove' => 'yes'), true, 'btn btn-red') ?> + <?= t('or') ?> <?= $this->url->link(t('cancel'), 'column', 'index', array('project_id' => $project['id'])) ?> </div> </div>
\ No newline at end of file |