Helpers refactoring
This commit is contained in:
@@ -2,17 +2,17 @@
|
||||
<h2><?= t('Add a new link') ?></h2>
|
||||
</div>
|
||||
|
||||
<form action="<?= $this->u('tasklink', 'save', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'ajax' => isset($ajax))) ?>" method="post" autocomplete="off">
|
||||
<form action="<?= $this->url->href('tasklink', 'save', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'ajax' => isset($ajax))) ?>" method="post" autocomplete="off">
|
||||
|
||||
<?= $this->formCsrf() ?>
|
||||
<?= $this->formHidden('task_id', array('task_id' => $task['id'])) ?>
|
||||
<?= $this->formHidden('opposite_task_id', $values) ?>
|
||||
<?= $this->form->csrf() ?>
|
||||
<?= $this->form->hidden('task_id', array('task_id' => $task['id'])) ?>
|
||||
<?= $this->form->hidden('opposite_task_id', $values) ?>
|
||||
|
||||
<?= $this->formLabel(t('Label'), 'link_id') ?>
|
||||
<?= $this->formSelect('link_id', $labels, $values, $errors) ?>
|
||||
<?= $this->form->label(t('Label'), 'link_id') ?>
|
||||
<?= $this->form->select('link_id', $labels, $values, $errors) ?>
|
||||
|
||||
<?= $this->formLabel(t('Task'), 'title') ?>
|
||||
<?= $this->formText(
|
||||
<?= $this->form->label(t('Task'), 'title') ?>
|
||||
<?= $this->form->text(
|
||||
'title',
|
||||
$values,
|
||||
$errors,
|
||||
@@ -21,7 +21,7 @@
|
||||
'placeholder="'.t('Start to type task title...').'"',
|
||||
'title="'.t('Start to type task title...').'"',
|
||||
'data-dst-field="opposite_task_id"',
|
||||
'data-search-url="'.$this->u('app', 'autocomplete', array('exclude_task_id' => $task['id'])).'"',
|
||||
'data-search-url="'.$this->url->href('app', 'autocomplete', array('exclude_task_id' => $task['id'])).'"',
|
||||
),
|
||||
'task-autocomplete') ?>
|
||||
|
||||
@@ -29,9 +29,9 @@
|
||||
<input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
|
||||
<?= t('or') ?>
|
||||
<?php if (isset($ajax)): ?>
|
||||
<?= $this->a(t('cancel'), 'board', 'show', array('project_id' => $task['project_id']), false, 'close-popover') ?>
|
||||
<?= $this->url->link(t('cancel'), 'board', 'show', array('project_id' => $task['project_id']), false, 'close-popover') ?>
|
||||
<?php else: ?>
|
||||
<?= $this->a(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
|
||||
<?= $this->url->link(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
</form>
|
||||
@@ -2,18 +2,18 @@
|
||||
<h2><?= t('Edit link') ?></h2>
|
||||
</div>
|
||||
|
||||
<form action="<?= $this->u('tasklink', 'update', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'link_id' => $task_link['id'])) ?>" method="post" autocomplete="off">
|
||||
<form action="<?= $this->url->href('tasklink', 'update', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'link_id' => $task_link['id'])) ?>" method="post" autocomplete="off">
|
||||
|
||||
<?= $this->formCsrf() ?>
|
||||
<?= $this->formHidden('id', $values) ?>
|
||||
<?= $this->formHidden('task_id', $values) ?>
|
||||
<?= $this->formHidden('opposite_task_id', $values) ?>
|
||||
<?= $this->form->csrf() ?>
|
||||
<?= $this->form->hidden('id', $values) ?>
|
||||
<?= $this->form->hidden('task_id', $values) ?>
|
||||
<?= $this->form->hidden('opposite_task_id', $values) ?>
|
||||
|
||||
<?= $this->formLabel(t('Label'), 'link_id') ?>
|
||||
<?= $this->formSelect('link_id', $labels, $values, $errors) ?>
|
||||
<?= $this->form->label(t('Label'), 'link_id') ?>
|
||||
<?= $this->form->select('link_id', $labels, $values, $errors) ?>
|
||||
|
||||
<?= $this->formLabel(t('Task'), 'title') ?>
|
||||
<?= $this->formText(
|
||||
<?= $this->form->label(t('Task'), 'title') ?>
|
||||
<?= $this->form->text(
|
||||
'title',
|
||||
$values,
|
||||
$errors,
|
||||
@@ -22,13 +22,13 @@
|
||||
'placeholder="'.t('Start to type task title...').'"',
|
||||
'title="'.t('Start to type task title...').'"',
|
||||
'data-dst-field="opposite_task_id"',
|
||||
'data-search-url="'.$this->u('app', 'autocomplete', array('exclude_task_id' => $task['id'])).'"',
|
||||
'data-search-url="'.$this->url->href('app', 'autocomplete', array('exclude_task_id' => $task['id'])).'"',
|
||||
),
|
||||
'task-autocomplete') ?>
|
||||
|
||||
<div class="form-actions">
|
||||
<input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
|
||||
<?= t('or') ?>
|
||||
<?= $this->a(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
|
||||
<?= $this->url->link(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
|
||||
</div>
|
||||
</form>
|
||||
@@ -8,8 +8,8 @@
|
||||
</p>
|
||||
|
||||
<div class="form-actions">
|
||||
<?= $this->a(t('Yes'), 'tasklink', 'remove', array('link_id' => $link['id'], 'task_id' => $task['id'], 'project_id' => $task['project_id']), true, 'btn btn-red') ?>
|
||||
<?= $this->url->link(t('Yes'), 'tasklink', 'remove', array('link_id' => $link['id'], 'task_id' => $task['id'], 'project_id' => $task['project_id']), true, 'btn btn-red') ?>
|
||||
<?= t('or') ?>
|
||||
<?= $this->a(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
|
||||
<?= $this->url->link(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
|
||||
</div>
|
||||
</div>
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
<td>
|
||||
<?php if (! isset($not_editable)): ?>
|
||||
<?= $this->a(
|
||||
<?= $this->url->link(
|
||||
$this->e('#'.$link['task_id'].' '.$link['title']),
|
||||
'task',
|
||||
'show',
|
||||
@@ -32,7 +32,7 @@
|
||||
$link['is_active'] ? '' : 'task-link-closed'
|
||||
) ?>
|
||||
<?php else: ?>
|
||||
<?= $this->a(
|
||||
<?= $this->url->link(
|
||||
$this->e('#'.$link['task_id'].' '.$link['title']),
|
||||
'task',
|
||||
'readonly',
|
||||
@@ -56,7 +56,7 @@
|
||||
<td>
|
||||
<?php if (! empty($link['task_assignee_username'])): ?>
|
||||
<?php if (! isset($not_editable)): ?>
|
||||
<?= $this->a($this->e($link['task_assignee_name'] ?: $link['task_assignee_username']), 'user', 'show', array('user_id' => $link['task_assignee_id'])) ?>
|
||||
<?= $this->url->link($this->e($link['task_assignee_name'] ?: $link['task_assignee_username']), 'user', 'show', array('user_id' => $link['task_assignee_id'])) ?>
|
||||
<?php else: ?>
|
||||
<?= $this->e($link['task_assignee_name'] ?: $link['task_assignee_username']) ?>
|
||||
<?php endif ?>
|
||||
@@ -65,8 +65,8 @@
|
||||
<?php if (! isset($not_editable)): ?>
|
||||
<td>
|
||||
<ul>
|
||||
<li><?= $this->a(t('Edit'), 'tasklink', 'edit', array('link_id' => $link['id'], 'task_id' => $task['id'], 'project_id' => $task['project_id'])) ?></li>
|
||||
<li><?= $this->a(t('Remove'), 'tasklink', 'confirm', array('link_id' => $link['id'], 'task_id' => $task['id'], 'project_id' => $task['project_id'])) ?></li>
|
||||
<li><?= $this->url->link(t('Edit'), 'tasklink', 'edit', array('link_id' => $link['id'], 'task_id' => $task['id'], 'project_id' => $task['project_id'])) ?></li>
|
||||
<li><?= $this->url->link(t('Remove'), 'tasklink', 'confirm', array('link_id' => $link['id'], 'task_id' => $task['id'], 'project_id' => $task['project_id'])) ?></li>
|
||||
</ul>
|
||||
</td>
|
||||
<?php endif ?>
|
||||
@@ -76,15 +76,15 @@
|
||||
</table>
|
||||
|
||||
<?php if (! isset($not_editable) && isset($link_label_list)): ?>
|
||||
<form action="<?= $this->u('tasklink', 'save', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>" method="post" autocomplete="off">
|
||||
<form action="<?= $this->url->href('tasklink', 'save', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>" method="post" autocomplete="off">
|
||||
|
||||
<?= $this->formCsrf() ?>
|
||||
<?= $this->formHidden('task_id', array('task_id' => $task['id'])) ?>
|
||||
<?= $this->formHidden('opposite_task_id', array()) ?>
|
||||
<?= $this->form->csrf() ?>
|
||||
<?= $this->form->hidden('task_id', array('task_id' => $task['id'])) ?>
|
||||
<?= $this->form->hidden('opposite_task_id', array()) ?>
|
||||
|
||||
<?= $this->formSelect('link_id', $link_label_list, array(), array()) ?>
|
||||
<?= $this->form->select('link_id', $link_label_list, array(), array()) ?>
|
||||
|
||||
<?= $this->formText(
|
||||
<?= $this->form->text(
|
||||
'title',
|
||||
array(),
|
||||
array(),
|
||||
@@ -93,7 +93,7 @@
|
||||
'placeholder="'.t('Start to type task title...').'"',
|
||||
'title="'.t('Start to type task title...').'"',
|
||||
'data-dst-field="opposite_task_id"',
|
||||
'data-search-url="'.$this->u('app', 'autocomplete', array('exclude_task_id' => $task['id'])).'"',
|
||||
'data-search-url="'.$this->url->href('app', 'autocomplete', array('exclude_task_id' => $task['id'])).'"',
|
||||
),
|
||||
'task-autocomplete') ?>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user