diff options
Diffstat (limited to 'app/Template/task')
-rw-r--r-- | app/Template/task/close.php | 4 | ||||
-rw-r--r-- | app/Template/task/details.php | 2 | ||||
-rw-r--r-- | app/Template/task/duplicate.php | 4 | ||||
-rw-r--r-- | app/Template/task/duplicate_project.php | 12 | ||||
-rw-r--r-- | app/Template/task/edit.php | 40 | ||||
-rw-r--r-- | app/Template/task/edit_description.php | 12 | ||||
-rw-r--r-- | app/Template/task/edit_recurrence.php | 32 | ||||
-rw-r--r-- | app/Template/task/layout.php | 4 | ||||
-rw-r--r-- | app/Template/task/move_project.php | 12 | ||||
-rw-r--r-- | app/Template/task/new.php | 52 | ||||
-rw-r--r-- | app/Template/task/open.php | 4 | ||||
-rw-r--r-- | app/Template/task/public.php | 2 | ||||
-rw-r--r-- | app/Template/task/recurring_info.php | 4 | ||||
-rw-r--r-- | app/Template/task/remove.php | 4 | ||||
-rw-r--r-- | app/Template/task/show.php | 6 | ||||
-rw-r--r-- | app/Template/task/show_description.php | 4 | ||||
-rw-r--r-- | app/Template/task/sidebar.php | 38 | ||||
-rw-r--r-- | app/Template/task/table.php | 8 | ||||
-rw-r--r-- | app/Template/task/time.php | 18 | ||||
-rw-r--r-- | app/Template/task/time_tracking.php | 2 | ||||
-rw-r--r-- | app/Template/task/transitions.php | 2 |
21 files changed, 133 insertions, 133 deletions
diff --git a/app/Template/task/close.php b/app/Template/task/close.php index a0a95787..79150333 100644 --- a/app/Template/task/close.php +++ b/app/Template/task/close.php @@ -8,8 +8,8 @@ </p> <div class="form-actions"> - <?= $this->a(t('Yes'), 'task', 'close', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'confirmation' => 'yes', 'redirect' => $redirect), true, 'btn btn-red') ?> + <?= $this->url->link(t('Yes'), 'task', 'close', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'confirmation' => 'yes', 'redirect' => $redirect), true, 'btn btn-red') ?> <?= t('or') ?> - <?= $this->a(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?> + <?= $this->url->link(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?> </div> </div>
\ No newline at end of file diff --git a/app/Template/task/details.php b/app/Template/task/details.php index c70945bc..f688585a 100644 --- a/app/Template/task/details.php +++ b/app/Template/task/details.php @@ -77,7 +77,7 @@ </li> <?php if ($project['is_public']): ?> <li> - <?= $this->a(t('Public link'), 'task', 'readonly', array('task_id' => $task['id'], 'token' => $project['token']), false, '', '', true) ?> + <?= $this->url->link(t('Public link'), 'task', 'readonly', array('task_id' => $task['id'], 'token' => $project['token']), false, '', '', true) ?> </li> <?php endif ?> diff --git a/app/Template/task/duplicate.php b/app/Template/task/duplicate.php index cc7e0870..e74d2906 100644 --- a/app/Template/task/duplicate.php +++ b/app/Template/task/duplicate.php @@ -8,8 +8,8 @@ </p> <div class="form-actions"> - <?= $this->a(t('Yes'), 'task', 'duplicate', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'confirmation' => 'yes'), true, 'btn btn-red') ?> + <?= $this->url->link(t('Yes'), 'task', 'duplicate', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'confirmation' => 'yes'), 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>
\ No newline at end of file diff --git a/app/Template/task/duplicate_project.php b/app/Template/task/duplicate_project.php index e227e046..9a8e3c4a 100644 --- a/app/Template/task/duplicate_project.php +++ b/app/Template/task/duplicate_project.php @@ -6,18 +6,18 @@ <p class="alert"><?= t('No project') ?></p> <?php else: ?> - <form method="post" action="<?= $this->u('task', 'copy', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>" autocomplete="off"> + <form method="post" action="<?= $this->url->href('task', 'copy', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>" autocomplete="off"> - <?= $this->formCsrf() ?> + <?= $this->form->csrf() ?> - <?= $this->formHidden('id', $values) ?> - <?= $this->formLabel(t('Project'), 'project_id') ?> - <?= $this->formSelect('project_id', $projects_list, $values, $errors) ?><br/> + <?= $this->form->hidden('id', $values) ?> + <?= $this->form->label(t('Project'), 'project_id') ?> + <?= $this->form->select('project_id', $projects_list, $values, $errors) ?><br/> <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> diff --git a/app/Template/task/edit.php b/app/Template/task/edit.php index f9ac2b20..2900b739 100644 --- a/app/Template/task/edit.php +++ b/app/Template/task/edit.php @@ -2,16 +2,16 @@ <h2><?= t('Edit a task') ?></h2> </div> <section id="task-section"> -<form method="post" action="<?= $this->u('task', 'update', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'ajax' => $ajax)) ?>" autocomplete="off"> +<form method="post" action="<?= $this->url->href('task', 'update', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'ajax' => $ajax)) ?>" autocomplete="off"> - <?= $this->formCsrf() ?> + <?= $this->form->csrf() ?> <div class="form-column"> - <?= $this->formLabel(t('Title'), 'title') ?> - <?= $this->formText('title', $values, $errors, array('required', 'maxlength="200"')) ?><br/> + <?= $this->form->label(t('Title'), 'title') ?> + <?= $this->form->text('title', $values, $errors, array('required', 'maxlength="200"')) ?><br/> - <?= $this->formLabel(t('Description'), 'description') ?> + <?= $this->form->label(t('Description'), 'description') ?> <div class="form-tabs"> <ul class="form-tabs-nav"> @@ -23,7 +23,7 @@ </li> </ul> <div class="write-area"> - <?= $this->formTextarea('description', $values, $errors, array('placeholder="'.t('Leave a description').'"')) ?> + <?= $this->form->textarea('description', $values, $errors, array('placeholder="'.t('Leave a description').'"')) ?> </div> <div class="preview-area"> <div class="markdown"></div> @@ -35,23 +35,23 @@ </div> <div class="form-column"> - <?= $this->formHidden('id', $values) ?> - <?= $this->formHidden('project_id', $values) ?> + <?= $this->form->hidden('id', $values) ?> + <?= $this->form->hidden('project_id', $values) ?> - <?= $this->formLabel(t('Assignee'), 'owner_id') ?> - <?= $this->formSelect('owner_id', $users_list, $values, $errors) ?><br/> + <?= $this->form->label(t('Assignee'), 'owner_id') ?> + <?= $this->form->select('owner_id', $users_list, $values, $errors) ?><br/> - <?= $this->formLabel(t('Category'), 'category_id') ?> - <?= $this->formSelect('category_id', $categories_list, $values, $errors) ?><br/> + <?= $this->form->label(t('Category'), 'category_id') ?> + <?= $this->form->select('category_id', $categories_list, $values, $errors) ?><br/> - <?= $this->formLabel(t('Color'), 'color_id') ?> - <?= $this->formSelect('color_id', $colors_list, $values, $errors) ?><br/> + <?= $this->form->label(t('Color'), 'color_id') ?> + <?= $this->form->select('color_id', $colors_list, $values, $errors) ?><br/> - <?= $this->formLabel(t('Complexity'), 'score') ?> - <?= $this->formNumber('score', $values, $errors) ?><br/> + <?= $this->form->label(t('Complexity'), 'score') ?> + <?= $this->form->number('score', $values, $errors) ?><br/> - <?= $this->formLabel(t('Due Date'), 'date_due') ?> - <?= $this->formText('date_due', $values, $errors, array('placeholder="'.$this->inList($date_format, $date_formats).'"'), 'form-date') ?><br/> + <?= $this->form->label(t('Due Date'), 'date_due') ?> + <?= $this->form->text('date_due', $values, $errors, array('placeholder="'.$this->text->in($date_format, $date_formats).'"'), 'form-date') ?><br/> <div class="form-help"><?= t('Others formats accepted: %s and %s', date('Y-m-d'), date('Y_m_d')) ?></div> </div> @@ -59,9 +59,9 @@ <input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/> <?= t('or') ?> <?php if ($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> diff --git a/app/Template/task/edit_description.php b/app/Template/task/edit_description.php index 2af26ef4..84f0cebd 100644 --- a/app/Template/task/edit_description.php +++ b/app/Template/task/edit_description.php @@ -2,10 +2,10 @@ <h2><?= t('Edit the description') ?></h2> </div> -<form method="post" action="<?= $this->u('task', 'description', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'ajax' => $ajax)) ?>" autocomplete="off"> +<form method="post" action="<?= $this->url->href('task', 'description', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'ajax' => $ajax)) ?>" autocomplete="off"> - <?= $this->formCsrf() ?> - <?= $this->formHidden('id', $values) ?> + <?= $this->form->csrf() ?> + <?= $this->form->hidden('id', $values) ?> <div class="form-tabs"> <ul class="form-tabs-nav"> @@ -17,7 +17,7 @@ </li> </ul> <div class="write-area"> - <?= $this->formTextarea('description', $values, $errors, array('autofocus', 'placeholder="'.t('Leave a description').'"'), 'description-textarea') ?> + <?= $this->form->textarea('description', $values, $errors, array('autofocus', 'placeholder="'.t('Leave a description').'"'), 'description-textarea') ?> </div> <div class="preview-area"> <div class="markdown"></div> @@ -30,9 +30,9 @@ <input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/> <?= t('or') ?> <?php if ($ajax): ?> - <?= $this->a(t('cancel'), 'board', 'show', array('project_id' => $task['project_id'])) ?> + <?= $this->url->link(t('cancel'), 'board', 'show', array('project_id' => $task['project_id'])) ?> <?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> diff --git a/app/Template/task/edit_recurrence.php b/app/Template/task/edit_recurrence.php index 76894bd4..c261e368 100644 --- a/app/Template/task/edit_recurrence.php +++ b/app/Template/task/edit_recurrence.php @@ -15,36 +15,36 @@ <?php if ($task['recurrence_status'] != \Model\Task::RECURRING_STATUS_PROCESSED): ?> - <form method="post" action="<?= $this->u('task', 'recurrence', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'ajax' => $ajax)) ?>" autocomplete="off"> + <form method="post" action="<?= $this->url->href('task', 'recurrence', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'ajax' => $ajax)) ?>" 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('Generate recurrent task'), 'recurrence_status') ?> - <?= $this->formSelect('recurrence_status', $recurrence_status_list, $values, $errors) ?> + <?= $this->form->label(t('Generate recurrent task'), 'recurrence_status') ?> + <?= $this->form->select('recurrence_status', $recurrence_status_list, $values, $errors) ?> - <?= $this->formLabel(t('Trigger to generate recurrent task'), 'recurrence_trigger') ?> - <?= $this->formSelect('recurrence_trigger', $recurrence_trigger_list, $values, $errors) ?> + <?= $this->form->label(t('Trigger to generate recurrent task'), 'recurrence_trigger') ?> + <?= $this->form->select('recurrence_trigger', $recurrence_trigger_list, $values, $errors) ?> - <?= $this->formLabel(t('Factor to calculate new due date'), 'recurrence_factor') ?> - <?= $this->formNumber('recurrence_factor', $values, $errors) ?> + <?= $this->form->label(t('Factor to calculate new due date'), 'recurrence_factor') ?> + <?= $this->form->number('recurrence_factor', $values, $errors) ?> - <?= $this->formLabel(t('Timeframe to calculate new due date'), 'recurrence_timeframe') ?> - <?= $this->formSelect('recurrence_timeframe', $recurrence_timeframe_list, $values, $errors) ?> + <?= $this->form->label(t('Timeframe to calculate new due date'), 'recurrence_timeframe') ?> + <?= $this->form->select('recurrence_timeframe', $recurrence_timeframe_list, $values, $errors) ?> - <?= $this->formLabel(t('Base date to calculate new due date'), 'recurrence_basedate') ?> - <?= $this->formSelect('recurrence_basedate', $recurrence_basedate_list, $values, $errors) ?> + <?= $this->form->label(t('Base date to calculate new due date'), 'recurrence_basedate') ?> + <?= $this->form->select('recurrence_basedate', $recurrence_basedate_list, $values, $errors) ?> <div class="form-actions"> <input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/> <?= t('or') ?> <?php if ($ajax): ?> - <?= $this->a(t('cancel'), 'board', 'show', array('project_id' => $task['project_id'])) ?> + <?= $this->url->link(t('cancel'), 'board', 'show', array('project_id' => $task['project_id'])) ?> <?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> diff --git a/app/Template/task/layout.php b/app/Template/task/layout.php index dd59a9fc..18ddea36 100644 --- a/app/Template/task/layout.php +++ b/app/Template/task/layout.php @@ -3,11 +3,11 @@ <ul> <li> <i class="fa fa-table fa-fw"></i> - <?= $this->a(t('Back to the board'), 'board', 'show', array('project_id' => $task['project_id'])) ?> + <?= $this->url->link(t('Back to the board'), 'board', 'show', array('project_id' => $task['project_id'])) ?> </li> <li> <i class="fa fa-calendar fa-fw"></i> - <?= $this->a(t('Calendar'), 'calendar', 'show', array('project_id' => $task['project_id'])) ?> + <?= $this->url->link(t('Calendar'), 'calendar', 'show', array('project_id' => $task['project_id'])) ?> </li> </ul> </div> diff --git a/app/Template/task/move_project.php b/app/Template/task/move_project.php index ccc67851..b0b33f81 100644 --- a/app/Template/task/move_project.php +++ b/app/Template/task/move_project.php @@ -6,18 +6,18 @@ <p class="alert"><?= t('No project') ?></p> <?php else: ?> - <form method="post" action="<?= $this->u('task', 'move', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>" autocomplete="off"> + <form method="post" action="<?= $this->url->href('task', 'move', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>" autocomplete="off"> - <?= $this->formCsrf() ?> + <?= $this->form->csrf() ?> - <?= $this->formHidden('id', $values) ?> - <?= $this->formLabel(t('Project'), 'project_id') ?> - <?= $this->formSelect('project_id', $projects_list, $values, $errors) ?><br/> + <?= $this->form->hidden('id', $values) ?> + <?= $this->form->label(t('Project'), 'project_id') ?> + <?= $this->form->select('project_id', $projects_list, $values, $errors) ?><br/> <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> diff --git a/app/Template/task/new.php b/app/Template/task/new.php index 37294c89..bd00d347 100644 --- a/app/Template/task/new.php +++ b/app/Template/task/new.php @@ -1,7 +1,7 @@ <?php if (! $ajax): ?> <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' => $values['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' => $values['project_id'])) ?></li> </ul> </div> <?php else: ?> @@ -11,15 +11,15 @@ <?php endif ?> <section id="task-section"> -<form method="post" action="<?= $this->u('task', 'save', array('project_id' => $values['project_id'])) ?>" autocomplete="off"> +<form method="post" action="<?= $this->url->href('task', 'save', array('project_id' => $values['project_id'])) ?>" autocomplete="off"> - <?= $this->formCsrf() ?> + <?= $this->form->csrf() ?> <div class="form-column"> - <?= $this->formLabel(t('Title'), 'title') ?> - <?= $this->formText('title', $values, $errors, array('autofocus', 'required', 'maxlength="200"'), 'form-input-large') ?><br/> + <?= $this->form->label(t('Title'), 'title') ?> + <?= $this->form->text('title', $values, $errors, array('autofocus', 'required', 'maxlength="200"'), 'form-input-large') ?><br/> - <?= $this->formLabel(t('Description'), 'description') ?> + <?= $this->form->label(t('Description'), 'description') ?> <div class="form-tabs"> <ul class="form-tabs-nav"> @@ -31,7 +31,7 @@ </li> </ul> <div class="write-area"> - <?= $this->formTextarea('description', $values, $errors, array('placeholder="'.t('Leave a description').'"')) ?> + <?= $this->form->textarea('description', $values, $errors, array('placeholder="'.t('Leave a description').'"')) ?> </div> <div class="preview-area"> <div class="markdown"></div> @@ -41,44 +41,44 @@ <div class="form-help"><a href="http://kanboard.net/documentation/syntax-guide" target="_blank" rel="noreferrer"><?= t('Write your text in Markdown') ?></a></div> <?php if (! isset($duplicate)): ?> - <?= $this->formCheckbox('another_task', t('Create another task'), 1, isset($values['another_task']) && $values['another_task'] == 1) ?> + <?= $this->form->checkbox('another_task', t('Create another task'), 1, isset($values['another_task']) && $values['another_task'] == 1) ?> <?php endif ?> </div> <div class="form-column"> - <?= $this->formHidden('project_id', $values) ?> + <?= $this->form->hidden('project_id', $values) ?> - <?= $this->formLabel(t('Assignee'), 'owner_id') ?> - <?= $this->formSelect('owner_id', $users_list, $values, $errors) ?><br/> + <?= $this->form->label(t('Assignee'), 'owner_id') ?> + <?= $this->form->select('owner_id', $users_list, $values, $errors) ?><br/> - <?= $this->formLabel(t('Category'), 'category_id') ?> - <?= $this->formSelect('category_id', $categories_list, $values, $errors) ?><br/> + <?= $this->form->label(t('Category'), 'category_id') ?> + <?= $this->form->select('category_id', $categories_list, $values, $errors) ?><br/> <?php if (! (count($swimlanes_list) === 1 && key($swimlanes_list) === 0)): ?> - <?= $this->formLabel(t('Swimlane'), 'swimlane_id') ?> - <?= $this->formSelect('swimlane_id', $swimlanes_list, $values, $errors) ?><br/> + <?= $this->form->label(t('Swimlane'), 'swimlane_id') ?> + <?= $this->form->select('swimlane_id', $swimlanes_list, $values, $errors) ?><br/> <?php endif ?> - <?= $this->formLabel(t('Column'), 'column_id') ?> - <?= $this->formSelect('column_id', $columns_list, $values, $errors) ?><br/> + <?= $this->form->label(t('Column'), 'column_id') ?> + <?= $this->form->select('column_id', $columns_list, $values, $errors) ?><br/> - <?= $this->formLabel(t('Color'), 'color_id') ?> - <?= $this->formSelect('color_id', $colors_list, $values, $errors) ?><br/> + <?= $this->form->label(t('Color'), 'color_id') ?> + <?= $this->form->select('color_id', $colors_list, $values, $errors) ?><br/> - <?= $this->formLabel(t('Complexity'), 'score') ?> - <?= $this->formNumber('score', $values, $errors) ?><br/> + <?= $this->form->label(t('Complexity'), 'score') ?> + <?= $this->form->number('score', $values, $errors) ?><br/> - <?= $this->formLabel(t('Original estimate'), 'time_estimated') ?> - <?= $this->formNumeric('time_estimated', $values, $errors) ?> <?= t('hours') ?><br/> + <?= $this->form->label(t('Original estimate'), 'time_estimated') ?> + <?= $this->form->numeric('time_estimated', $values, $errors) ?> <?= t('hours') ?><br/> - <?= $this->formLabel(t('Due Date'), 'date_due') ?> - <?= $this->formText('date_due', $values, $errors, array('placeholder="'.$this->inList($date_format, $date_formats).'"'), 'form-date') ?><br/> + <?= $this->form->label(t('Due Date'), 'date_due') ?> + <?= $this->form->text('date_due', $values, $errors, array('placeholder="'.$this->text->in($date_format, $date_formats).'"'), 'form-date') ?><br/> <div class="form-help"><?= t('Others formats accepted: %s and %s', date('Y-m-d'), date('Y_m_d')) ?></div> </div> <div class="form-actions"> <input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/> - <?= t('or') ?> <?= $this->a(t('cancel'), 'board', 'show', array('project_id' => $values['project_id']), false, 'close-popover') ?> + <?= t('or') ?> <?= $this->url->link(t('cancel'), 'board', 'show', array('project_id' => $values['project_id']), false, 'close-popover') ?> </div> </form> </section> diff --git a/app/Template/task/open.php b/app/Template/task/open.php index 1fcdcd80..fbcc1111 100644 --- a/app/Template/task/open.php +++ b/app/Template/task/open.php @@ -8,8 +8,8 @@ </p> <div class="form-actions"> - <?= $this->a(t('Yes'), 'task', 'open', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'confirmation' => 'yes'), true, 'btn btn-red') ?> + <?= $this->url->link(t('Yes'), 'task', 'open', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'confirmation' => 'yes'), 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>
\ No newline at end of file diff --git a/app/Template/task/public.php b/app/Template/task/public.php index 9f32f669..73116de9 100644 --- a/app/Template/task/public.php +++ b/app/Template/task/public.php @@ -2,7 +2,7 @@ <?= $this->render('task/details', array('task' => $task, 'project' => $project, 'not_editable' => true)) ?> - <p class="pull-right"><?= $this->a(t('Back to the board'), 'board', 'readonly', array('token' => $project['token'])) ?></p> + <p class="pull-right"><?= $this->url->link(t('Back to the board'), 'board', 'readonly', array('token' => $project['token'])) ?></p> <?= $this->render('task/show_description', array( 'task' => $task, diff --git a/app/Template/task/recurring_info.php b/app/Template/task/recurring_info.php index 897f6207..ad64ae19 100644 --- a/app/Template/task/recurring_info.php +++ b/app/Template/task/recurring_info.php @@ -24,13 +24,13 @@ <?php if ($task['recurrence_parent']): ?> <li> <?= t('This task has been created by: ') ?> - <?= $this->a('#'.$task['recurrence_parent'], 'task', 'show', array('task_id' => $task['recurrence_parent'], 'project_id' => $task['project_id'])) ?> + <?= $this->url->link('#'.$task['recurrence_parent'], 'task', 'show', array('task_id' => $task['recurrence_parent'], 'project_id' => $task['project_id'])) ?> </li> <?php endif ?> <?php if ($task['recurrence_child']): ?> <li> <?= t('This task has created this child task: ') ?> - <?= $this->a('#'.$task['recurrence_child'], 'task', 'show', array('task_id' => $task['recurrence_child'], 'project_id' => $task['project_id'])) ?> + <?= $this->url->link('#'.$task['recurrence_child'], 'task', 'show', array('task_id' => $task['recurrence_child'], 'project_id' => $task['project_id'])) ?> </li> <?php endif ?> <?php endif ?> diff --git a/app/Template/task/remove.php b/app/Template/task/remove.php index c1eea5a0..2f6edc22 100644 --- a/app/Template/task/remove.php +++ b/app/Template/task/remove.php @@ -8,8 +8,8 @@ </p> <div class="form-actions"> - <?= $this->a(t('Yes'), 'task', 'remove', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'confirmation' => 'yes'), true, 'btn btn-red') ?> + <?= $this->url->link(t('Yes'), 'task', 'remove', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'confirmation' => 'yes'), 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>
\ No newline at end of file diff --git a/app/Template/task/show.php b/app/Template/task/show.php index 5aa352a6..54c124f6 100644 --- a/app/Template/task/show.php +++ b/app/Template/task/show.php @@ -1,9 +1,9 @@ <?= $this->render('task/details', array( 'task' => $task, 'project' => $project, - 'recurrence_trigger_list' => $this->task->getRecurrenceTriggerList(), - 'recurrence_timeframe_list' => $this->task->getRecurrenceTimeframeList(), - 'recurrence_basedate_list' => $this->task->getRecurrenceBasedateList(), + 'recurrence_trigger_list' => $this->task->recurrenceTriggers(), + 'recurrence_timeframe_list' => $this->task->recurrenceTimeframes(), + 'recurrence_basedate_list' => $this->task->recurrenceBasedates(), )) ?> <?= $this->render('task/time', array('task' => $task, 'values' => $values, 'date_format' => $date_format, 'date_formats' => $date_formats)) ?> diff --git a/app/Template/task/show_description.php b/app/Template/task/show_description.php index 3807ddd2..f823e7d6 100644 --- a/app/Template/task/show_description.php +++ b/app/Template/task/show_description.php @@ -6,7 +6,7 @@ <article class="markdown task-show-description"> <?php if (! isset($is_public)): ?> - <?= $this->markdown( + <?= $this->text->markdown( $task['description'], array( 'controller' => 'task', @@ -17,7 +17,7 @@ ) ) ?> <?php else: ?> - <?= $this->markdown( + <?= $this->text->markdown( $task['description'], array( 'controller' => 'task', diff --git a/app/Template/task/sidebar.php b/app/Template/task/sidebar.php index 7c82700a..bb137ac9 100644 --- a/app/Template/task/sidebar.php +++ b/app/Template/task/sidebar.php @@ -2,65 +2,65 @@ <h2><?= t('Information') ?></h2> <ul> <li> - <?= $this->a(t('Summary'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> + <?= $this->url->link(t('Summary'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> </li> <li> - <?= $this->a(t('Activity stream'), 'task', 'activites', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> + <?= $this->url->link(t('Activity stream'), 'task', 'activites', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> </li> <li> - <?= $this->a(t('Transitions'), 'task', 'transitions', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> + <?= $this->url->link(t('Transitions'), 'task', 'transitions', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> </li> <?php if ($task['time_estimated'] > 0 || $task['time_spent'] > 0): ?> <li> - <?= $this->a(t('Time tracking'), 'task', 'timesheet', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> + <?= $this->url->link(t('Time tracking'), 'task', 'timesheet', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> </li> <?php endif ?> </ul> <h2><?= t('Actions') ?></h2> <ul> <li> - <?= $this->a(t('Edit the task'), 'task', 'edit', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> + <?= $this->url->link(t('Edit the task'), 'task', 'edit', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> </li> <li> - <?= $this->a(t('Edit the description'), 'task', 'description', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> + <?= $this->url->link(t('Edit the description'), 'task', 'description', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> </li> <li> - <?= $this->a(t('Edit recurrence'), 'task', 'recurrence', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> + <?= $this->url->link(t('Edit recurrence'), 'task', 'recurrence', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> </li> <li> - <?= $this->a(t('Add a sub-task'), 'subtask', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> + <?= $this->url->link(t('Add a sub-task'), 'subtask', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> </li> <li> - <?= $this->a(t('Add a link'), 'tasklink', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> + <?= $this->url->link(t('Add a link'), 'tasklink', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> </li> <li> - <?= $this->a(t('Add a comment'), 'comment', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> + <?= $this->url->link(t('Add a comment'), 'comment', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> </li> <li> - <?= $this->a(t('Attach a document'), 'file', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> + <?= $this->url->link(t('Attach a document'), 'file', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> </li> <li> - <?= $this->a(t('Add a screenshot'), 'file', 'screenshot', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> + <?= $this->url->link(t('Add a screenshot'), 'file', 'screenshot', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> </li> <li> - <?= $this->a(t('Duplicate'), 'task', 'duplicate', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> + <?= $this->url->link(t('Duplicate'), 'task', 'duplicate', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> </li> <li> - <?= $this->a(t('Duplicate to another project'), 'task', 'copy', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> + <?= $this->url->link(t('Duplicate to another project'), 'task', 'copy', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> </li> <li> - <?= $this->a(t('Move to another project'), 'task', 'move', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> + <?= $this->url->link(t('Move to another project'), 'task', 'move', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> </li> <li> <?php if ($task['is_active'] == 1): ?> - <?= $this->a(t('Close this task'), 'task', 'close', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> + <?= $this->url->link(t('Close this task'), 'task', 'close', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> <?php else: ?> - <?= $this->a(t('Open this task'), 'task', 'open', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> + <?= $this->url->link(t('Open this task'), 'task', 'open', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> <?php endif ?> </li> - <?php if ($this->taskPermission->canRemoveTask($task)): ?> + <?php if ($this->task->canRemove($task)): ?> <li> - <?= $this->a(t('Remove'), 'task', 'remove', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> + <?= $this->url->link(t('Remove'), 'task', 'remove', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> </li> <?php endif ?> </ul> diff --git a/app/Template/task/table.php b/app/Template/task/table.php index 4ccf83b9..d06bc7b7 100644 --- a/app/Template/task/table.php +++ b/app/Template/task/table.php @@ -13,16 +13,16 @@ <?php foreach ($paginator->getCollection() as $task): ?> <tr> <td class="task-table color-<?= $task['color_id'] ?>"> - <?= $this->a('#'.$this->e($task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, '', t('View this task')) ?> + <?= $this->url->link('#'.$this->e($task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, '', t('View this task')) ?> </td> <td> - <?= $this->inList($task['column_id'], $columns) ?> + <?= $this->text->in($task['column_id'], $columns) ?> </td> <td> - <?= $this->inList($task['category_id'], $categories, '') ?> + <?= $this->text->in($task['category_id'], $categories, '') ?> </td> <td> - <?= $this->a($this->e($task['title']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, '', t('View this task')) ?> + <?= $this->url->link($this->e($task['title']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, '', t('View this task')) ?> </td> <td> <?php if ($task['assignee_username']): ?> diff --git a/app/Template/task/time.php b/app/Template/task/time.php index 4aeddc70..6682a08d 100644 --- a/app/Template/task/time.php +++ b/app/Template/task/time.php @@ -1,15 +1,15 @@ -<form method="post" action="<?= $this->u('task', 'time', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>" class="form-inline task-time-form" autocomplete="off"> - <?= $this->formCsrf() ?> - <?= $this->formHidden('id', $values) ?> +<form method="post" action="<?= $this->url->href('task', 'time', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>" class="form-inline task-time-form" autocomplete="off"> + <?= $this->form->csrf() ?> + <?= $this->form->hidden('id', $values) ?> - <?= $this->formLabel(t('Start date'), 'date_started') ?> - <?= $this->formText('date_started', $values, array(), array('placeholder="'.$this->inList($date_format, $date_formats).'"'), 'form-date') ?> + <?= $this->form->label(t('Start date'), 'date_started') ?> + <?= $this->form->text('date_started', $values, array(), array('placeholder="'.$this->text->in($date_format, $date_formats).'"'), 'form-date') ?> - <?= $this->formLabel(t('Time estimated'), 'time_estimated') ?> - <?= $this->formNumeric('time_estimated', $values, array(), array('placeholder="'.t('hours').'"')) ?> + <?= $this->form->label(t('Time estimated'), 'time_estimated') ?> + <?= $this->form->numeric('time_estimated', $values, array(), array('placeholder="'.t('hours').'"')) ?> - <?= $this->formLabel(t('Time spent'), 'time_spent') ?> - <?= $this->formNumeric('time_spent', $values, array(), array('placeholder="'.t('hours').'"')) ?> + <?= $this->form->label(t('Time spent'), 'time_spent') ?> + <?= $this->form->numeric('time_spent', $values, array(), array('placeholder="'.t('hours').'"')) ?> <input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/> </form>
\ No newline at end of file diff --git a/app/Template/task/time_tracking.php b/app/Template/task/time_tracking.php index 55d33e5e..441cb585 100644 --- a/app/Template/task/time_tracking.php +++ b/app/Template/task/time_tracking.php @@ -14,7 +14,7 @@ </tr> <?php foreach ($subtask_paginator->getCollection() as $record): ?> <tr> - <td><?= $this->a($this->e($record['user_fullname'] ?: $record['username']), 'user', 'show', array('user_id' => $record['user_id'])) ?></td> + <td><?= $this->url->link($this->e($record['user_fullname'] ?: $record['username']), 'user', 'show', array('user_id' => $record['user_id'])) ?></td> <td><?= t($record['subtask_title']) ?></td> <td><?= dt('%B %e, %Y at %k:%M %p', $record['start']) ?></td> <td><?= dt('%B %e, %Y at %k:%M %p', $record['end']) ?></td> diff --git a/app/Template/task/transitions.php b/app/Template/task/transitions.php index 2f45eb39..6455fd66 100644 --- a/app/Template/task/transitions.php +++ b/app/Template/task/transitions.php @@ -18,7 +18,7 @@ <td><?= dt('%B %e, %Y at %k:%M %p', $transition['date']) ?></td> <td><?= $this->e($transition['src_column']) ?></td> <td><?= $this->e($transition['dst_column']) ?></td> - <td><?= $this->a($this->e($transition['name'] ?: $transition['username']), 'user', 'show', array('user_id' => $transition['user_id'])) ?></td> + <td><?= $this->url->link($this->e($transition['name'] ?: $transition['username']), 'user', 'show', array('user_id' => $transition['user_id'])) ?></td> <td><?= n(round($transition['time_spent'] / 3600, 2)).' '.t('hours') ?></td> </tr> <?php endforeach ?> |