summaryrefslogtreecommitdiff
path: root/app/Template
diff options
context:
space:
mode:
Diffstat (limited to 'app/Template')
-rw-r--r--app/Template/action/event.php14
-rw-r--r--app/Template/action/index.php40
-rw-r--r--app/Template/action/params.php48
-rw-r--r--app/Template/action/remove.php6
-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
-rw-r--r--app/Template/app/dashboard.php18
-rw-r--r--app/Template/app/projects.php12
-rw-r--r--app/Template/app/subtasks.php8
-rw-r--r--app/Template/app/tasks.php6
-rw-r--r--app/Template/auth/index.php18
-rw-r--r--app/Template/board/assignee.php14
-rw-r--r--app/Template/board/category.php14
-rw-r--r--app/Template/board/comments.php2
-rw-r--r--app/Template/board/description.php2
-rw-r--r--app/Template/board/files.php8
-rw-r--r--app/Template/board/filters.php22
-rw-r--r--app/Template/board/show.php6
-rw-r--r--app/Template/board/subtasks.php4
-rw-r--r--app/Template/board/swimlane.php4
-rw-r--r--app/Template/board/task_footer.php22
-rw-r--r--app/Template/board/task_menu.php18
-rw-r--r--app/Template/board/task_private.php14
-rw-r--r--app/Template/board/task_public.php4
-rw-r--r--app/Template/board/tasklinks.php2
-rw-r--r--app/Template/budget/breakdown.php10
-rw-r--r--app/Template/budget/create.php26
-rw-r--r--app/Template/budget/index.php8
-rw-r--r--app/Template/budget/remove.php4
-rw-r--r--app/Template/calendar/show.php12
-rw-r--r--app/Template/calendar/sidebar.php12
-rw-r--r--app/Template/category/edit.php16
-rw-r--r--app/Template/category/index.php14
-rw-r--r--app/Template/category/remove.php4
-rw-r--r--app/Template/column/edit.php20
-rw-r--r--app/Template/column/index.php28
-rw-r--r--app/Template/column/remove.php4
-rw-r--r--app/Template/comment/create.php14
-rw-r--r--app/Template/comment/edit.php14
-rw-r--r--app/Template/comment/remove.php4
-rw-r--r--app/Template/comment/show.php12
-rw-r--r--app/Template/config/about.php6
-rw-r--r--app/Template/config/api.php4
-rw-r--r--app/Template/config/application.php24
-rw-r--r--app/Template/config/board.php16
-rw-r--r--app/Template/config/calendar.php12
-rw-r--r--app/Template/config/integrations.php58
-rw-r--r--app/Template/config/project.php16
-rw-r--r--app/Template/config/sidebar.php20
-rw-r--r--app/Template/config/webhook.php12
-rw-r--r--app/Template/currency/index.php20
-rw-r--r--app/Template/event/comment_create.php6
-rw-r--r--app/Template/event/comment_update.php4
-rw-r--r--app/Template/event/events.php6
-rw-r--r--app/Template/event/subtask_create.php4
-rw-r--r--app/Template/event/subtask_update.php4
-rw-r--r--app/Template/event/task_assignee_change.php6
-rw-r--r--app/Template/event/task_close.php4
-rw-r--r--app/Template/event/task_create.php4
-rw-r--r--app/Template/event/task_move_column.php4
-rw-r--r--app/Template/event/task_move_position.php4
-rw-r--r--app/Template/event/task_open.php4
-rw-r--r--app/Template/event/task_update.php4
-rw-r--r--app/Template/export/subtasks.php14
-rw-r--r--app/Template/export/summary.php14
-rw-r--r--app/Template/export/tasks.php14
-rw-r--r--app/Template/export/transitions.php14
-rw-r--r--app/Template/file/new.php8
-rw-r--r--app/Template/file/open.php2
-rw-r--r--app/Template/file/remove.php4
-rw-r--r--app/Template/file/screenshot.php6
-rw-r--r--app/Template/file/show.php18
-rw-r--r--app/Template/hourlyrate/index.php20
-rw-r--r--app/Template/hourlyrate/remove.php4
-rw-r--r--app/Template/layout.php34
-rw-r--r--app/Template/link/create.php12
-rw-r--r--app/Template/link/edit.php16
-rw-r--r--app/Template/link/index.php4
-rw-r--r--app/Template/link/remove.php4
-rw-r--r--app/Template/notification/comment_creation.php2
-rw-r--r--app/Template/notification/comment_update.php2
-rw-r--r--app/Template/notification/footer.php2
-rw-r--r--app/Template/notification/task_assignee_change.php2
-rw-r--r--app/Template/notification/task_creation.php2
-rw-r--r--app/Template/notification/task_due.php2
-rw-r--r--app/Template/notification/task_update.php2
-rw-r--r--app/Template/project/activity.php10
-rw-r--r--app/Template/project/disable.php4
-rw-r--r--app/Template/project/duplicate.php14
-rw-r--r--app/Template/project/edit.php22
-rw-r--r--app/Template/project/enable.php4
-rw-r--r--app/Template/project/feed.php10
-rw-r--r--app/Template/project/index.php14
-rw-r--r--app/Template/project/integrations.php56
-rw-r--r--app/Template/project/layout.php4
-rw-r--r--app/Template/project/new.php14
-rw-r--r--app/Template/project/remove.php4
-rw-r--r--app/Template/project/search.php16
-rw-r--r--app/Template/project/share.php10
-rw-r--r--app/Template/project/show.php12
-rw-r--r--app/Template/project/sidebar.php44
-rw-r--r--app/Template/project/tasks.php8
-rw-r--r--app/Template/project/users.php24
-rw-r--r--app/Template/subtask/create.php22
-rw-r--r--app/Template/subtask/edit.php26
-rw-r--r--app/Template/subtask/remove.php4
-rw-r--r--app/Template/subtask/restriction_change_status.php10
-rw-r--r--app/Template/subtask/show.php20
-rw-r--r--app/Template/swimlane/edit.php12
-rw-r--r--app/Template/swimlane/index.php22
-rw-r--r--app/Template/swimlane/remove.php4
-rw-r--r--app/Template/swimlane/table.php12
-rw-r--r--app/Template/task/close.php4
-rw-r--r--app/Template/task/details.php2
-rw-r--r--app/Template/task/duplicate.php4
-rw-r--r--app/Template/task/duplicate_project.php12
-rw-r--r--app/Template/task/edit.php40
-rw-r--r--app/Template/task/edit_description.php12
-rw-r--r--app/Template/task/edit_recurrence.php32
-rw-r--r--app/Template/task/layout.php4
-rw-r--r--app/Template/task/move_project.php12
-rw-r--r--app/Template/task/new.php52
-rw-r--r--app/Template/task/open.php4
-rw-r--r--app/Template/task/public.php2
-rw-r--r--app/Template/task/recurring_info.php4
-rw-r--r--app/Template/task/remove.php4
-rw-r--r--app/Template/task/show.php6
-rw-r--r--app/Template/task/show_description.php4
-rw-r--r--app/Template/task/sidebar.php38
-rw-r--r--app/Template/task/table.php8
-rw-r--r--app/Template/task/time.php18
-rw-r--r--app/Template/task/time_tracking.php2
-rw-r--r--app/Template/task/transitions.php2
-rw-r--r--app/Template/tasklink/create.php22
-rw-r--r--app/Template/tasklink/edit.php22
-rw-r--r--app/Template/tasklink/remove.php4
-rw-r--r--app/Template/tasklink/show.php24
-rw-r--r--app/Template/timetable/index.php22
-rw-r--r--app/Template/timetable_day/index.php16
-rw-r--r--app/Template/timetable_day/remove.php4
-rw-r--r--app/Template/timetable_extra/index.php26
-rw-r--r--app/Template/timetable_extra/remove.php4
-rw-r--r--app/Template/timetable_off/index.php26
-rw-r--r--app/Template/timetable_off/remove.php4
-rw-r--r--app/Template/timetable_week/index.php22
-rw-r--r--app/Template/timetable_week/remove.php4
-rw-r--r--app/Template/twofactor/check.php8
-rw-r--r--app/Template/twofactor/disable.php4
-rw-r--r--app/Template/twofactor/index.php14
-rw-r--r--app/Template/user/calendar.php4
-rw-r--r--app/Template/user/edit.php40
-rw-r--r--app/Template/user/external.php12
-rw-r--r--app/Template/user/index.php8
-rw-r--r--app/Template/user/last.php2
-rw-r--r--app/Template/user/layout.php6
-rw-r--r--app/Template/user/new.php42
-rw-r--r--app/Template/user/notifications.php10
-rw-r--r--app/Template/user/password.php20
-rw-r--r--app/Template/user/remove.php4
-rw-r--r--app/Template/user/sessions.php4
-rw-r--r--app/Template/user/share.php6
-rw-r--r--app/Template/user/show.php6
-rw-r--r--app/Template/user/sidebar.php46
-rw-r--r--app/Template/user/timesheet.php4
168 files changed, 1051 insertions, 1055 deletions
diff --git a/app/Template/action/event.php b/app/Template/action/event.php
index 67a65c19..7f968a97 100644
--- a/app/Template/action/event.php
+++ b/app/Template/action/event.php
@@ -3,15 +3,15 @@
</div>
<h3><?= t('Choose an event') ?></h3>
-<form method="post" action="<?= $this->u('action', 'params', array('project_id' => $project['id'])) ?>">
+<form method="post" action="<?= $this->url->href('action', 'params', array('project_id' => $project['id'])) ?>">
- <?= $this->formCsrf() ?>
+ <?= $this->form->csrf() ?>
- <?= $this->formHidden('project_id', $values) ?>
- <?= $this->formHidden('action_name', $values) ?>
+ <?= $this->form->hidden('project_id', $values) ?>
+ <?= $this->form->hidden('action_name', $values) ?>
- <?= $this->formLabel(t('Event'), 'event_name') ?>
- <?= $this->formSelect('event_name', $events, $values) ?><br/>
+ <?= $this->form->label(t('Event'), 'event_name') ?>
+ <?= $this->form->select('event_name', $events, $values) ?><br/>
<div class="form-help">
<?= t('When the selected event occurs execute the corresponding action.') ?>
@@ -20,6 +20,6 @@
<div class="form-actions">
<input type="submit" value="<?= t('Next step') ?>" class="btn btn-blue"/>
<?= t('or') ?>
- <?= $this->a(t('cancel'), 'action', 'index', array('project_id' => $project['id'])) ?>
+ <?= $this->url->link(t('cancel'), 'action', 'index', array('project_id' => $project['id'])) ?>
</div>
</form> \ No newline at end of file
diff --git a/app/Template/action/index.php b/app/Template/action/index.php
index e388fbc9..9e98554c 100644
--- a/app/Template/action/index.php
+++ b/app/Template/action/index.php
@@ -15,25 +15,25 @@
<?php foreach ($actions as $action): ?>
<tr>
- <td><?= $this->inList($action['event_name'], $available_events) ?></td>
- <td><?= $this->inList($action['action_name'], $available_actions) ?></td>
+ <td><?= $this->text->in($action['event_name'], $available_events) ?></td>
+ <td><?= $this->text->in($action['action_name'], $available_actions) ?></td>
<td>
<ul>
<?php foreach ($action['params'] as $param): ?>
<li>
- <?= $this->inList($param['name'], $available_params) ?> =
+ <?= $this->text->in($param['name'], $available_params) ?> =
<strong>
- <?php if ($this->contains($param['name'], 'column_id')): ?>
- <?= $this->inList($param['value'], $columns_list) ?>
- <?php elseif ($this->contains($param['name'], 'user_id')): ?>
- <?= $this->inList($param['value'], $users_list) ?>
- <?php elseif ($this->contains($param['name'], 'project_id')): ?>
- <?= $this->inList($param['value'], $projects_list) ?>
- <?php elseif ($this->contains($param['name'], 'color_id')): ?>
- <?= $this->inList($param['value'], $colors_list) ?>
- <?php elseif ($this->contains($param['name'], 'category_id')): ?>
- <?= $this->inList($param['value'], $categories_list) ?>
- <?php elseif ($this->contains($param['name'], 'label')): ?>
+ <?php if ($this->text->contains($param['name'], 'column_id')): ?>
+ <?= $this->text->in($param['value'], $columns_list) ?>
+ <?php elseif ($this->text->contains($param['name'], 'user_id')): ?>
+ <?= $this->text->in($param['value'], $users_list) ?>
+ <?php elseif ($this->text->contains($param['name'], 'project_id')): ?>
+ <?= $this->text->in($param['value'], $projects_list) ?>
+ <?php elseif ($this->text->contains($param['name'], 'color_id')): ?>
+ <?= $this->text->in($param['value'], $colors_list) ?>
+ <?php elseif ($this->text->contains($param['name'], 'category_id')): ?>
+ <?= $this->text->in($param['value'], $categories_list) ?>
+ <?php elseif ($this->text->contains($param['name'], 'label')): ?>
<?= $this->e($param['value']) ?>
<?php endif ?>
</strong>
@@ -42,7 +42,7 @@
</ul>
</td>
<td>
- <?= $this->a(t('Remove'), 'action', 'confirm', array('project_id' => $project['id'], 'action_id' => $action['id'])) ?>
+ <?= $this->url->link(t('Remove'), 'action', 'confirm', array('project_id' => $project['id'], 'action_id' => $action['id'])) ?>
</td>
</tr>
<?php endforeach ?>
@@ -51,12 +51,12 @@
<?php endif ?>
<h3><?= t('Add an action') ?></h3>
-<form method="post" action="<?= $this->u('action', 'event', array('project_id' => $project['id'])) ?>" class="listing">
- <?= $this->formCsrf() ?>
- <?= $this->formHidden('project_id', $values) ?>
+<form method="post" action="<?= $this->url->href('action', 'event', array('project_id' => $project['id'])) ?>" class="listing">
+ <?= $this->form->csrf() ?>
+ <?= $this->form->hidden('project_id', $values) ?>
- <?= $this->formLabel(t('Action'), 'action_name') ?>
- <?= $this->formSelect('action_name', $available_actions, $values) ?><br/>
+ <?= $this->form->label(t('Action'), 'action_name') ?>
+ <?= $this->form->select('action_name', $available_actions, $values) ?><br/>
<div class="form-actions">
<input type="submit" value="<?= t('Next step') ?>" class="btn btn-blue"/>
diff --git a/app/Template/action/params.php b/app/Template/action/params.php
index 3a5ecb86..685cbcc5 100644
--- a/app/Template/action/params.php
+++ b/app/Template/action/params.php
@@ -3,34 +3,34 @@
</div>
<h3><?= t('Define action parameters') ?></h3>
-<form method="post" action="<?= $this->u('action', 'create', array('project_id' => $project['id'])) ?>" autocomplete="off">
+<form method="post" action="<?= $this->url->href('action', 'create', array('project_id' => $project['id'])) ?>" autocomplete="off">
- <?= $this->formCsrf() ?>
+ <?= $this->form->csrf() ?>
- <?= $this->formHidden('project_id', $values) ?>
- <?= $this->formHidden('event_name', $values) ?>
- <?= $this->formHidden('action_name', $values) ?>
+ <?= $this->form->hidden('project_id', $values) ?>
+ <?= $this->form->hidden('event_name', $values) ?>
+ <?= $this->form->hidden('action_name', $values) ?>
<?php foreach ($action_params as $param_name => $param_desc): ?>
- <?php if ($this->contains($param_name, 'column_id')): ?>
- <?= $this->formLabel($param_desc, $param_name) ?>
- <?= $this->formSelect('params['.$param_name.']', $columns_list, $values) ?><br/>
- <?php elseif ($this->contains($param_name, 'user_id')): ?>
- <?= $this->formLabel($param_desc, $param_name) ?>
- <?= $this->formSelect('params['.$param_name.']', $users_list, $values) ?><br/>
- <?php elseif ($this->contains($param_name, 'project_id')): ?>
- <?= $this->formLabel($param_desc, $param_name) ?>
- <?= $this->formSelect('params['.$param_name.']', $projects_list, $values) ?><br/>
- <?php elseif ($this->contains($param_name, 'color_id')): ?>
- <?= $this->formLabel($param_desc, $param_name) ?>
- <?= $this->formSelect('params['.$param_name.']', $colors_list, $values) ?><br/>
- <?php elseif ($this->contains($param_name, 'category_id')): ?>
- <?= $this->formLabel($param_desc, $param_name) ?>
- <?= $this->formSelect('params['.$param_name.']', $categories_list, $values) ?><br/>
- <?php elseif ($this->contains($param_name, 'label')): ?>
- <?= $this->formLabel($param_desc, $param_name) ?>
- <?= $this->formText('params['.$param_name.']', $values) ?>
+ <?php if ($this->text->contains($param_name, 'column_id')): ?>
+ <?= $this->form->label($param_desc, $param_name) ?>
+ <?= $this->form->select('params['.$param_name.']', $columns_list, $values) ?><br/>
+ <?php elseif ($this->text->contains($param_name, 'user_id')): ?>
+ <?= $this->form->label($param_desc, $param_name) ?>
+ <?= $this->form->select('params['.$param_name.']', $users_list, $values) ?><br/>
+ <?php elseif ($this->text->contains($param_name, 'project_id')): ?>
+ <?= $this->form->label($param_desc, $param_name) ?>
+ <?= $this->form->select('params['.$param_name.']', $projects_list, $values) ?><br/>
+ <?php elseif ($this->text->contains($param_name, 'color_id')): ?>
+ <?= $this->form->label($param_desc, $param_name) ?>
+ <?= $this->form->select('params['.$param_name.']', $colors_list, $values) ?><br/>
+ <?php elseif ($this->text->contains($param_name, 'category_id')): ?>
+ <?= $this->form->label($param_desc, $param_name) ?>
+ <?= $this->form->select('params['.$param_name.']', $categories_list, $values) ?><br/>
+ <?php elseif ($this->text->contains($param_name, 'label')): ?>
+ <?= $this->form->label($param_desc, $param_name) ?>
+ <?= $this->form->text('params['.$param_name.']', $values) ?>
<?php endif ?>
<?php endforeach ?>
@@ -38,6 +38,6 @@
<div class="form-actions">
<input type="submit" value="<?= t('Save this action') ?>" class="btn btn-blue"/>
<?= t('or') ?>
- <?= $this->a(t('cancel'), 'action', 'index', array('project_id' => $project['id'])) ?>
+ <?= $this->url->link(t('cancel'), 'action', 'index', array('project_id' => $project['id'])) ?>
</div>
</form> \ No newline at end of file
diff --git a/app/Template/action/remove.php b/app/Template/action/remove.php
index 672c08a7..c8d4dfe4 100644
--- a/app/Template/action/remove.php
+++ b/app/Template/action/remove.php
@@ -4,12 +4,12 @@
<div class="confirm">
<p class="alert alert-info">
- <?= t('Do you really want to remove this action: "%s"?', $this->inList($action['event_name'], $available_events).'/'.$this->inList($action['action_name'], $available_actions)) ?>
+ <?= t('Do you really want to remove this action: "%s"?', $this->text->in($action['event_name'], $available_events).'/'.$this->text->in($action['action_name'], $available_actions)) ?>
</p>
<div class="form-actions">
- <?= $this->a(t('Yes'), 'action', 'remove', array('project_id' => $project['id'], 'action_id' => $action['id']), true, 'btn btn-red') ?>
+ <?= $this->url->link(t('Yes'), 'action', 'remove', array('project_id' => $project['id'], 'action_id' => $action['id']), true, 'btn btn-red') ?>
<?= t('or') ?>
- <?= $this->a(t('cancel'), 'action', 'index', array('project_id' => $project['id'])) ?>
+ <?= $this->url->link(t('cancel'), 'action', 'index', array('project_id' => $project['id'])) ?>
</div>
</div> \ No newline at end of file
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>
diff --git a/app/Template/app/dashboard.php b/app/Template/app/dashboard.php
index a832345b..faf49ef5 100644
--- a/app/Template/app/dashboard.php
+++ b/app/Template/app/dashboard.php
@@ -1,14 +1,14 @@
<section id="main">
<div class="page-header page-header-mobile">
<ul>
- <?php if ($this->userSession->isAdmin()): ?>
- <li><i class="fa fa-plus fa-fw"></i><?= $this->a(t('New project'), 'project', 'create') ?></li>
+ <?php if ($this->user->isAdmin()): ?>
+ <li><i class="fa fa-plus fa-fw"></i><?= $this->url->link(t('New project'), 'project', 'create') ?></li>
<?php endif ?>
- <li><i class="fa fa-lock fa-fw"></i><?= $this->a(t('New private project'), 'project', 'create', array('private' => 1)) ?></li>
- <li><i class="fa fa-folder fa-fw"></i><?= $this->a(t('Project management'), 'project', 'index') ?></li>
- <?php if ($this->userSession->isAdmin()): ?>
- <li><i class="fa fa-user fa-fw"></i><?= $this->a(t('User management'), 'user', 'index') ?></li>
- <li><i class="fa fa-cog fa-fw"></i><?= $this->a(t('Settings'), 'config', 'index') ?></li>
+ <li><i class="fa fa-lock fa-fw"></i><?= $this->url->link(t('New private project'), 'project', 'create', array('private' => 1)) ?></li>
+ <li><i class="fa fa-folder fa-fw"></i><?= $this->url->link(t('Project management'), 'project', 'index') ?></li>
+ <?php if ($this->user->isAdmin()): ?>
+ <li><i class="fa fa-user fa-fw"></i><?= $this->url->link(t('User management'), 'user', 'index') ?></li>
+ <li><i class="fa fa-cog fa-fw"></i><?= $this->url->link(t('Settings'), 'config', 'index') ?></li>
<?php endif ?>
<li>
<span class="dropdown">
@@ -45,9 +45,9 @@
<div class="dashboard-right-column">
<div id="dashboard-calendar">
<div id="user-calendar"
- data-check-url="<?= $this->u('calendar', 'user') ?>"
+ data-check-url="<?= $this->url->href('calendar', 'user') ?>"
data-user-id="<?= $user_id ?>"
- data-save-url="<?= $this->u('calendar', 'save') ?>"
+ data-save-url="<?= $this->url->href('calendar', 'save') ?>"
>
</div>
</div>
diff --git a/app/Template/app/projects.php b/app/Template/app/projects.php
index b2744644..90e6e67d 100644
--- a/app/Template/app/projects.php
+++ b/app/Template/app/projects.php
@@ -11,18 +11,18 @@
<?php foreach ($paginator->getCollection() as $project): ?>
<tr>
<td>
- <?= $this->a('#'.$project['id'], 'board', 'show', array('project_id' => $project['id']), false, 'dashboard-table-link') ?>
+ <?= $this->url->link('#'.$project['id'], 'board', 'show', array('project_id' => $project['id']), false, 'dashboard-table-link') ?>
</td>
<td>
- <?php if ($this->isManager($project['id'])): ?>
- <?= $this->a('<i class="fa fa-cog"></i>', 'project', 'show', array('project_id' => $project['id']), false, 'dashboard-table-link', t('Settings')) ?>&nbsp;
+ <?php if ($this->user->isManager($project['id'])): ?>
+ <?= $this->url->link('<i class="fa fa-cog"></i>', 'project', 'show', array('project_id' => $project['id']), false, 'dashboard-table-link', t('Settings')) ?>&nbsp;
<?php endif ?>
- <?= $this->a('<i class="fa fa-calendar"></i>', 'calendar', 'show', array('project_id' => $project['id']), false, 'dashboard-table-link', t('Calendar')) ?>&nbsp;
+ <?= $this->url->link('<i class="fa fa-calendar"></i>', 'calendar', 'show', array('project_id' => $project['id']), false, 'dashboard-table-link', t('Calendar')) ?>&nbsp;
- <?= $this->a($this->e($project['name']), 'board', 'show', array('project_id' => $project['id'])) ?>
+ <?= $this->url->link($this->e($project['name']), 'board', 'show', array('project_id' => $project['id'])) ?>
<?php if (! empty($project['description'])): ?>
- <span class="column-tooltip" title='<?= $this->e($this->markdown($project['description'])) ?>'>
+ <span class="column-tooltip" title='<?= $this->e($this->text->markdown($project['description'])) ?>'>
<i class="fa fa-info-circle"></i>
</span>
<?php endif ?>
diff --git a/app/Template/app/subtasks.php b/app/Template/app/subtasks.php
index 487b66fc..5afb71b0 100644
--- a/app/Template/app/subtasks.php
+++ b/app/Template/app/subtasks.php
@@ -13,16 +13,16 @@
<?php foreach ($paginator->getCollection() as $subtask): ?>
<tr>
<td class="task-table color-<?= $subtask['color_id'] ?>">
- <?= $this->a('#'.$subtask['task_id'], 'task', 'show', array('task_id' => $subtask['task_id'], 'project_id' => $subtask['project_id'])) ?>
+ <?= $this->url->link('#'.$subtask['task_id'], 'task', 'show', array('task_id' => $subtask['task_id'], 'project_id' => $subtask['project_id'])) ?>
</td>
<td>
- <?= $this->a($this->e($subtask['project_name']), 'board', 'show', array('project_id' => $subtask['project_id'])) ?>
+ <?= $this->url->link($this->e($subtask['project_name']), 'board', 'show', array('project_id' => $subtask['project_id'])) ?>
</td>
<td>
- <?= $this->a($this->e($subtask['task_name']), 'task', 'show', array('task_id' => $subtask['task_id'], 'project_id' => $subtask['project_id'])) ?>
+ <?= $this->url->link($this->e($subtask['task_name']), 'task', 'show', array('task_id' => $subtask['task_id'], 'project_id' => $subtask['project_id'])) ?>
</td>
<td>
- <?= $this->toggleSubtaskStatus($subtask, 'dashboard') ?>
+ <?= $this->subtask->toggleStatus($subtask, 'dashboard') ?>
</td>
<td>
<?php if (! empty($subtask['time_spent'])): ?>
diff --git a/app/Template/app/tasks.php b/app/Template/app/tasks.php
index 9987ff48..f05c63ef 100644
--- a/app/Template/app/tasks.php
+++ b/app/Template/app/tasks.php
@@ -13,13 +13,13 @@
<?php foreach ($paginator->getCollection() as $task): ?>
<tr>
<td class="task-table color-<?= $task['color_id'] ?>">
- <?= $this->a('#'.$task['id'], 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
+ <?= $this->url->link('#'.$task['id'], 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
</td>
<td>
- <?= $this->a($this->e($task['project_name']), 'board', 'show', array('project_id' => $task['project_id'])) ?>
+ <?= $this->url->link($this->e($task['project_name']), 'board', 'show', array('project_id' => $task['project_id'])) ?>
</td>
<td>
- <?= $this->a($this->e($task['title']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
+ <?= $this->url->link($this->e($task['title']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
</td>
<td>
<?php if (! empty($task['time_spent'])): ?>
diff --git a/app/Template/auth/index.php b/app/Template/auth/index.php
index b35b1253..8801a512 100644
--- a/app/Template/auth/index.php
+++ b/app/Template/auth/index.php
@@ -4,24 +4,24 @@
<p class="alert alert-error"><?= $this->e($errors['login']) ?></p>
<?php endif ?>
- <form method="post" action="<?= $this->u('auth', 'check', array('redirect_query' => $redirect_query)) ?>">
+ <form method="post" action="<?= $this->url->href('auth', 'check', array('redirect_query' => $redirect_query)) ?>">
- <?= $this->formCsrf() ?>
+ <?= $this->form->csrf() ?>
- <?= $this->formLabel(t('Username'), 'username') ?>
- <?= $this->formText('username', $values, $errors, array('autofocus', 'required')) ?><br/>
+ <?= $this->form->label(t('Username'), 'username') ?>
+ <?= $this->form->text('username', $values, $errors, array('autofocus', 'required')) ?><br/>
- <?= $this->formLabel(t('Password'), 'password') ?>
- <?= $this->formPassword('password', $values, $errors, array('required')) ?>
+ <?= $this->form->label(t('Password'), 'password') ?>
+ <?= $this->form->password('password', $values, $errors, array('required')) ?>
- <?= $this->formCheckbox('remember_me', t('Remember Me'), 1) ?><br/>
+ <?= $this->form->checkbox('remember_me', t('Remember Me'), 1) ?><br/>
<?php if (GOOGLE_AUTH): ?>
- <?= $this->a(t('Login with my Google Account'), 'user', 'google') ?>
+ <?= $this->url->link(t('Login with my Google Account'), 'user', 'google') ?>
<?php endif ?>
<?php if (GITHUB_AUTH): ?>
- <?= $this->a(t('Login with my GitHub Account'), 'user', 'gitHub') ?>
+ <?= $this->url->link(t('Login with my GitHub Account'), 'user', 'gitHub') ?>
<?php endif ?>
<div class="form-actions">
diff --git a/app/Template/board/assignee.php b/app/Template/board/assignee.php
index 453b3f2d..4af19cf7 100644
--- a/app/Template/board/assignee.php
+++ b/app/Template/board/assignee.php
@@ -1,20 +1,20 @@
<section id="main">
<section>
<h3><?= t('Change assignee for the task "%s"', $values['title']) ?></h3>
- <form method="post" action="<?= $this->u('board', 'updateAssignee', array('task_id' => $values['id'], 'project_id' => $values['project_id'])) ?>">
+ <form method="post" action="<?= $this->url->href('board', 'updateAssignee', array('task_id' => $values['id'], 'project_id' => $values['project_id'])) ?>">
- <?= $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('Assignee'), 'owner_id') ?>
- <?= $this->formSelect('owner_id', $users_list, $values, array(), array('autofocus')) ?><br/>
+ <?= $this->form->label(t('Assignee'), 'owner_id') ?>
+ <?= $this->form->select('owner_id', $users_list, $values, array(), array('autofocus')) ?><br/>
<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' => $project['id']), false, 'close-popover') ?>
+ <?= $this->url->link(t('cancel'), 'board', 'show', array('project_id' => $project['id']), false, 'close-popover') ?>
</div>
</form>
</section>
diff --git a/app/Template/board/category.php b/app/Template/board/category.php
index ee01ec5f..b38758d3 100644
--- a/app/Template/board/category.php
+++ b/app/Template/board/category.php
@@ -1,20 +1,20 @@
<section id="main">
<section>
<h3><?= t('Change category for the task "%s"', $values['title']) ?></h3>
- <form method="post" action="<?= $this->u('board', 'updateCategory', array('task_id' => $values['id'], 'project_id' => $values['project_id'])) ?>">
+ <form method="post" action="<?= $this->url->href('board', 'updateCategory', array('task_id' => $values['id'], 'project_id' => $values['project_id'])) ?>">
- <?= $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('Category'), 'category_id') ?>
- <?= $this->formSelect('category_id', $categories_list, $values) ?><br/>
+ <?= $this->form->label(t('Category'), 'category_id') ?>
+ <?= $this->form->select('category_id', $categories_list, $values) ?><br/>
<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' => $project['id']), false, 'close-popover') ?>
+ <?= $this->url->link(t('cancel'), 'board', 'show', array('project_id' => $project['id']), false, 'close-popover') ?>
</div>
</form>
</section>
diff --git a/app/Template/board/comments.php b/app/Template/board/comments.php
index 5424df78..75816af6 100644
--- a/app/Template/board/comments.php
+++ b/app/Template/board/comments.php
@@ -6,7 +6,7 @@
<div class="comment-inner">
<div class="markdown">
- <?= $this->markdown($comment['comment']) ?>
+ <?= $this->text->markdown($comment['comment']) ?>
</div>
</div>
<?php endforeach ?>
diff --git a/app/Template/board/description.php b/app/Template/board/description.php
index b38f5bf4..7e0e3430 100644
--- a/app/Template/board/description.php
+++ b/app/Template/board/description.php
@@ -1,5 +1,5 @@
<section class="tooltip-large">
<div class="markdown">
- <?= $this->markdown($task['description']) ?>
+ <?= $this->text->markdown($task['description']) ?>
</div>
</section> \ No newline at end of file
diff --git a/app/Template/board/files.php b/app/Template/board/files.php
index 851a118d..81136659 100644
--- a/app/Template/board/files.php
+++ b/app/Template/board/files.php
@@ -8,8 +8,8 @@
<?= $this->e($file['name']) ?>
</td>
<td>
- <i class="fa fa-download"></i> <?= $this->a(t('download'), 'file', 'download', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id'])) ?>
- <i class="fa fa-eye"></i> <?= $this->a(t('open'), 'file', 'open', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id']), false, 'popover') ?>
+ <i class="fa fa-download"></i> <?= $this->url->link(t('download'), 'file', 'download', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id'])) ?>
+ <i class="fa fa-eye"></i> <?= $this->url->link(t('open'), 'file', 'open', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id']), false, 'popover') ?>
</td>
</tr>
<?php endforeach ?>
@@ -18,11 +18,11 @@
<?php foreach ($files as $file): ?>
<tr>
<td>
- <i class="fa <?= $this->getFileIcon($file['name']) ?> fa-fw"></i>
+ <i class="fa <?= $this->file->icon($file['name']) ?> fa-fw"></i>
<?= $this->e($file['name']) ?>
</td>
<td>
- <i class="fa fa-download"></i> <?= $this->a(t('download'), 'file', 'download', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id'])) ?>
+ <i class="fa fa-download"></i> <?= $this->url->link(t('download'), 'file', 'download', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id'])) ?>
</td>
</tr>
<?php endforeach ?>
diff --git a/app/Template/board/filters.php b/app/Template/board/filters.php
index 147295b2..0617fb47 100644
--- a/app/Template/board/filters.php
+++ b/app/Template/board/filters.php
@@ -23,37 +23,37 @@
</li>
<li>
<i class="fa fa-search fa-fw"></i>
- <?= $this->a(t('Search'), 'project', 'search', array('project_id' => $project['id'])) ?>
+ <?= $this->url->link(t('Search'), 'project', 'search', array('project_id' => $project['id'])) ?>
</li>
<li>
<i class="fa fa-check-square-o fa-fw"></i>
- <?= $this->a(t('Completed tasks'), 'project', 'tasks', array('project_id' => $project['id'])) ?>
+ <?= $this->url->link(t('Completed tasks'), 'project', 'tasks', array('project_id' => $project['id'])) ?>
</li>
<li>
<i class="fa fa-dashboard fa-fw"></i>
- <?= $this->a(t('Activity'), 'project', 'activity', array('project_id' => $project['id'])) ?>
+ <?= $this->url->link(t('Activity'), 'project', 'activity', array('project_id' => $project['id'])) ?>
</li>
<li>
<i class="fa fa-calendar fa-fw"></i>
- <?= $this->a(t('Calendar'), 'calendar', 'show', array('project_id' => $project['id'])) ?>
+ <?= $this->url->link(t('Calendar'), 'calendar', 'show', array('project_id' => $project['id'])) ?>
</li>
<?php if ($project['is_public']): ?>
<li>
- <i class="fa fa-share-alt fa-fw"></i> <?= $this->a(t('Public link'), 'board', 'readonly', array('token' => $project['token']), false, '', '', true) ?>
+ <i class="fa fa-share-alt fa-fw"></i> <?= $this->url->link(t('Public link'), 'board', 'readonly', array('token' => $project['token']), false, '', '', true) ?>
</li>
<?php endif ?>
- <?php if ($this->acl->isManagerActionAllowed($project['id'])): ?>
+ <?php if ($this->user->isManager($project['id'])): ?>
<li>
<i class="fa fa-line-chart fa-fw"></i>
- <?= $this->a(t('Analytics'), 'analytic', 'tasks', array('project_id' => $project['id'])) ?>
+ <?= $this->url->link(t('Analytics'), 'analytic', 'tasks', array('project_id' => $project['id'])) ?>
</li>
<li>
<i class="fa fa-pie-chart fa-fw"></i>
- <?= $this->a(t('Budget'), 'budget', 'index', array('project_id' => $project['id'])) ?>
+ <?= $this->url->link(t('Budget'), 'budget', 'index', array('project_id' => $project['id'])) ?>
</li>
<li>
<i class="fa fa-cog fa-fw"></i>
- <?= $this->a(t('Configure'), 'project', 'show', array('project_id' => $project['id'])) ?>
+ <?= $this->url->link(t('Configure'), 'project', 'show', array('project_id' => $project['id'])) ?>
</li>
<?php endif ?>
</ul>
@@ -61,10 +61,10 @@
</span>
</li>
<li>
- <?= $this->formSelect('user_id', $users, array(), array(), array('data-placeholder="'.t('Filter by user').'"', 'data-notfound="'.t('No results match:').'"'), 'apply-filters chosen-select') ?>
+ <?= $this->form->select('user_id', $users, array(), array(), array('data-placeholder="'.t('Filter by user').'"', 'data-notfound="'.t('No results match:').'"'), 'apply-filters chosen-select') ?>
</li>
<li>
- <?= $this->formSelect('category_id', $categories, array(), array(), array('data-placeholder="'.t('Filter by category').'"', 'data-notfound="'.t('No results match:').'"'), 'apply-filters chosen-select') ?>
+ <?= $this->form->select('category_id', $categories, array(), array(), array('data-placeholder="'.t('Filter by category').'"', 'data-notfound="'.t('No results match:').'"'), 'apply-filters chosen-select') ?>
</li>
<li>
<select id="more-filters" multiple data-placeholder="<?= t('More filters') ?>" data-notfound="<?= t('No results match:') ?>" class="apply-filters hide-mobile">
diff --git a/app/Template/board/show.php b/app/Template/board/show.php
index 8ee7861b..3b10d82c 100644
--- a/app/Template/board/show.php
+++ b/app/Template/board/show.php
@@ -6,9 +6,9 @@
class="board-project-<?= $project['id'] ?>"
data-project-id="<?= $project['id'] ?>"
data-check-interval="<?= $board_private_refresh_interval ?>"
- data-save-url="<?= $this->u('board', 'save', array('project_id' => $project['id'])) ?>"
- data-check-url="<?= $this->u('board', 'check', array('project_id' => $project['id'], 'timestamp' => time())) ?>"
- data-task-creation-url="<?= $this->u('task', 'create', array('project_id' => $project['id'])) ?>"
+ data-save-url="<?= $this->url->href('board', 'save', array('project_id' => $project['id'])) ?>"
+ data-check-url="<?= $this->url->href('board', 'check', array('project_id' => $project['id'], 'timestamp' => time())) ?>"
+ data-task-creation-url="<?= $this->url->href('task', 'create', array('project_id' => $project['id'])) ?>"
>
<?php endif ?>
diff --git a/app/Template/board/subtasks.php b/app/Template/board/subtasks.php
index 18f7f9da..950da925 100644
--- a/app/Template/board/subtasks.php
+++ b/app/Template/board/subtasks.php
@@ -1,7 +1,7 @@
<section id="tooltip-subtasks">
<?php foreach ($subtasks as $subtask): ?>
- <?= $this->toggleSubtaskStatus($subtask, 'board') ?>
- <?= $this->e(empty($subtask['username']) ? '' : ' ['.$this->getFullname($subtask).']') ?>
+ <?= $this->subtask->toggleStatus($subtask, 'board') ?>
+ <?= $this->e(empty($subtask['username']) ? '' : ' ['.$this->user->getFullname($subtask).']') ?>
<br/>
<?php endforeach ?>
</section>
diff --git a/app/Template/board/swimlane.php b/app/Template/board/swimlane.php
index c7bd8b5b..a7741f8d 100644
--- a/app/Template/board/swimlane.php
+++ b/app/Template/board/swimlane.php
@@ -21,14 +21,14 @@
<th class="board-column">
<?php if (! $not_editable): ?>
<div class="board-add-icon">
- <?= $this->a('+', 'task', 'create', array('project_id' => $column['project_id'], 'column_id' => $column['id'], 'swimlane_id' => $swimlane['id']), false, 'task-board-popover', t('Add a new task')) ?>
+ <?= $this->url->link('+', 'task', 'create', array('project_id' => $column['project_id'], 'column_id' => $column['id'], 'swimlane_id' => $swimlane['id']), false, 'task-board-popover', t('Add a new task')) ?>
</div>
<?php endif ?>
<?= $this->e($column['title']) ?>
<?php if (! $not_editable && ! empty($column['description'])): ?>
- <span class="column-tooltip pull-right" title='<?= $this->e($this->markdown($column['description'])) ?>'>
+ <span class="column-tooltip pull-right" title='<?= $this->e($this->text->markdown($column['description'])) ?>'>
<i class="fa fa-info-circle"></i>
</span>
<?php endif ?>
diff --git a/app/Template/board/task_footer.php b/app/Template/board/task_footer.php
index 0ea0f5fa..5945d5af 100644
--- a/app/Template/board/task_footer.php
+++ b/app/Template/board/task_footer.php
@@ -2,16 +2,16 @@
<div class="task-board-category-container">
<span class="task-board-category">
<?php if ($not_editable): ?>
- <?= $this->inList($task['category_id'], $categories_listing) ?>
+ <?= $this->text->in($task['category_id'], $categories_listing) ?>
<?php else: ?>
- <?= $this->a(
- $this->inList($task['category_id'], $categories_listing),
+ <?= $this->url->link(
+ $this->text->in($task['category_id'], $categories_listing),
'board',
'changeCategory',
array('task_id' => $task['id'], 'project_id' => $task['project_id']),
false,
'task-board-popover' . (isset($categories_description[$task['category_id']]) ? ' column-tooltip' : ''),
- isset($categories_description[$task['category_id']]) ? $this->markdown($categories_description[$task['category_id']]) : t('Change category')
+ isset($categories_description[$task['category_id']]) ? $this->text->markdown($categories_description[$task['category_id']]) : t('Change category')
) ?>
<?php endif ?>
</span>
@@ -26,31 +26,31 @@
<?php endif ?>
<?php if ($task['recurrence_status'] == \Model\Task::RECURRING_STATUS_PENDING): ?>
- <span title="<?= t('Recurrence') ?>" class="task-board-tooltip" data-href="<?= $this->u('board', 'recurrence', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>"><i class="fa fa-refresh fa-rotate-90"></i></span>
+ <span title="<?= t('Recurrence') ?>" class="task-board-tooltip" data-href="<?= $this->url->href('board', 'recurrence', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>"><i class="fa fa-refresh fa-rotate-90"></i></span>
<?php endif ?>
<?php if ($task['recurrence_status'] == \Model\Task::RECURRING_STATUS_PROCESSED): ?>
- <span title="<?= t('Recurrence') ?>" class="task-board-tooltip" data-href="<?= $this->u('board', 'recurrence', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>"><i class="fa fa-refresh fa-rotate-90 fa-inverse"></i></span>
+ <span title="<?= t('Recurrence') ?>" class="task-board-tooltip" data-href="<?= $this->url->href('board', 'recurrence', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>"><i class="fa fa-refresh fa-rotate-90 fa-inverse"></i></span>
<?php endif ?>
<?php if (! empty($task['nb_links'])): ?>
- <span title="<?= t('Links') ?>" class="task-board-tooltip" data-href="<?= $this->u('board', 'tasklinks', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>"><i class="fa fa-code-fork"></i>&nbsp;<?= $task['nb_links'] ?></span>
+ <span title="<?= t('Links') ?>" class="task-board-tooltip" data-href="<?= $this->url->href('board', 'tasklinks', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>"><i class="fa fa-code-fork"></i>&nbsp;<?= $task['nb_links'] ?></span>
<?php endif ?>
<?php if (! empty($task['nb_subtasks'])): ?>
- <span title="<?= t('Sub-Tasks') ?>" class="task-board-tooltip" data-href="<?= $this->u('board', 'subtasks', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>"><i class="fa fa-bars"></i>&nbsp;<?= round($task['nb_completed_subtasks']/$task['nb_subtasks']*100, 0).'%' ?></span>
+ <span title="<?= t('Sub-Tasks') ?>" class="task-board-tooltip" data-href="<?= $this->url->href('board', 'subtasks', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>"><i class="fa fa-bars"></i>&nbsp;<?= round($task['nb_completed_subtasks']/$task['nb_subtasks']*100, 0).'%' ?></span>
<?php endif ?>
<?php if (! empty($task['nb_files'])): ?>
- <span title="<?= t('Attachments') ?>" class="task-board-tooltip" data-href="<?= $this->u('board', 'attachments', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>"><i class="fa fa-paperclip"></i>&nbsp;<?= $task['nb_files'] ?></span>
+ <span title="<?= t('Attachments') ?>" class="task-board-tooltip" data-href="<?= $this->url->href('board', 'attachments', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>"><i class="fa fa-paperclip"></i>&nbsp;<?= $task['nb_files'] ?></span>
<?php endif ?>
<?php if (! empty($task['nb_comments'])): ?>
- <span title="<?= p($task['nb_comments'], t('%d comment', $task['nb_comments']), t('%d comments', $task['nb_comments'])) ?>" class="task-board-tooltip" data-href="<?= $this->u('board', 'comments', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>"><i class="fa fa-comment-o"></i>&nbsp;<?= $task['nb_comments'] ?></span>
+ <span title="<?= p($task['nb_comments'], t('%d comment', $task['nb_comments']), t('%d comments', $task['nb_comments'])) ?>" class="task-board-tooltip" data-href="<?= $this->url->href('board', 'comments', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>"><i class="fa fa-comment-o"></i>&nbsp;<?= $task['nb_comments'] ?></span>
<?php endif ?>
<?php if (! empty($task['description'])): ?>
- <span title="<?= t('Description') ?>" class="task-board-tooltip" data-href="<?= $this->u('board', 'description', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>">
+ <span title="<?= t('Description') ?>" class="task-board-tooltip" data-href="<?= $this->url->href('board', 'description', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>">
<i class="fa fa-file-text-o"></i>
</span>
<?php endif ?>
diff --git a/app/Template/board/task_menu.php b/app/Template/board/task_menu.php
index 04b03385..97c0f8dc 100644
--- a/app/Template/board/task_menu.php
+++ b/app/Template/board/task_menu.php
@@ -2,15 +2,15 @@
<span>
<a href="#" class="dropdown-menu"><?= '#'.$task['id'] ?></a>
<ul>
- <li><i class="fa fa-user"></i> <?= $this->a(t('Change assignee'), 'board', 'changeAssignee', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'task-board-popover') ?></li>
- <li><i class="fa fa-tag"></i> <?= $this->a(t('Change category'), 'board', 'changeCategory', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'task-board-popover') ?></li>
- <li><i class="fa fa-align-left"></i> <?= $this->a(t('Change description'), 'task', 'description', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'task-board-popover') ?></li>
- <li><i class="fa fa-pencil-square-o"></i> <?= $this->a(t('Edit this task'), 'task', 'edit', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'task-board-popover') ?></li>
- <li><i class="fa fa-comment-o"></i> <?= $this->a(t('Add a comment'), 'comment', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'task-board-popover') ?></li>
- <li><i class="fa fa-code-fork"></i> <?= $this->a(t('Add a link'), 'tasklink', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'task-board-popover') ?></li>
- <li><i class="fa fa-camera"></i> <?= $this->a(t('Add a screenshot'), 'board', 'screenshot', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'task-board-popover') ?></li>
- <li><i class="fa fa-refresh fa-rotate-90"></i> <?= $this->a(t('Edit recurrence'), 'task', 'recurrence', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'task-board-popover') ?></li>
- <li><i class="fa fa-close"></i> <?= $this->a(t('Close this task'), 'task', 'close', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'redirect' => 'board'), false, 'task-board-popover') ?></li>
+ <li><i class="fa fa-user"></i> <?= $this->url->link(t('Change assignee'), 'board', 'changeAssignee', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'task-board-popover') ?></li>
+ <li><i class="fa fa-tag"></i> <?= $this->url->link(t('Change category'), 'board', 'changeCategory', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'task-board-popover') ?></li>
+ <li><i class="fa fa-align-left"></i> <?= $this->url->link(t('Change description'), 'task', 'description', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'task-board-popover') ?></li>
+ <li><i class="fa fa-pencil-square-o"></i> <?= $this->url->link(t('Edit this task'), 'task', 'edit', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'task-board-popover') ?></li>
+ <li><i class="fa fa-comment-o"></i> <?= $this->url->link(t('Add a comment'), 'comment', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'task-board-popover') ?></li>
+ <li><i class="fa fa-code-fork"></i> <?= $this->url->link(t('Add a link'), 'tasklink', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'task-board-popover') ?></li>
+ <li><i class="fa fa-camera"></i> <?= $this->url->link(t('Add a screenshot'), 'board', 'screenshot', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'task-board-popover') ?></li>
+ <li><i class="fa fa-refresh fa-rotate-90"></i> <?= $this->url->link(t('Edit recurrence'), 'task', 'recurrence', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'task-board-popover') ?></li>
+ <li><i class="fa fa-close"></i> <?= $this->url->link(t('Close this task'), 'task', 'close', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'redirect' => 'board'), false, 'task-board-popover') ?></li>
</ul>
</span>
</span>
diff --git a/app/Template/board/task_private.php b/app/Template/board/task_private.php
index d82b96e8..088f47bc 100644
--- a/app/Template/board/task_private.php
+++ b/app/Template/board/task_private.php
@@ -3,12 +3,12 @@
data-owner-id="<?= $task['owner_id'] ?>"
data-category-id="<?= $task['category_id'] ?>"
data-due-date="<?= $task['date_due'] ?>"
- data-task-url="<?= $this->u('task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>">
+ data-task-url="<?= $this->url->href('task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>">
<?= $this->render('board/task_menu', array('task' => $task)) ?>
<div class="task-board-collapsed" style="display: none">
- <?= $this->a($this->e($task['title']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'task-board-collapsed-title') ?>
+ <?= $this->url->link($this->e($task['title']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'task-board-collapsed-title') ?>
</div>
<div class="task-board-expanded">
@@ -19,8 +19,8 @@
</span>
<?php endif ?>
- <span class="task-board-user <?= $this->userSession->isCurrentUser($task['owner_id']) ? 'task-board-current-user' : '' ?>">
- <?= $this->a(
+ <span class="task-board-user <?= $this->user->isCurrentUser($task['owner_id']) ? 'task-board-current-user' : '' ?>">
+ <?= $this->url->link(
(! empty($task['owner_id']) ? ($task['assignee_name'] ?: $task['assignee_username']) : t('Nobody assigned')),
'board',
'changeAssignee',
@@ -32,12 +32,12 @@
</span>
<div class="task-board-days">
- <span title="<?= t('Task age in days')?>" class="task-days-age"><?= $this->getTaskAge($task['date_creation']) ?></span>
- <span title="<?= t('Days in this column')?>" class="task-days-incolumn"><?= $this->getTaskAge($task['date_moved']) ?></span>
+ <span title="<?= t('Task age in days')?>" class="task-days-age"><?= $this->task->age($task['date_creation']) ?></span>
+ <span title="<?= t('Days in this column')?>" class="task-days-incolumn"><?= $this->task->age($task['date_moved']) ?></span>
</div>
<div class="task-board-title">
- <?= $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')) ?>
</div>
<?= $this->render('board/task_footer', array(
diff --git a/app/Template/board/task_public.php b/app/Template/board/task_public.php
index 1ab2b3aa..9ac6e570 100644
--- a/app/Template/board/task_public.php
+++ b/app/Template/board/task_public.php
@@ -1,6 +1,6 @@
<div class="task-board color-<?= $task['color_id'] ?> <?= $task['date_modification'] > time() - $board_highlight_period ? 'task-board-recent' : '' ?>">
- <?= $this->a('#'.$task['id'], 'task', 'readonly', array('task_id' => $task['id'], 'token' => $project['token'])) ?>
+ <?= $this->url->link('#'.$task['id'], 'task', 'readonly', array('task_id' => $task['id'], 'token' => $project['token'])) ?>
<?php if ($task['reference']): ?>
<span class="task-board-reference" title="<?= t('Reference') ?>">
@@ -19,7 +19,7 @@
</span>
<div class="task-board-title">
- <?= $this->a($this->e($task['title']), 'task', 'readonly', array('task_id' => $task['id'], 'token' => $project['token'])) ?>
+ <?= $this->url->link($this->e($task['title']), 'task', 'readonly', array('task_id' => $task['id'], 'token' => $project['token'])) ?>
</div>
<?= $this->render('board/task_footer', array(
diff --git a/app/Template/board/tasklinks.php b/app/Template/board/tasklinks.php
index f934cff9..25aa91aa 100644
--- a/app/Template/board/tasklinks.php
+++ b/app/Template/board/tasklinks.php
@@ -3,7 +3,7 @@
<?php foreach($links as $link): ?>
<li>
<strong><?= t($link['label']) ?></strong>
- <?= $this->a(
+ <?= $this->url->link(
$this->e('#'.$link['task_id'].' - '.$link['title']),
'task', 'show', array('task_id' => $link['task_id'], 'project_id' => $link['project_id']),
false,
diff --git a/app/Template/budget/breakdown.php b/app/Template/budget/breakdown.php
index 51044c46..3275a66a 100644
--- a/app/Template/budget/breakdown.php
+++ b/app/Template/budget/breakdown.php
@@ -1,8 +1,8 @@
<div class="page-header">
<h2><?= t('Budget') ?></h2>
<ul>
- <li><?= $this->a(t('Budget lines'), 'budget', 'create', array('project_id' => $project['id'])) ?></li>
- <li><?= $this->a(t('Cost breakdown'), 'budget', 'breakdown', array('project_id' => $project['id'])) ?></li>
+ <li><?= $this->url->link(t('Budget lines'), 'budget', 'create', array('project_id' => $project['id'])) ?></li>
+ <li><?= $this->url->link(t('Cost breakdown'), 'budget', 'breakdown', array('project_id' => $project['id'])) ?></li>
</ul>
</div>
@@ -20,9 +20,9 @@
</tr>
<?php foreach ($paginator->getCollection() as $record): ?>
<tr>
- <td><?= $this->a($this->e($record['task_title']), 'task', 'show', array('project_id' => $project['id'], 'task_id' => $record['task_id'])) ?></td>
- <td><?= $this->a($this->e($record['subtask_title']), 'task', 'show', array('project_id' => $project['id'], 'task_id' => $record['task_id'])) ?></td>
- <td><?= $this->a($this->e($record['name'] ?: $record['username']), 'user', 'show', array('user_id' => $record['user_id'])) ?></td>
+ <td><?= $this->url->link($this->e($record['task_title']), 'task', 'show', array('project_id' => $project['id'], 'task_id' => $record['task_id'])) ?></td>
+ <td><?= $this->url->link($this->e($record['subtask_title']), 'task', 'show', array('project_id' => $project['id'], 'task_id' => $record['task_id'])) ?></td>
+ <td><?= $this->url->link($this->e($record['name'] ?: $record['username']), 'user', 'show', array('user_id' => $record['user_id'])) ?></td>
<td><?= n($record['cost']) ?></td>
<td><?= n($record['time_spent']).' '.t('hours') ?></td>
<td><?= dt('%B %e, %Y', $record['start']) ?></td>
diff --git a/app/Template/budget/create.php b/app/Template/budget/create.php
index 5b2976f4..d64bbc48 100644
--- a/app/Template/budget/create.php
+++ b/app/Template/budget/create.php
@@ -1,8 +1,8 @@
<div class="page-header">
<h2><?= t('Budget') ?></h2>
<ul>
- <li><?= $this->a(t('Budget lines'), 'budget', 'create', array('project_id' => $project['id'])) ?></li>
- <li><?= $this->a(t('Cost breakdown'), 'budget', 'breakdown', array('project_id' => $project['id'])) ?></li>
+ <li><?= $this->url->link(t('Budget lines'), 'budget', 'create', array('project_id' => $project['id'])) ?></li>
+ <li><?= $this->url->link(t('Cost breakdown'), 'budget', 'breakdown', array('project_id' => $project['id'])) ?></li>
</ul>
</div>
@@ -20,7 +20,7 @@
<td><?= dt('%B %e, %Y', strtotime($line['date'])) ?></td>
<td><?= $this->e($line['comment']) ?></td>
<td>
- <?= $this->a(t('Remove'), 'budget', 'confirm', array('project_id' => $project['id'], 'budget_id' => $line['id'])) ?>
+ <?= $this->url->link(t('Remove'), 'budget', 'confirm', array('project_id' => $project['id'], 'budget_id' => $line['id'])) ?>
</td>
</tr>
<?php endforeach ?>
@@ -29,21 +29,21 @@
<h3><?= t('New budget line') ?></h3>
<?php endif ?>
-<form method="post" action="<?= $this->u('budget', 'save', array('project_id' => $project['id'])) ?>" autocomplete="off">
+<form method="post" action="<?= $this->url->href('budget', 'save', array('project_id' => $project['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('Amount'), 'amount') ?>
- <?= $this->formText('amount', $values, $errors, array('required'), 'form-numeric') ?>
+ <?= $this->form->label(t('Amount'), 'amount') ?>
+ <?= $this->form->text('amount', $values, $errors, array('required'), 'form-numeric') ?>
- <?= $this->formLabel(t('Date'), 'date') ?>
- <?= $this->formText('date', $values, $errors, array('required'), 'form-date') ?>
+ <?= $this->form->label(t('Date'), 'date') ?>
+ <?= $this->form->text('date', $values, $errors, array('required'), 'form-date') ?>
- <?= $this->formLabel(t('Comment'), 'comment') ?>
- <?= $this->formText('comment', $values, $errors) ?>
+ <?= $this->form->label(t('Comment'), 'comment') ?>
+ <?= $this->form->text('comment', $values, $errors) ?>
<div class="form-actions">
<input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
diff --git a/app/Template/budget/index.php b/app/Template/budget/index.php
index 01525829..d9fefc67 100644
--- a/app/Template/budget/index.php
+++ b/app/Template/budget/index.php
@@ -1,11 +1,11 @@
-<?= $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') ?>
<div class="page-header">
<h2><?= t('Budget') ?></h2>
<ul>
- <li><?= $this->a(t('Budget lines'), 'budget', 'create', array('project_id' => $project['id'])) ?></li>
- <li><?= $this->a(t('Cost breakdown'), 'budget', 'breakdown', array('project_id' => $project['id'])) ?></li>
+ <li><?= $this->url->link(t('Budget lines'), 'budget', 'create', array('project_id' => $project['id'])) ?></li>
+ <li><?= $this->url->link(t('Cost breakdown'), 'budget', 'breakdown', array('project_id' => $project['id'])) ?></li>
</ul>
</div>
diff --git a/app/Template/budget/remove.php b/app/Template/budget/remove.php
index 97f9c3dc..a5b906a1 100644
--- a/app/Template/budget/remove.php
+++ b/app/Template/budget/remove.php
@@ -6,8 +6,8 @@
<p class="alert alert-info"><?= t('Do you really want to remove this budget line?') ?></p>
<div class="form-actions">
- <?= $this->a(t('Yes'), 'budget', 'remove', array('project_id' => $project['id'], 'budget_id' => $budget_id), true, 'btn btn-red') ?>
+ <?= $this->url->link(t('Yes'), 'budget', 'remove', array('project_id' => $project['id'], 'budget_id' => $budget_id), true, 'btn btn-red') ?>
<?= t('or') ?>
- <?= $this->a(t('cancel'), 'budget', 'create', array('project_id' => $project['id'])) ?>
+ <?= $this->url->link(t('cancel'), 'budget', 'create', array('project_id' => $project['id'])) ?>
</div>
</div> \ No newline at end of file
diff --git a/app/Template/calendar/show.php b/app/Template/calendar/show.php
index 9e96d29e..3fe97b65 100644
--- a/app/Template/calendar/show.php
+++ b/app/Template/calendar/show.php
@@ -3,19 +3,19 @@
<ul>
<li>
<i class="fa fa-table fa-fw"></i>
- <?= $this->a(t('Back to the board'), 'board', 'show', array('project_id' => $project['id'])) ?>
+ <?= $this->url->link(t('Back to the board'), 'board', 'show', array('project_id' => $project['id'])) ?>
</li>
<li>
<i class="fa fa-search fa-fw"></i>
- <?= $this->a(t('Search'), 'project', 'search', array('project_id' => $project['id'])) ?>
+ <?= $this->url->link(t('Search'), 'project', 'search', array('project_id' => $project['id'])) ?>
</li>
<li>
<i class="fa fa-check-square-o fa-fw"></i>
- <?= $this->a(t('Completed tasks'), 'project', 'tasks', array('project_id' => $project['id'])) ?>
+ <?= $this->url->link(t('Completed tasks'), 'project', 'tasks', array('project_id' => $project['id'])) ?>
</li>
<li>
<i class="fa fa-dashboard fa-fw"></i>
- <?= $this->a(t('Activity'), 'project', 'activity', array('project_id' => $project['id'])) ?>
+ <?= $this->url->link(t('Activity'), 'project', 'activity', array('project_id' => $project['id'])) ?>
</li>
</ul>
</div>
@@ -34,8 +34,8 @@
<div class="sidebar-content">
<div id="calendar"
data-project-id="<?= $project['id'] ?>"
- data-save-url="<?= $this->u('calendar', 'save') ?>"
- data-check-url="<?= $this->u('calendar', 'project', array('project_id' => $project['id'])) ?>"
+ data-save-url="<?= $this->url->href('calendar', 'save') ?>"
+ data-check-url="<?= $this->url->href('calendar', 'project', array('project_id' => $project['id'])) ?>"
data-check-interval="<?= $check_interval ?>"
>
</div>
diff --git a/app/Template/calendar/sidebar.php b/app/Template/calendar/sidebar.php
index b074ed91..6c4fb5b0 100644
--- a/app/Template/calendar/sidebar.php
+++ b/app/Template/calendar/sidebar.php
@@ -4,37 +4,37 @@
<?= t('Filter by user') ?>
</li>
<li>
- <?= $this->formSelect('owner_id', $users_list, array(), array(), array(), 'calendar-filter') ?>
+ <?= $this->form->select('owner_id', $users_list, array(), array(), array(), 'calendar-filter') ?>
</li>
<li>
<?= t('Filter by category') ?>
</li>
<li>
- <?= $this->formSelect('category_id', $categories_list, array(), array(), array(), 'calendar-filter') ?>
+ <?= $this->form->select('category_id', $categories_list, array(), array(), array(), 'calendar-filter') ?>
</li>
<li>
<?= t('Filter by column') ?>
</li>
<li>
- <?= $this->formSelect('column_id', $columns_list, array(), array(), array(), 'calendar-filter') ?>
+ <?= $this->form->select('column_id', $columns_list, array(), array(), array(), 'calendar-filter') ?>
</li>
<li>
<?= t('Filter by swimlane') ?>
</li>
<li>
- <?= $this->formSelect('swimlane_id', $swimlanes_list, array(), array(), array(), 'calendar-filter') ?>
+ <?= $this->form->select('swimlane_id', $swimlanes_list, array(), array(), array(), 'calendar-filter') ?>
</li>
<li>
<?= t('Filter by color') ?>
</li>
<li>
- <?= $this->formSelect('color_id', $colors_list, array(), array(), array(), 'calendar-filter') ?>
+ <?= $this->form->select('color_id', $colors_list, array(), array(), array(), 'calendar-filter') ?>
</li>
<li>
<?= t('Filter by status') ?>
</li>
<li>
- <?= $this->formSelect('is_active', $status_list, array(), array(), array(), 'calendar-filter') ?>
+ <?= $this->form->select('is_active', $status_list, array(), array(), array(), 'calendar-filter') ?>
</li>
</ul>
</div>
diff --git a/app/Template/category/edit.php b/app/Template/category/edit.php
index 0d4b0f6f..7d40fe65 100644
--- a/app/Template/category/edit.php
+++ b/app/Template/category/edit.php
@@ -2,21 +2,21 @@
<h2><?= t('Category modification for the project "%s"', $project['name']) ?></h2>
</div>
-<form method="post" action="<?= $this->u('category', 'update', array('project_id' => $project['id'], 'category_id' => $values['id'])) ?>" autocomplete="off">
+<form method="post" action="<?= $this->url->href('category', 'update', array('project_id' => $project['id'], 'category_id' => $values['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('Category Name'), 'name') ?>
- <?= $this->formText('name', $values, $errors, array('autofocus', 'required', 'maxlength="50"')) ?>
+ <?= $this->form->label(t('Category Name'), 'name') ?>
+ <?= $this->form->text('name', $values, $errors, array('autofocus', 'required', 'maxlength="50"')) ?>
- <?= $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/category/index.php b/app/Template/category/index.php
index d5b50af4..dba537d0 100644
--- a/app/Template/category/index.php
+++ b/app/Template/category/index.php
@@ -13,10 +13,10 @@
<td>
<ul>
<li>
- <?= $this->a(t('Edit'), 'category', 'edit', array('project_id' => $project['id'], 'category_id' => $category_id)) ?>
+ <?= $this->url->link(t('Edit'), 'category', 'edit', array('project_id' => $project['id'], 'category_id' => $category_id)) ?>
</li>
<li>
- <?= $this->a(t('Remove'), 'category', 'confirm', array('project_id' => $project['id'], 'category_id' => $category_id)) ?>
+ <?= $this->url->link(t('Remove'), 'category', 'confirm', array('project_id' => $project['id'], 'category_id' => $category_id)) ?>
</li>
</ul>
</td>
@@ -28,13 +28,13 @@
<div class="page-header">
<h2><?= t('Add a new category') ?></h2>
</div>
-<form method="post" action="<?= $this->u('category', 'save', array('project_id' => $project['id'])) ?>" autocomplete="off">
+<form method="post" action="<?= $this->url->href('category', 'save', array('project_id' => $project['id'])) ?>" autocomplete="off">
- <?= $this->formCsrf() ?>
- <?= $this->formHidden('project_id', $values) ?>
+ <?= $this->form->csrf() ?>
+ <?= $this->form->hidden('project_id', $values) ?>
- <?= $this->formLabel(t('Category Name'), 'name') ?>
- <?= $this->formText('name', $values, $errors, array('autofocus', 'required', 'maxlength="50"')) ?>
+ <?= $this->form->label(t('Category Name'), 'name') ?>
+ <?= $this->form->text('name', $values, $errors, array('autofocus', 'required', 'maxlength="50"')) ?>
<div class="form-actions">
<input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
diff --git a/app/Template/category/remove.php b/app/Template/category/remove.php
index 8875b232..ce589785 100644
--- a/app/Template/category/remove.php
+++ b/app/Template/category/remove.php
@@ -9,9 +9,9 @@
</p>
<div class="form-actions">
- <?= $this->a(t('Yes'), 'category', 'remove', array('project_id' => $project['id'], 'category_id' => $category['id']), true, 'btn btn-red') ?>
+ <?= $this->url->link(t('Yes'), 'category', 'remove', array('project_id' => $project['id'], 'category_id' => $category['id']), true, 'btn btn-red') ?>
<?= t('or') ?>
- <?= $this->a(t('cancel'), 'category', 'index', array('project_id' => $project['id'])) ?>
+ <?= $this->url->link(t('cancel'), 'category', 'index', array('project_id' => $project['id'])) ?>
</div>
</div>
</section> \ No newline at end of file
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
diff --git a/app/Template/comment/create.php b/app/Template/comment/create.php
index 5bd8debc..8c66d9a4 100644
--- a/app/Template/comment/create.php
+++ b/app/Template/comment/create.php
@@ -2,10 +2,10 @@
<h2><?= t('Add a comment') ?></h2>
</div>
-<form method="post" action="<?= $this->u('comment', 'save', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'ajax' => isset($ajax))) ?>" autocomplete="off" class="form-comment">
- <?= $this->formCsrf() ?>
- <?= $this->formHidden('task_id', $values) ?>
- <?= $this->formHidden('user_id', $values) ?>
+<form method="post" action="<?= $this->url->href('comment', 'save', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'ajax' => isset($ajax))) ?>" autocomplete="off" class="form-comment">
+ <?= $this->form->csrf() ?>
+ <?= $this->form->hidden('task_id', $values) ?>
+ <?= $this->form->hidden('user_id', $values) ?>
<div class="form-tabs">
<ul class="form-tabs-nav">
@@ -17,7 +17,7 @@
</li>
</ul>
<div class="write-area">
- <?= $this->formTextarea('comment', $values, $errors, array(! isset($skip_cancel) ? 'autofocus' : '', 'required', 'placeholder="'.t('Leave a comment').'"'), 'comment-textarea') ?>
+ <?= $this->form->textarea('comment', $values, $errors, array(! isset($skip_cancel) ? 'autofocus' : '', 'required', 'placeholder="'.t('Leave a comment').'"'), 'comment-textarea') ?>
</div>
<div class="preview-area">
<div class="markdown"></div>
@@ -31,9 +31,9 @@
<?php if (! isset($skip_cancel)): ?>
<?= t('or') ?>
<?php if (isset($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 ?>
<?php endif ?>
</div>
diff --git a/app/Template/comment/edit.php b/app/Template/comment/edit.php
index 2785fe62..d67aa387 100644
--- a/app/Template/comment/edit.php
+++ b/app/Template/comment/edit.php
@@ -2,12 +2,12 @@
<h2><?= t('Edit a comment') ?></h2>
</div>
-<form method="post" action="<?= $this->u('comment', 'update', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'comment_id' => $comment['id'])) ?>" autocomplete="off">
+<form method="post" action="<?= $this->url->href('comment', 'update', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'comment_id' => $comment['id'])) ?>" autocomplete="off">
- <?= $this->formCsrf() ?>
- <?= $this->formHidden('id', $values) ?>
- <?= $this->formHidden('task_id', $values) ?>
- <?= $this->formHidden('user_id', $values) ?>
+ <?= $this->form->csrf() ?>
+ <?= $this->form->hidden('id', $values) ?>
+ <?= $this->form->hidden('task_id', $values) ?>
+ <?= $this->form->hidden('user_id', $values) ?>
<div class="form-tabs">
<ul class="form-tabs-nav">
@@ -19,7 +19,7 @@
</li>
</ul>
<div class="write-area">
- <?= $this->formTextarea('comment', $values, $errors, array('autofocus', 'required', 'placeholder="'.t('Leave a comment').'"'), 'comment-textarea') ?>
+ <?= $this->form->textarea('comment', $values, $errors, array('autofocus', 'required', 'placeholder="'.t('Leave a comment').'"'), 'comment-textarea') ?>
</div>
<div class="preview-area">
<div class="markdown"></div>
@@ -31,6 +31,6 @@
<div class="form-actions">
<input type="submit" value="<?= t('Update') ?>" 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/comment/remove.php b/app/Template/comment/remove.php
index 2338a03d..afc3346f 100644
--- a/app/Template/comment/remove.php
+++ b/app/Template/comment/remove.php
@@ -10,8 +10,8 @@
<?= $this->render('comment/show', array('comment' => $comment, 'task' => $task, 'preview' => true)) ?>
<div class="form-actions">
- <?= $this->a(t('Yes'), 'comment', 'remove', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'comment_id' => $comment['id']), true, 'btn btn-red') ?>
+ <?= $this->url->link(t('Yes'), 'comment', 'remove', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'comment_id' => $comment['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> \ No newline at end of file
diff --git a/app/Template/comment/show.php b/app/Template/comment/show.php
index 98c29441..35394ccb 100644
--- a/app/Template/comment/show.php
+++ b/app/Template/comment/show.php
@@ -2,7 +2,7 @@
<p class="comment-title">
<?php if (! empty($comment['email'])): ?>
- <?= $this->avatar($comment['email'], $comment['name'] ?: $comment['username']) ?>
+ <?= $this->user->avatar($comment['email'], $comment['name'] ?: $comment['username']) ?>
<?php endif ?>
<span class="comment-username"><?= $this->e($comment['name'] ?: $comment['username']) ?></span> @ <span class="comment-date"><?= dt('%B %e, %Y at %k:%M %p', $comment['date']) ?></span>
</p>
@@ -11,12 +11,12 @@
<?php if (! isset($preview)): ?>
<ul class="comment-actions">
<li><a href="#comment-<?= $comment['id'] ?>"><?= t('link') ?></a></li>
- <?php if ((! isset($not_editable) || ! $not_editable) && ($this->userSession->isAdmin() || $this->userSession->isCurrentUser($comment['user_id']))): ?>
+ <?php if ((! isset($not_editable) || ! $not_editable) && ($this->user->isAdmin() || $this->user->isCurrentUser($comment['user_id']))): ?>
<li>
- <?= $this->a(t('remove'), 'comment', 'confirm', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'comment_id' => $comment['id'])) ?>
+ <?= $this->url->link(t('remove'), 'comment', 'confirm', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'comment_id' => $comment['id'])) ?>
</li>
<li>
- <?= $this->a(t('edit'), 'comment', 'edit', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'comment_id' => $comment['id'])) ?>
+ <?= $this->url->link(t('edit'), 'comment', 'edit', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'comment_id' => $comment['id'])) ?>
</li>
<?php endif ?>
</ul>
@@ -24,7 +24,7 @@
<div class="markdown">
<?php if (isset($is_public) && $is_public): ?>
- <?= $this->markdown(
+ <?= $this->text->markdown(
$comment['comment'],
array(
'controller' => 'task',
@@ -35,7 +35,7 @@
)
) ?>
<?php else: ?>
- <?= $this->markdown(
+ <?= $this->text->markdown(
$comment['comment'],
array(
'controller' => 'task',
diff --git a/app/Template/config/about.php b/app/Template/config/about.php
index b6ed43e5..a7098c1b 100644
--- a/app/Template/config/about.php
+++ b/app/Template/config/about.php
@@ -25,14 +25,14 @@
<?php if (DB_DRIVER === 'sqlite'): ?>
<li>
<?= t('Database size:') ?>
- <strong><?= $this->formatBytes($db_size) ?></strong>
+ <strong><?= $this->text->bytes($db_size) ?></strong>
</li>
<li>
- <?= $this->a(t('Download the database'), 'config', 'downloadDb', array(), true) ?>&nbsp;
+ <?= $this->url->link(t('Download the database'), 'config', 'downloadDb', array(), true) ?>&nbsp;
<?= t('(Gzip compressed Sqlite file)') ?>
</li>
<li>
- <?= $this->a(t('Optimize the database'), 'config', 'optimizeDb', array(), true) ?>&nbsp;
+ <?= $this->url->link(t('Optimize the database'), 'config', 'optimizeDb', array(), true) ?>&nbsp;
<?= t('(VACUUM command)') ?>
</li>
<?php endif ?>
diff --git a/app/Template/config/api.php b/app/Template/config/api.php
index 0df90835..489f1968 100644
--- a/app/Template/config/api.php
+++ b/app/Template/config/api.php
@@ -9,10 +9,10 @@
</li>
<li>
<?= t('API endpoint:') ?>
- <input type="text" class="auto-select" readonly="readonly" value="<?= $this->getCurrentBaseUrl().'jsonrpc.php' ?>">
+ <input type="text" class="auto-select" readonly="readonly" value="<?= $this->url->base().'jsonrpc.php' ?>">
</li>
<li>
- <?= $this->a(t('Reset token'), 'config', 'token', array('type' => 'api'), true) ?>
+ <?= $this->url->link(t('Reset token'), 'config', 'token', array('type' => 'api'), true) ?>
</li>
</ul>
</section> \ No newline at end of file
diff --git a/app/Template/config/application.php b/app/Template/config/application.php
index f6c9db94..7d4c811d 100644
--- a/app/Template/config/application.php
+++ b/app/Template/config/application.php
@@ -2,26 +2,26 @@
<h2><?= t('Application settings') ?></h2>
</div>
<section>
-<form method="post" action="<?= $this->u('config', 'application') ?>" autocomplete="off">
+<form method="post" action="<?= $this->url->href('config', 'application') ?>" autocomplete="off">
- <?= $this->formCsrf() ?>
+ <?= $this->form->csrf() ?>
- <?= $this->formLabel(t('Application URL'), 'application_url') ?>
- <?= $this->formText('application_url', $values, $errors, array('placeholder="http://example.kanboard.net/"')) ?><br/>
+ <?= $this->form->label(t('Application URL'), 'application_url') ?>
+ <?= $this->form->text('application_url', $values, $errors, array('placeholder="http://example.kanboard.net/"')) ?><br/>
<p class="form-help"><?= t('Example: http://example.kanboard.net/ (used by email notifications)') ?></p>
- <?= $this->formLabel(t('Language'), 'application_language') ?>
- <?= $this->formSelect('application_language', $languages, $values, $errors) ?><br/>
+ <?= $this->form->label(t('Language'), 'application_language') ?>
+ <?= $this->form->select('application_language', $languages, $values, $errors) ?><br/>
- <?= $this->formLabel(t('Timezone'), 'application_timezone') ?>
- <?= $this->formSelect('application_timezone', $timezones, $values, $errors) ?><br/>
+ <?= $this->form->label(t('Timezone'), 'application_timezone') ?>
+ <?= $this->form->select('application_timezone', $timezones, $values, $errors) ?><br/>
- <?= $this->formLabel(t('Date format'), 'application_date_format') ?>
- <?= $this->formSelect('application_date_format', $date_formats, $values, $errors) ?><br/>
+ <?= $this->form->label(t('Date format'), 'application_date_format') ?>
+ <?= $this->form->select('application_date_format', $date_formats, $values, $errors) ?><br/>
<p class="form-help"><?= t('ISO format is always accepted, example: "%s" and "%s"', date('Y-m-d'), date('Y_m_d')) ?></p>
- <?= $this->formLabel(t('Custom Stylesheet'), 'application_stylesheet') ?>
- <?= $this->formTextarea('application_stylesheet', $values, $errors) ?><br/>
+ <?= $this->form->label(t('Custom Stylesheet'), 'application_stylesheet') ?>
+ <?= $this->form->textarea('application_stylesheet', $values, $errors) ?><br/>
<div class="form-actions">
<input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
diff --git a/app/Template/config/board.php b/app/Template/config/board.php
index c55003de..19a4bcd7 100644
--- a/app/Template/config/board.php
+++ b/app/Template/config/board.php
@@ -2,20 +2,20 @@
<h2><?= t('Board settings') ?></h2>
</div>
<section>
-<form method="post" action="<?= $this->u('config', 'board') ?>" autocomplete="off">
+<form method="post" action="<?= $this->url->href('config', 'board') ?>" autocomplete="off">
- <?= $this->formCsrf() ?>
+ <?= $this->form->csrf() ?>
- <?= $this->formLabel(t('Task highlight period'), 'board_highlight_period') ?>
- <?= $this->formNumber('board_highlight_period', $values, $errors) ?><br/>
+ <?= $this->form->label(t('Task highlight period'), 'board_highlight_period') ?>
+ <?= $this->form->number('board_highlight_period', $values, $errors) ?><br/>
<p class="form-help"><?= t('Period (in second) to consider a task was modified recently (0 to disable, 2 days by default)') ?></p>
- <?= $this->formLabel(t('Refresh interval for public board'), 'board_public_refresh_interval') ?>
- <?= $this->formNumber('board_public_refresh_interval', $values, $errors) ?><br/>
+ <?= $this->form->label(t('Refresh interval for public board'), 'board_public_refresh_interval') ?>
+ <?= $this->form->number('board_public_refresh_interval', $values, $errors) ?><br/>
<p class="form-help"><?= t('Frequency in second (60 seconds by default)') ?></p>
- <?= $this->formLabel(t('Refresh interval for private board'), 'board_private_refresh_interval') ?>
- <?= $this->formNumber('board_private_refresh_interval', $values, $errors) ?><br/>
+ <?= $this->form->label(t('Refresh interval for private board'), 'board_private_refresh_interval') ?>
+ <?= $this->form->number('board_private_refresh_interval', $values, $errors) ?><br/>
<p class="form-help"><?= t('Frequency in second (0 to disable this feature, 10 seconds by default)') ?></p>
<div class="form-actions">
diff --git a/app/Template/config/calendar.php b/app/Template/config/calendar.php
index 300d3419..1cc985c8 100644
--- a/app/Template/config/calendar.php
+++ b/app/Template/config/calendar.php
@@ -2,13 +2,13 @@
<h2><?= t('Calendar settings') ?></h2>
</div>
<section>
-<form method="post" action="<?= $this->u('config', 'calendar') ?>" autocomplete="off">
+<form method="post" action="<?= $this->url->href('config', 'calendar') ?>" autocomplete="off">
- <?= $this->formCsrf() ?>
+ <?= $this->form->csrf() ?>
<h3><?= t('Project calendar view') ?></h3>
<div class="listing">
- <?= $this->formRadios('calendar_project_tasks', array(
+ <?= $this->form->radios('calendar_project_tasks', array(
'date_creation' => t('Show tasks based on the creation date'),
'date_started' => t('Show tasks based on the start date'),
), $values) ?>
@@ -16,14 +16,14 @@
<h3><?= t('User calendar view') ?></h3>
<div class="listing">
- <?= $this->formRadios('calendar_user_tasks', array(
+ <?= $this->form->radios('calendar_user_tasks', array(
'date_creation' => t('Show tasks based on the creation date'),
'date_started' => t('Show tasks based on the start date'),
), $values) ?>
<h4><?= t('Subtasks time tracking') ?></h4>
- <?= $this->formCheckbox('calendar_user_subtasks_time_tracking', t('Show subtasks based on the time tracking'), 1, $values['calendar_user_subtasks_time_tracking'] == 1) ?>
- <?= $this->formCheckbox('calendar_user_subtasks_forecast', t('Show subtask estimates (forecast of future work)'), 1, $values['calendar_user_subtasks_forecast'] == 1) ?>
+ <?= $this->form->checkbox('calendar_user_subtasks_time_tracking', t('Show subtasks based on the time tracking'), 1, $values['calendar_user_subtasks_time_tracking'] == 1) ?>
+ <?= $this->form->checkbox('calendar_user_subtasks_forecast', t('Show subtask estimates (forecast of future work)'), 1, $values['calendar_user_subtasks_forecast'] == 1) ?>
</div>
<div class="form-actions">
diff --git a/app/Template/config/integrations.php b/app/Template/config/integrations.php
index f9e7f537..a1299806 100644
--- a/app/Template/config/integrations.php
+++ b/app/Template/config/integrations.php
@@ -2,81 +2,81 @@
<h2><?= t('Integration with third-party services') ?></h2>
</div>
-<form method="post" action="<?= $this->u('config', 'integrations') ?>" autocomplete="off">
+<form method="post" action="<?= $this->url->href('config', 'integrations') ?>" autocomplete="off">
- <?= $this->formCsrf() ?>
+ <?= $this->form->csrf() ?>
<h3><img src="assets/img/mailgun-icon.png"/>&nbsp;<?= t('Mailgun (incoming emails)') ?></h3>
<div class="listing">
- <input type="text" class="auto-select" readonly="readonly" value="<?= $this->getCurrentBaseUrl().$this->u('webhook', 'mailgun', array('token' => $values['webhook_token'])) ?>"/><br/>
+ <input type="text" class="auto-select" readonly="readonly" value="<?= $this->url->base().$this->url->href('webhook', 'mailgun', array('token' => $values['webhook_token'])) ?>"/><br/>
<p class="form-help"><a href="http://kanboard.net/documentation/mailgun" target="_blank"><?= t('Help on Mailgun integration') ?></a></p>
</div>
<h3><img src="assets/img/sendgrid-icon.png"/>&nbsp;<?= t('Sendgrid (incoming emails)') ?></h3>
<div class="listing">
- <input type="text" class="auto-select" readonly="readonly" value="<?= $this->getCurrentBaseUrl().$this->u('webhook', 'sendgrid', array('token' => $values['webhook_token'])) ?>"/><br/>
+ <input type="text" class="auto-select" readonly="readonly" value="<?= $this->url->base().$this->url->href('webhook', 'sendgrid', array('token' => $values['webhook_token'])) ?>"/><br/>
<p class="form-help"><a href="http://kanboard.net/documentation/sendgrid" target="_blank"><?= t('Help on Sendgrid integration') ?></a></p>
</div>
<h3><img src="assets/img/postmark-icon.png"/>&nbsp;<?= t('Postmark (incoming emails)') ?></h3>
<div class="listing">
- <input type="text" class="auto-select" readonly="readonly" value="<?= $this->getCurrentBaseUrl().$this->u('webhook', 'postmark', array('token' => $values['webhook_token'])) ?>"/><br/>
+ <input type="text" class="auto-select" readonly="readonly" value="<?= $this->url->base().$this->url->href('webhook', 'postmark', array('token' => $values['webhook_token'])) ?>"/><br/>
<p class="form-help"><a href="http://kanboard.net/documentation/postmark" target="_blank"><?= t('Help on Postmark integration') ?></a></p>
</div>
<h3><img src="assets/img/gravatar-icon.png"/>&nbsp;<?= t('Gravatar') ?></h3>
<div class="listing">
- <?= $this->formCheckbox('integration_gravatar', t('Enable Gravatar images'), 1, $values['integration_gravatar'] == 1) ?>
+ <?= $this->form->checkbox('integration_gravatar', t('Enable Gravatar images'), 1, $values['integration_gravatar'] == 1) ?>
</div>
<h3><img src="assets/img/jabber-icon.png"/> <?= t('Jabber (XMPP)') ?></h3>
<div class="listing">
- <?= $this->formCheckbox('integration_jabber', t('Send notifications to Jabber'), 1, $values['integration_jabber'] == 1) ?>
+ <?= $this->form->checkbox('integration_jabber', t('Send notifications to Jabber'), 1, $values['integration_jabber'] == 1) ?>
- <?= $this->formLabel(t('XMPP server address'), 'integration_jabber_server') ?>
- <?= $this->formText('integration_jabber_server', $values, $errors, array('placeholder="tcp://myserver:5222"')) ?>
+ <?= $this->form->label(t('XMPP server address'), 'integration_jabber_server') ?>
+ <?= $this->form->text('integration_jabber_server', $values, $errors, array('placeholder="tcp://myserver:5222"')) ?>
<p class="form-help"><?= t('The server address must use this format: "tcp://hostname:5222"') ?></p>
- <?= $this->formLabel(t('Jabber domain'), 'integration_jabber_domain') ?>
- <?= $this->formText('integration_jabber_domain', $values, $errors, array('placeholder="example.com"')) ?>
+ <?= $this->form->label(t('Jabber domain'), 'integration_jabber_domain') ?>
+ <?= $this->form->text('integration_jabber_domain', $values, $errors, array('placeholder="example.com"')) ?>
- <?= $this->formLabel(t('Username'), 'integration_jabber_username') ?>
- <?= $this->formText('integration_jabber_username', $values, $errors) ?>
+ <?= $this->form->label(t('Username'), 'integration_jabber_username') ?>
+ <?= $this->form->text('integration_jabber_username', $values, $errors) ?>
- <?= $this->formLabel(t('Password'), 'integration_jabber_password') ?>
- <?= $this->formPassword('integration_jabber_password', $values, $errors) ?>
+ <?= $this->form->label(t('Password'), 'integration_jabber_password') ?>
+ <?= $this->form->password('integration_jabber_password', $values, $errors) ?>
- <?= $this->formLabel(t('Jabber nickname'), 'integration_jabber_nickname') ?>
- <?= $this->formText('integration_jabber_nickname', $values, $errors) ?>
+ <?= $this->form->label(t('Jabber nickname'), 'integration_jabber_nickname') ?>
+ <?= $this->form->text('integration_jabber_nickname', $values, $errors) ?>
- <?= $this->formLabel(t('Multi-user chat room'), 'integration_jabber_room') ?>
- <?= $this->formText('integration_jabber_room', $values, $errors, array('placeholder="myroom@conference.example.com"')) ?>
+ <?= $this->form->label(t('Multi-user chat room'), 'integration_jabber_room') ?>
+ <?= $this->form->text('integration_jabber_room', $values, $errors, array('placeholder="myroom@conference.example.com"')) ?>
<p class="form-help"><a href="http://kanboard.net/documentation/jabber" target="_blank"><?= t('Help on Jabber integration') ?></a></p>
</div>
<h3><img src="assets/img/hipchat-icon.png"/> <?= t('Hipchat') ?></h3>
<div class="listing">
- <?= $this->formCheckbox('integration_hipchat', t('Send notifications to Hipchat'), 1, $values['integration_hipchat'] == 1) ?>
+ <?= $this->form->checkbox('integration_hipchat', t('Send notifications to Hipchat'), 1, $values['integration_hipchat'] == 1) ?>
- <?= $this->formLabel(t('API URL'), 'integration_hipchat_api_url') ?>
- <?= $this->formText('integration_hipchat_api_url', $values, $errors) ?>
+ <?= $this->form->label(t('API URL'), 'integration_hipchat_api_url') ?>
+ <?= $this->form->text('integration_hipchat_api_url', $values, $errors) ?>
- <?= $this->formLabel(t('Room API ID or name'), 'integration_hipchat_room_id') ?>
- <?= $this->formText('integration_hipchat_room_id', $values, $errors) ?>
+ <?= $this->form->label(t('Room API ID or name'), 'integration_hipchat_room_id') ?>
+ <?= $this->form->text('integration_hipchat_room_id', $values, $errors) ?>
- <?= $this->formLabel(t('Room notification token'), 'integration_hipchat_room_token') ?>
- <?= $this->formText('integration_hipchat_room_token', $values, $errors) ?>
+ <?= $this->form->label(t('Room notification token'), 'integration_hipchat_room_token') ?>
+ <?= $this->form->text('integration_hipchat_room_token', $values, $errors) ?>
<p class="form-help"><a href="http://kanboard.net/documentation/hipchat" target="_blank"><?= t('Help on Hipchat integration') ?></a></p>
</div>
<h3><i class="fa fa-slack fa-fw"></i>&nbsp;<?= t('Slack') ?></h3>
<div class="listing">
- <?= $this->formCheckbox('integration_slack_webhook', t('Send notifications to a Slack channel'), 1, $values['integration_slack_webhook'] == 1) ?>
+ <?= $this->form->checkbox('integration_slack_webhook', t('Send notifications to a Slack channel'), 1, $values['integration_slack_webhook'] == 1) ?>
- <?= $this->formLabel(t('Webhook URL'), 'integration_slack_webhook_url') ?>
- <?= $this->formText('integration_slack_webhook_url', $values, $errors) ?>
+ <?= $this->form->label(t('Webhook URL'), 'integration_slack_webhook_url') ?>
+ <?= $this->form->text('integration_slack_webhook_url', $values, $errors) ?>
<p class="form-help"><a href="http://kanboard.net/documentation/slack" target="_blank"><?= t('Help on Slack integration') ?></a></p>
</div>
diff --git a/app/Template/config/project.php b/app/Template/config/project.php
index b559d632..90dd9c8e 100644
--- a/app/Template/config/project.php
+++ b/app/Template/config/project.php
@@ -2,20 +2,20 @@
<h2><?= t('Project settings') ?></h2>
</div>
<section>
-<form method="post" action="<?= $this->u('config', 'project') ?>" autocomplete="off">
+<form method="post" action="<?= $this->url->href('config', 'project') ?>" autocomplete="off">
- <?= $this->formCsrf() ?>
+ <?= $this->form->csrf() ?>
- <?= $this->formLabel(t('Default columns for new projects (Comma-separated)'), 'board_columns') ?>
- <?= $this->formText('board_columns', $values, $errors) ?><br/>
+ <?= $this->form->label(t('Default columns for new projects (Comma-separated)'), 'board_columns') ?>
+ <?= $this->form->text('board_columns', $values, $errors) ?><br/>
<p class="form-help"><?= t('Default values are "%s"', $default_columns) ?></p>
- <?= $this->formLabel(t('Default categories for new projects (Comma-separated)'), 'project_categories') ?>
- <?= $this->formText('project_categories', $values, $errors) ?><br/>
+ <?= $this->form->label(t('Default categories for new projects (Comma-separated)'), 'project_categories') ?>
+ <?= $this->form->text('project_categories', $values, $errors) ?><br/>
<p class="form-help"><?= t('Example: "Bug, Feature Request, Improvement"') ?></p>
- <?= $this->formCheckbox('subtask_restriction', t('Allow only one subtask in progress at the same time for a user'), 1, $values['subtask_restriction'] == 1) ?>
- <?= $this->formCheckbox('subtask_time_tracking', t('Enable time tracking for subtasks'), 1, $values['subtask_time_tracking'] == 1) ?>
+ <?= $this->form->checkbox('subtask_restriction', t('Allow only one subtask in progress at the same time for a user'), 1, $values['subtask_restriction'] == 1) ?>
+ <?= $this->form->checkbox('subtask_time_tracking', t('Enable time tracking for subtasks'), 1, $values['subtask_time_tracking'] == 1) ?>
<div class="form-actions">
<input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
diff --git a/app/Template/config/sidebar.php b/app/Template/config/sidebar.php
index 4bae9e2e..7f946dee 100644
--- a/app/Template/config/sidebar.php
+++ b/app/Template/config/sidebar.php
@@ -2,34 +2,34 @@
<h2><?= t('Actions') ?></h2>
<ul>
<li>
- <?= $this->a(t('About'), 'config', 'index') ?>
+ <?= $this->url->link(t('About'), 'config', 'index') ?>
</li>
<li>
- <?= $this->a(t('Application settings'), 'config', 'application') ?>
+ <?= $this->url->link(t('Application settings'), 'config', 'application') ?>
</li>
<li>
- <?= $this->a(t('Project settings'), 'config', 'project') ?>
+ <?= $this->url->link(t('Project settings'), 'config', 'project') ?>
</li>
<li>
- <?= $this->a(t('Board settings'), 'config', 'board') ?>
+ <?= $this->url->link(t('Board settings'), 'config', 'board') ?>
</li>
<li>
- <?= $this->a(t('Calendar settings'), 'config', 'calendar') ?>
+ <?= $this->url->link(t('Calendar settings'), 'config', 'calendar') ?>
</li>
<li>
- <?= $this->a(t('Link settings'), 'link', 'index') ?>
+ <?= $this->url->link(t('Link settings'), 'link', 'index') ?>
</li>
<li>
- <?= $this->a(t('Currency rates'), 'currency', 'index') ?>
+ <?= $this->url->link(t('Currency rates'), 'currency', 'index') ?>
</li>
<li>
- <?= $this->a(t('Integrations'), 'config', 'integrations') ?>
+ <?= $this->url->link(t('Integrations'), 'config', 'integrations') ?>
</li>
<li>
- <?= $this->a(t('Webhooks'), 'config', 'webhook') ?>
+ <?= $this->url->link(t('Webhooks'), 'config', 'webhook') ?>
</li>
<li>
- <?= $this->a(t('API'), 'config', 'api') ?>
+ <?= $this->url->link(t('API'), 'config', 'api') ?>
</li>
</ul>
</div> \ No newline at end of file
diff --git a/app/Template/config/webhook.php b/app/Template/config/webhook.php
index 06f7870b..73ca3598 100644
--- a/app/Template/config/webhook.php
+++ b/app/Template/config/webhook.php
@@ -2,12 +2,12 @@
<h2><?= t('Webhook settings') ?></h2>
</div>
<section>
-<form method="post" action="<?= $this->u('config', 'webhook') ?>" autocomplete="off">
+<form method="post" action="<?= $this->url->href('config', 'webhook') ?>" autocomplete="off">
- <?= $this->formCsrf() ?>
+ <?= $this->form->csrf() ?>
- <?= $this->formLabel(t('Webhook URL'), 'webhook_url') ?>
- <?= $this->formText('webhook_url', $values, $errors) ?>
+ <?= $this->form->label(t('Webhook URL'), 'webhook_url') ?>
+ <?= $this->form->text('webhook_url', $values, $errors) ?>
<div class="form-actions">
<input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
@@ -26,10 +26,10 @@
</li>
<li>
<?= t('URL for task creation:') ?>
- <input type="text" class="auto-select" readonly="readonly" value="<?= $this->getCurrentBaseUrl().$this->u('webhook', 'task', array('token' => $values['webhook_token'])) ?>">
+ <input type="text" class="auto-select" readonly="readonly" value="<?= $this->url->base().$this->url->href('webhook', 'task', array('token' => $values['webhook_token'])) ?>">
</li>
<li>
- <?= $this->a(t('Reset token'), 'config', 'token', array('type' => 'webhook'), true) ?>
+ <?= $this->url->link(t('Reset token'), 'config', 'token', array('type' => 'webhook'), true) ?>
</li>
</ul>
</section> \ No newline at end of file
diff --git a/app/Template/currency/index.php b/app/Template/currency/index.php
index 7839a142..f72c5700 100644
--- a/app/Template/currency/index.php
+++ b/app/Template/currency/index.php
@@ -24,12 +24,12 @@
<hr/>
<h3><?= t('Change reference currency') ?></h3>
<?php endif ?>
-<form method="post" action="<?= $this->u('currency', 'reference') ?>" autocomplete="off">
+<form method="post" action="<?= $this->url->href('currency', 'reference') ?>" autocomplete="off">
- <?= $this->formCsrf() ?>
+ <?= $this->form->csrf() ?>
- <?= $this->formLabel(t('Reference currency'), 'application_currency') ?>
- <?= $this->formSelect('application_currency', $currencies, $config_values, $errors) ?><br/>
+ <?= $this->form->label(t('Reference currency'), 'application_currency') ?>
+ <?= $this->form->select('application_currency', $currencies, $config_values, $errors) ?><br/>
<div class="form-actions">
<input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
@@ -38,15 +38,15 @@
<hr/>
<h3><?= t('Add a new currency rate') ?></h3>
-<form method="post" action="<?= $this->u('currency', 'create') ?>" autocomplete="off">
+<form method="post" action="<?= $this->url->href('currency', 'create') ?>" autocomplete="off">
- <?= $this->formCsrf() ?>
+ <?= $this->form->csrf() ?>
- <?= $this->formLabel(t('Currency'), 'currency') ?>
- <?= $this->formSelect('currency', $currencies, $values, $errors) ?><br/>
+ <?= $this->form->label(t('Currency'), 'currency') ?>
+ <?= $this->form->select('currency', $currencies, $values, $errors) ?><br/>
- <?= $this->formLabel(t('Rate'), 'rate') ?>
- <?= $this->formText('rate', $values, $errors, array(), 'form-numeric') ?><br/>
+ <?= $this->form->label(t('Rate'), 'rate') ?>
+ <?= $this->form->text('rate', $values, $errors, array(), 'form-numeric') ?><br/>
<div class="form-actions">
<input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
diff --git a/app/Template/event/comment_create.php b/app/Template/event/comment_create.php
index 79238aba..462f15ca 100644
--- a/app/Template/event/comment_create.php
+++ b/app/Template/event/comment_create.php
@@ -1,12 +1,12 @@
-<?= $this->avatar($email, $author) ?>
+<?= $this->user->avatar($email, $author) ?>
<p class="activity-title">
<?= e('%s commented the task %s',
$this->e($author),
- $this->a(t('#%d', $task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']))
+ $this->url->link(t('#%d', $task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']))
) ?>
</p>
<div class="activity-description">
<em><?= $this->e($task['title']) ?></em><br/>
- <div class="markdown"><?= $this->markdown($comment['comment']) ?></div>
+ <div class="markdown"><?= $this->text->markdown($comment['comment']) ?></div>
</div> \ No newline at end of file
diff --git a/app/Template/event/comment_update.php b/app/Template/event/comment_update.php
index 5d22a2ce..0cb10bf6 100644
--- a/app/Template/event/comment_update.php
+++ b/app/Template/event/comment_update.php
@@ -1,9 +1,9 @@
-<?= $this->avatar($email, $author) ?>
+<?= $this->user->avatar($email, $author) ?>
<p class="activity-title">
<?= e('%s updated a comment on the task %s',
$this->e($author),
- $this->a(t('#%d', $task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']))
+ $this->url->link(t('#%d', $task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']))
) ?>
</p>
<div class="activity-description">
diff --git a/app/Template/event/events.php b/app/Template/event/events.php
index 93bc6584..2dc79871 100644
--- a/app/Template/event/events.php
+++ b/app/Template/event/events.php
@@ -5,11 +5,11 @@
<?php foreach ($events as $event): ?>
<div class="activity-event">
<p class="activity-datetime">
- <?php if ($this->contains($event['event_name'], 'subtask')): ?>
+ <?php if ($this->text->contains($event['event_name'], 'subtask')): ?>
<i class="fa fa-tasks"></i>
- <?php elseif ($this->contains($event['event_name'], 'task')): ?>
+ <?php elseif ($this->text->contains($event['event_name'], 'task')): ?>
<i class="fa fa-newspaper-o"></i>
- <?php elseif ($this->contains($event['event_name'], 'comment')): ?>
+ <?php elseif ($this->text->contains($event['event_name'], 'comment')): ?>
<i class="fa fa-comments-o"></i>
<?php endif ?>
&nbsp;<?= dt('%B %e, %Y at %k:%M %p', $event['date_creation']) ?>
diff --git a/app/Template/event/subtask_create.php b/app/Template/event/subtask_create.php
index 4f33069a..ca23aa9c 100644
--- a/app/Template/event/subtask_create.php
+++ b/app/Template/event/subtask_create.php
@@ -1,9 +1,9 @@
-<?= $this->avatar($email, $author) ?>
+<?= $this->user->avatar($email, $author) ?>
<p class="activity-title">
<?= e('%s created a subtask for the task %s',
$this->e($author),
- $this->a(t('#%d', $task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']))
+ $this->url->link(t('#%d', $task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']))
) ?>
</p>
<div class="activity-description">
diff --git a/app/Template/event/subtask_update.php b/app/Template/event/subtask_update.php
index 19fe2e56..11a778de 100644
--- a/app/Template/event/subtask_update.php
+++ b/app/Template/event/subtask_update.php
@@ -1,9 +1,9 @@
-<?= $this->avatar($email, $author) ?>
+<?= $this->user->avatar($email, $author) ?>
<p class="activity-title">
<?= e('%s updated a subtask for the task %s',
$this->e($author),
- $this->a(t('#%d', $task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']))
+ $this->url->link(t('#%d', $task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']))
) ?>
</p>
<div class="activity-description">
diff --git a/app/Template/event/task_assignee_change.php b/app/Template/event/task_assignee_change.php
index 38e2bca7..cdec8743 100644
--- a/app/Template/event/task_assignee_change.php
+++ b/app/Template/event/task_assignee_change.php
@@ -1,4 +1,4 @@
-<?= $this->avatar($email, $author) ?>
+<?= $this->user->avatar($email, $author) ?>
<p class="activity-title">
<?php $assignee = $task['assignee_name'] ?: $task['assignee_username'] ?>
@@ -6,11 +6,11 @@
<?php if (! empty($assignee)): ?>
<?= e('%s changed the assignee of the task %s to %s',
$this->e($author),
- $this->a(t('#%d', $task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])),
+ $this->url->link(t('#%d', $task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])),
$this->e($assignee)
) ?>
<?php else: ?>
- <?= e('%s remove the assignee of the task %s', $this->e($author), $this->a(t('#%d', $task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']))) ?>
+ <?= e('%s remove the assignee of the task %s', $this->e($author), $this->url->link(t('#%d', $task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']))) ?>
<?php endif ?>
</p>
<p class="activity-description">
diff --git a/app/Template/event/task_close.php b/app/Template/event/task_close.php
index afedbef3..3d8670a6 100644
--- a/app/Template/event/task_close.php
+++ b/app/Template/event/task_close.php
@@ -1,9 +1,9 @@
-<?= $this->avatar($email, $author) ?>
+<?= $this->user->avatar($email, $author) ?>
<p class="activity-title">
<?= e('%s closed the task %s',
$this->e($author),
- $this->a(t('#%d', $task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']))
+ $this->url->link(t('#%d', $task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']))
) ?>
</p>
<p class="activity-description">
diff --git a/app/Template/event/task_create.php b/app/Template/event/task_create.php
index 4b920234..773f401c 100644
--- a/app/Template/event/task_create.php
+++ b/app/Template/event/task_create.php
@@ -1,9 +1,9 @@
-<?= $this->avatar($email, $author) ?>
+<?= $this->user->avatar($email, $author) ?>
<p class="activity-title">
<?= e('%s created the task %s',
$this->e($author),
- $this->a(t('#%d', $task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']))
+ $this->url->link(t('#%d', $task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']))
) ?>
</p>
<p class="activity-description">
diff --git a/app/Template/event/task_move_column.php b/app/Template/event/task_move_column.php
index e97a3ab7..ca482e46 100644
--- a/app/Template/event/task_move_column.php
+++ b/app/Template/event/task_move_column.php
@@ -1,9 +1,9 @@
-<?= $this->avatar($email, $author) ?>
+<?= $this->user->avatar($email, $author) ?>
<p class="activity-title">
<?= e('%s moved the task %s to the column "%s"',
$this->e($author),
- $this->a(t('#%d', $task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])),
+ $this->url->link(t('#%d', $task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])),
$this->e($task['column_title'])
) ?>
</p>
diff --git a/app/Template/event/task_move_position.php b/app/Template/event/task_move_position.php
index 2ed4ffe8..dcdd3e1b 100644
--- a/app/Template/event/task_move_position.php
+++ b/app/Template/event/task_move_position.php
@@ -1,9 +1,9 @@
-<?= $this->avatar($email, $author) ?>
+<?= $this->user->avatar($email, $author) ?>
<p class="activity-title">
<?= e('%s moved the task %s to the position #%d in the column "%s"',
$this->e($author),
- $this->a(t('#%d', $task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])),
+ $this->url->link(t('#%d', $task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])),
$task['position'],
$this->e($task['column_title'])
) ?>
diff --git a/app/Template/event/task_open.php b/app/Template/event/task_open.php
index 9a408449..11fec64b 100644
--- a/app/Template/event/task_open.php
+++ b/app/Template/event/task_open.php
@@ -1,9 +1,9 @@
-<?= $this->avatar($email, $author) ?>
+<?= $this->user->avatar($email, $author) ?>
<p class="activity-title">
<?= e('%s opened the task %s',
$this->e($author),
- $this->a(t('#%d', $task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']))
+ $this->url->link(t('#%d', $task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']))
) ?>
</p>
<p class="activity-description">
diff --git a/app/Template/event/task_update.php b/app/Template/event/task_update.php
index 0f81870b..7d036d43 100644
--- a/app/Template/event/task_update.php
+++ b/app/Template/event/task_update.php
@@ -1,9 +1,9 @@
-<?= $this->avatar($email, $author) ?>
+<?= $this->user->avatar($email, $author) ?>
<p class="activity-title">
<?= e('%s updated the task %s',
$this->e($author),
- $this->a(t('#%d', $task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']))
+ $this->url->link(t('#%d', $task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']))
) ?>
</p>
<p class="activity-description">
diff --git a/app/Template/export/subtasks.php b/app/Template/export/subtasks.php
index aa999a56..d22b96a4 100644
--- a/app/Template/export/subtasks.php
+++ b/app/Template/export/subtasks.php
@@ -6,15 +6,15 @@
<form method="get" action="?" autocomplete="off">
- <?= $this->formHidden('controller', $values) ?>
- <?= $this->formHidden('action', $values) ?>
- <?= $this->formHidden('project_id', $values) ?>
+ <?= $this->form->hidden('controller', $values) ?>
+ <?= $this->form->hidden('action', $values) ?>
+ <?= $this->form->hidden('project_id', $values) ?>
- <?= $this->formLabel(t('Start Date'), 'from') ?>
- <?= $this->formText('from', $values, $errors, array('required', 'placeholder="'.$this->inList($date_format, $date_formats).'"'), 'form-date') ?><br/>
+ <?= $this->form->label(t('Start Date'), 'from') ?>
+ <?= $this->form->text('from', $values, $errors, array('required', 'placeholder="'.$this->text->in($date_format, $date_formats).'"'), 'form-date') ?><br/>
- <?= $this->formLabel(t('End Date'), 'to') ?>
- <?= $this->formText('to', $values, $errors, array('required', 'placeholder="'.$this->inList($date_format, $date_formats).'"'), 'form-date') ?>
+ <?= $this->form->label(t('End Date'), 'to') ?>
+ <?= $this->form->text('to', $values, $errors, array('required', 'placeholder="'.$this->text->in($date_format, $date_formats).'"'), 'form-date') ?>
<div class="form-help"><?= t('Others formats accepted: %s and %s', date('Y-m-d'), date('Y_m_d')) ?></div>
diff --git a/app/Template/export/summary.php b/app/Template/export/summary.php
index 191d36b6..ffbd6ac2 100644
--- a/app/Template/export/summary.php
+++ b/app/Template/export/summary.php
@@ -8,15 +8,15 @@
<form method="get" action="?" autocomplete="off">
- <?= $this->formHidden('controller', $values) ?>
- <?= $this->formHidden('action', $values) ?>
- <?= $this->formHidden('project_id', $values) ?>
+ <?= $this->form->hidden('controller', $values) ?>
+ <?= $this->form->hidden('action', $values) ?>
+ <?= $this->form->hidden('project_id', $values) ?>
- <?= $this->formLabel(t('Start Date'), 'from') ?>
- <?= $this->formText('from', $values, $errors, array('required', 'placeholder="'.$this->inList($date_format, $date_formats).'"'), 'form-date') ?><br/>
+ <?= $this->form->label(t('Start Date'), 'from') ?>
+ <?= $this->form->text('from', $values, $errors, array('required', 'placeholder="'.$this->text->in($date_format, $date_formats).'"'), 'form-date') ?><br/>
- <?= $this->formLabel(t('End Date'), 'to') ?>
- <?= $this->formText('to', $values, $errors, array('required', 'placeholder="'.$this->inList($date_format, $date_formats).'"'), 'form-date') ?>
+ <?= $this->form->label(t('End Date'), 'to') ?>
+ <?= $this->form->text('to', $values, $errors, array('required', 'placeholder="'.$this->text->in($date_format, $date_formats).'"'), 'form-date') ?>
<div class="form-help"><?= t('Others formats accepted: %s and %s', date('Y-m-d'), date('Y_m_d')) ?></div>
diff --git a/app/Template/export/tasks.php b/app/Template/export/tasks.php
index e502085c..5c5e2172 100644
--- a/app/Template/export/tasks.php
+++ b/app/Template/export/tasks.php
@@ -6,15 +6,15 @@
<form method="get" action="?" autocomplete="off">
- <?= $this->formHidden('controller', $values) ?>
- <?= $this->formHidden('action', $values) ?>
- <?= $this->formHidden('project_id', $values) ?>
+ <?= $this->form->hidden('controller', $values) ?>
+ <?= $this->form->hidden('action', $values) ?>
+ <?= $this->form->hidden('project_id', $values) ?>
- <?= $this->formLabel(t('Start Date'), 'from') ?>
- <?= $this->formText('from', $values, $errors, array('required', 'placeholder="'.$this->inList($date_format, $date_formats).'"'), 'form-date') ?><br/>
+ <?= $this->form->label(t('Start Date'), 'from') ?>
+ <?= $this->form->text('from', $values, $errors, array('required', 'placeholder="'.$this->text->in($date_format, $date_formats).'"'), 'form-date') ?><br/>
- <?= $this->formLabel(t('End Date'), 'to') ?>
- <?= $this->formText('to', $values, $errors, array('required', 'placeholder="'.$this->inList($date_format, $date_formats).'"'), 'form-date') ?>
+ <?= $this->form->label(t('End Date'), 'to') ?>
+ <?= $this->form->text('to', $values, $errors, array('required', 'placeholder="'.$this->text->in($date_format, $date_formats).'"'), 'form-date') ?>
<div class="form-help"><?= t('Others formats accepted: %s and %s', date('Y-m-d'), date('Y_m_d')) ?></div>
diff --git a/app/Template/export/transitions.php b/app/Template/export/transitions.php
index 7cd190e0..bf6ef249 100644
--- a/app/Template/export/transitions.php
+++ b/app/Template/export/transitions.php
@@ -8,15 +8,15 @@
<form method="get" action="?" autocomplete="off">
- <?= $this->formHidden('controller', $values) ?>
- <?= $this->formHidden('action', $values) ?>
- <?= $this->formHidden('project_id', $values) ?>
+ <?= $this->form->hidden('controller', $values) ?>
+ <?= $this->form->hidden('action', $values) ?>
+ <?= $this->form->hidden('project_id', $values) ?>
- <?= $this->formLabel(t('Start Date'), 'from') ?>
- <?= $this->formText('from', $values, $errors, array('required', 'placeholder="'.$this->inList($date_format, $date_formats).'"'), 'form-date') ?><br/>
+ <?= $this->form->label(t('Start Date'), 'from') ?>
+ <?= $this->form->text('from', $values, $errors, array('required', 'placeholder="'.$this->text->in($date_format, $date_formats).'"'), 'form-date') ?><br/>
- <?= $this->formLabel(t('End Date'), 'to') ?>
- <?= $this->formText('to', $values, $errors, array('required', 'placeholder="'.$this->inList($date_format, $date_formats).'"'), 'form-date') ?>
+ <?= $this->form->label(t('End Date'), 'to') ?>
+ <?= $this->form->text('to', $values, $errors, array('required', 'placeholder="'.$this->text->in($date_format, $date_formats).'"'), 'form-date') ?>
<div class="form-help"><?= t('Others formats accepted: %s and %s', date('Y-m-d'), date('Y_m_d')) ?></div>
diff --git a/app/Template/file/new.php b/app/Template/file/new.php
index 4f0c233b..a1a59eae 100644
--- a/app/Template/file/new.php
+++ b/app/Template/file/new.php
@@ -2,13 +2,13 @@
<h2><?= t('Attach a document') ?></h2>
</div>
-<form action="<?= $this->u('file', 'save', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>" method="post" enctype="multipart/form-data">
- <?= $this->formCsrf() ?>
+<form action="<?= $this->url->href('file', 'save', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>" method="post" enctype="multipart/form-data">
+ <?= $this->form->csrf() ?>
<input type="file" name="files[]" multiple />
- <div class="form-help"><?= t('Maximum size: ') ?><?= is_integer($max_size) ? $this->formatBytes($max_size) : $max_size ?></div>
+ <div class="form-help"><?= t('Maximum size: ') ?><?= is_integer($max_size) ? $this->text->bytes($max_size) : $max_size ?></div>
<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> \ No newline at end of file
diff --git a/app/Template/file/open.php b/app/Template/file/open.php
index 70e0f8aa..3df012b6 100644
--- a/app/Template/file/open.php
+++ b/app/Template/file/open.php
@@ -1,6 +1,6 @@
<div class="page-header">
<h2><?= $this->e($file['name']) ?></h2>
<div class="task-file-viewer">
- <img src="<?= $this->u('file', 'image', array('file_id' => $file['id'], 'project_id' => $task['project_id'], 'task_id' => $file['task_id'])) ?>" alt="<?= $this->e($file['name']) ?>"/>
+ <img src="<?= $this->url->href('file', 'image', array('file_id' => $file['id'], 'project_id' => $task['project_id'], 'task_id' => $file['task_id'])) ?>" alt="<?= $this->e($file['name']) ?>"/>
</div>
</div> \ No newline at end of file
diff --git a/app/Template/file/remove.php b/app/Template/file/remove.php
index 04ec30d5..37f648eb 100644
--- a/app/Template/file/remove.php
+++ b/app/Template/file/remove.php
@@ -8,8 +8,8 @@
</p>
<div class="form-actions">
- <?= $this->a(t('Yes'), 'file', 'remove', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id']), true, 'btn btn-red') ?>
+ <?= $this->url->link(t('Yes'), 'file', 'remove', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['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> \ No newline at end of file
diff --git a/app/Template/file/screenshot.php b/app/Template/file/screenshot.php
index 299bf615..89d9324c 100644
--- a/app/Template/file/screenshot.php
+++ b/app/Template/file/screenshot.php
@@ -6,12 +6,12 @@
<p id="screenshot-inner"><?= t('Take a screenshot and press CTRL+V or ⌘+V to paste here.') ?></p>
</div>
-<form action="<?= $this->u('file', 'screenshot', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'redirect' => $redirect)) ?>" method="post">
+<form action="<?= $this->url->href('file', 'screenshot', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'redirect' => $redirect)) ?>" method="post">
<input type="hidden" name="screenshot"/>
- <?= $this->formCsrf() ?>
+ <?= $this->form->csrf() ?>
<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']), false, 'close-popover') ?>
+ <?= $this->url->link(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?>
</div>
</form>
diff --git a/app/Template/file/show.php b/app/Template/file/show.php
index 3ce7f9f4..7d5dc96f 100644
--- a/app/Template/file/show.php
+++ b/app/Template/file/show.php
@@ -11,19 +11,19 @@
<li>
<?php if (function_exists('imagecreatetruecolor')): ?>
<div class="img_container">
- <img src="<?= $this->u('file', 'thumbnail', array('width' => 250, 'height' => 100, 'file_id' => $file['id'], 'project_id' => $task['project_id'], 'task_id' => $file['task_id'])) ?>" alt="<?= $this->e($file['name']) ?>"/>
+ <img src="<?= $this->url->href('file', 'thumbnail', array('width' => 250, 'height' => 100, 'file_id' => $file['id'], 'project_id' => $task['project_id'], 'task_id' => $file['task_id'])) ?>" alt="<?= $this->e($file['name']) ?>"/>
</div>
<?php endif ?>
<p>
<?= $this->e($file['name']) ?>
- <span class="column-tooltip" title='<?= t('uploaded by: %s', $file['user_name'] ?: $file['username']).'<br>'.t('uploaded on: %s', dt('%B %e, %Y at %k:%M %p', $file['date'])).'<br>'.t('size: %s', $this->formatBytes($file['size'])) ?>'>
+ <span class="column-tooltip" title='<?= t('uploaded by: %s', $file['user_name'] ?: $file['username']).'<br>'.t('uploaded on: %s', dt('%B %e, %Y at %k:%M %p', $file['date'])).'<br>'.t('size: %s', $this->text->bytes($file['size'])) ?>'>
<i class="fa fa-info-circle"></i>
</span>
</p>
<span class="task-show-file-actions task-show-image-actions">
- <i class="fa fa-eye"></i> <?= $this->a(t('open'), 'file', 'open', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id']), false, 'popover') ?>
- <i class="fa fa-trash"></i> <?= $this->a(t('remove'), 'file', 'confirm', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id'])) ?>
- <i class="fa fa-download"></i> <?= $this->a(t('download'), 'file', 'download', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id'])) ?>
+ <i class="fa fa-eye"></i> <?= $this->url->link(t('open'), 'file', 'open', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id']), false, 'popover') ?>
+ <i class="fa fa-trash"></i> <?= $this->url->link(t('remove'), 'file', 'confirm', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id'])) ?>
+ <i class="fa fa-download"></i> <?= $this->url->link(t('download'), 'file', 'download', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id'])) ?>
</span>
</li>
<?php endforeach ?>
@@ -35,17 +35,17 @@
<table class="task-show-file-table">
<?php foreach ($files as $file): ?>
<tr>
- <td><i class="fa <?= $this->getFileIcon($file['name']) ?> fa-fw"></i></td>
+ <td><i class="fa <?= $this->file->icon($file['name']) ?> fa-fw"></i></td>
<td>
<?= $this->e($file['name']) ?>
- <span class="column-tooltip" title='<?= t('uploaded by: %s', $file['user_name'] ?: $file['username']).'<br>'.t('uploaded on: %s', dt('%B %e, %Y at %k:%M %p', $file['date'])).'<br>'.t('size: %s', $this->formatBytes($file['size'])) ?>'>
+ <span class="column-tooltip" title='<?= t('uploaded by: %s', $file['user_name'] ?: $file['username']).'<br>'.t('uploaded on: %s', dt('%B %e, %Y at %k:%M %p', $file['date'])).'<br>'.t('size: %s', $this->text->bytes($file['size'])) ?>'>
<i class="fa fa-info-circle"></i>
</span>
</td>
<td>
<span class="task-show-file-actions">
- <i class="fa fa-trash"></i> <?= $this->a(t('remove'), 'file', 'confirm', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id'])) ?>
- <i class="fa fa-download"></i> <?= $this->a(t('download'), 'file', 'download', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id'])) ?>
+ <i class="fa fa-trash"></i> <?= $this->url->link(t('remove'), 'file', 'confirm', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id'])) ?>
+ <i class="fa fa-download"></i> <?= $this->url->link(t('download'), 'file', 'download', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id'])) ?>
</span>
</td>
</tr>
diff --git a/app/Template/hourlyrate/index.php b/app/Template/hourlyrate/index.php
index 9d0b77c8..af305d07 100644
--- a/app/Template/hourlyrate/index.php
+++ b/app/Template/hourlyrate/index.php
@@ -17,7 +17,7 @@
<td><?= $rate['currency'] ?></td>
<td><?= dt('%b %e, %Y', $rate['date_effective']) ?></td>
<td>
- <?= $this->a(t('Remove'), 'hourlyrate', 'confirm', array('user_id' => $user['id'], 'rate_id' => $rate['id'])) ?>
+ <?= $this->url->link(t('Remove'), 'hourlyrate', 'confirm', array('user_id' => $user['id'], 'rate_id' => $rate['id'])) ?>
</td>
</tr>
<?php endforeach ?>
@@ -26,19 +26,19 @@
<h3><?= t('Add new rate') ?></h3>
<?php endif ?>
-<form method="post" action="<?= $this->u('hourlyrate', 'save', array('user_id' => $user['id'])) ?>" autocomplete="off">
+<form method="post" action="<?= $this->url->href('hourlyrate', 'save', array('user_id' => $user['id'])) ?>" autocomplete="off">
- <?= $this->formHidden('user_id', $values) ?>
- <?= $this->formCsrf() ?>
+ <?= $this->form->hidden('user_id', $values) ?>
+ <?= $this->form->csrf() ?>
- <?= $this->formLabel(t('Hourly rate'), 'rate') ?>
- <?= $this->formText('rate', $values, $errors, array('required'), 'form-numeric') ?>
+ <?= $this->form->label(t('Hourly rate'), 'rate') ?>
+ <?= $this->form->text('rate', $values, $errors, array('required'), 'form-numeric') ?>
- <?= $this->formLabel(t('Currency'), 'currency') ?>
- <?= $this->formSelect('currency', $currencies_list, $values, $errors, array('required')) ?>
+ <?= $this->form->label(t('Currency'), 'currency') ?>
+ <?= $this->form->select('currency', $currencies_list, $values, $errors, array('required')) ?>
- <?= $this->formLabel(t('Effective date'), 'date_effective') ?>
- <?= $this->formText('date_effective', $values, $errors, array('required'), 'form-date') ?>
+ <?= $this->form->label(t('Effective date'), 'date_effective') ?>
+ <?= $this->form->text('date_effective', $values, $errors, array('required'), 'form-date') ?>
<div class="form-actions">
<input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
diff --git a/app/Template/hourlyrate/remove.php b/app/Template/hourlyrate/remove.php
index 7f22728e..121436e4 100644
--- a/app/Template/hourlyrate/remove.php
+++ b/app/Template/hourlyrate/remove.php
@@ -6,8 +6,8 @@
<p class="alert alert-info"><?= t('Do you really want to remove this hourly rate?') ?></p>
<div class="form-actions">
- <?= $this->a(t('Yes'), 'hourlyrate', 'remove', array('user_id' => $user['id'], 'rate_id' => $rate_id), true, 'btn btn-red') ?>
+ <?= $this->url->link(t('Yes'), 'hourlyrate', 'remove', array('user_id' => $user['id'], 'rate_id' => $rate_id), true, 'btn btn-red') ?>
<?= t('or') ?>
- <?= $this->a(t('cancel'), 'hourlyrate', 'index', array('user_id' => $user['id'])) ?>
+ <?= $this->url->link(t('cancel'), 'hourlyrate', 'index', array('user_id' => $user['id'])) ?>
</div>
</div> \ No newline at end of file
diff --git a/app/Template/layout.php b/app/Template/layout.php
index 7baecde9..cf74c8ab 100644
--- a/app/Template/layout.php
+++ b/app/Template/layout.php
@@ -11,16 +11,13 @@
<?php endif ?>
<?php if (! isset($not_editable)): ?>
- <?= $this->js('assets/js/app.js') ?>
+ <?= $this->asset->js('assets/js/app.js') ?>
<?php endif ?>
- <?= $this->css($this->u('app', 'colors'), false, 'all') ?>
- <?= $this->css('assets/css/app.css') ?>
- <?= $this->css('assets/css/print.css', true, 'print') ?>
-
- <?php if ($this->config->get('application_stylesheet')): ?>
- <style><?= $this->config->get('application_stylesheet') ?></style>
- <?php endif ?>
+ <?= $this->asset->css($this->url->href('app', 'colors'), false, 'all') ?>
+ <?= $this->asset->css('assets/css/app.css') ?>
+ <?= $this->asset->css('assets/css/print.css', true, 'print') ?>
+ <?= $this->asset->customCss() ?>
<link rel="icon" type="image/png" href="assets/img/favicon.png">
<link rel="apple-touch-icon" href="assets/img/touch-icon-iphone.png">
@@ -30,19 +27,19 @@
<title><?= isset($title) ? $this->e($title) : 'Kanboard' ?></title>
</head>
- <body data-status-url="<?= $this->u('app', 'status') ?>"
- data-login-url="<?= $this->u('auth', 'login') ?>"
- data-timezone="<?= $this->getTimezone() ?>"
- data-js-lang="<?= $this->jsLang() ?>">
+ <body data-status-url="<?= $this->url->href('app', 'status') ?>"
+ data-login-url="<?= $this->url->href('auth', 'login') ?>"
+ data-timezone="<?= $this->app->getTimezone() ?>"
+ data-js-lang="<?= $this->app->jsLang() ?>">
<?php if (isset($no_layout) && $no_layout): ?>
<?= $content_for_layout ?>
<?php else: ?>
<header>
<nav>
- <h1><?= $this->a('K<span>B</span>', 'app', 'index', array(), false, 'logo', t('Dashboard')).' '.$this->summary($this->e($title)) ?>
+ <h1><?= $this->url->link('K<span>B</span>', 'app', 'index', array(), false, 'logo', t('Dashboard')).' '.$this->text->truncate($this->e($title)) ?>
<?php if (! empty($description)): ?>
- <span class="column-tooltip" title='<?= $this->e($this->markdown($description)) ?>'>
+ <span class="column-tooltip" title='<?= $this->e($this->text->markdown($description)) ?>'>
<i class="fa fa-info-circle"></i>
</span>
<?php endif ?>
@@ -50,7 +47,7 @@
<ul>
<?php if (isset($board_selector) && ! empty($board_selector)): ?>
<li>
- <select id="board-selector" data-notfound="<?= t('No results match:') ?>" data-placeholder="<?= t('Display another project') ?>" data-board-url="<?= $this->u('board', 'show', array('project_id' => 'PROJECT_ID')) ?>">
+ <select id="board-selector" data-notfound="<?= t('No results match:') ?>" data-placeholder="<?= t('Display another project') ?>" data-board-url="<?= $this->url->href('board', 'show', array('project_id' => 'PROJECT_ID')) ?>">
<option value=""></option>
<?php foreach($board_selector as $board_id => $board_name): ?>
<option value="<?= $board_id ?>"><?= $this->e($board_name) ?></option>
@@ -59,15 +56,14 @@
</li>
<?php endif ?>
<li>
- <?= $this->a(t('Logout'), 'auth', 'logout') ?>
- <span class="username hide-tablet">(<?= $this->a($this->e($this->getFullname()), 'user', 'show', array('user_id' => $this->userSession->getId())) ?>)</span>
+ <?= $this->url->link(t('Logout'), 'auth', 'logout') ?>
+ <span class="username hide-tablet">(<?= $this->user->getProfileLink() ?>)</span>
</li>
</ul>
</nav>
</header>
<section class="page">
- <?= $this->flash('<div class="alert alert-success alert-fade-out">%s</div>') ?>
- <?= $this->flashError('<div class="alert alert-error">%s</div>') ?>
+ <?= $this->app->flashMessage() ?>
<?= $content_for_layout ?>
</section>
<?php endif ?>
diff --git a/app/Template/link/create.php b/app/Template/link/create.php
index 12589574..2b4ac62c 100644
--- a/app/Template/link/create.php
+++ b/app/Template/link/create.php
@@ -2,15 +2,15 @@
<h2><?= t('Add a new link') ?></h2>
</div>
-<form action="<?= $this->u('link', 'save') ?>" method="post" autocomplete="off">
+<form action="<?= $this->url->href('link', 'save') ?>" method="post" autocomplete="off">
- <?= $this->formCsrf() ?>
+ <?= $this->form->csrf() ?>
- <?= $this->formLabel(t('Label'), 'label') ?>
- <?= $this->formText('label', $values, $errors, array('required')) ?>
+ <?= $this->form->label(t('Label'), 'label') ?>
+ <?= $this->form->text('label', $values, $errors, array('required')) ?>
- <?= $this->formLabel(t('Opposite label'), 'opposite_label') ?>
- <?= $this->formText('opposite_label', $values, $errors) ?>
+ <?= $this->form->label(t('Opposite label'), 'opposite_label') ?>
+ <?= $this->form->text('opposite_label', $values, $errors) ?>
<div class="form-actions">
<input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
diff --git a/app/Template/link/edit.php b/app/Template/link/edit.php
index d9ce280c..516de464 100644
--- a/app/Template/link/edit.php
+++ b/app/Template/link/edit.php
@@ -2,20 +2,20 @@
<h2><?= t('Link modification') ?></h2>
</div>
-<form action="<?= $this->u('link', 'update', array('link_id' => $link['id'])) ?>" method="post" autocomplete="off">
+<form action="<?= $this->url->href('link', 'update', array('link_id' => $link['id'])) ?>" method="post" autocomplete="off">
- <?= $this->formCsrf() ?>
- <?= $this->formHidden('id', $values) ?>
+ <?= $this->form->csrf() ?>
+ <?= $this->form->hidden('id', $values) ?>
- <?= $this->formLabel(t('Label'), 'label') ?>
- <?= $this->formText('label', $values, $errors, array('required')) ?>
+ <?= $this->form->label(t('Label'), 'label') ?>
+ <?= $this->form->text('label', $values, $errors, array('required')) ?>
- <?= $this->formLabel(t('Opposite label'), 'opposite_id') ?>
- <?= $this->formSelect('opposite_id', $labels, $values, $errors) ?>
+ <?= $this->form->label(t('Opposite label'), 'opposite_id') ?>
+ <?= $this->form->select('opposite_id', $labels, $values, $errors) ?>
<div class="form-actions">
<input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
<?= t('or') ?>
- <?= $this->a(t('cancel'), 'link', 'index') ?>
+ <?= $this->url->link(t('cancel'), 'link', 'index') ?>
</div>
</form> \ No newline at end of file
diff --git a/app/Template/link/index.php b/app/Template/link/index.php
index 90d1c357..1475bd50 100644
--- a/app/Template/link/index.php
+++ b/app/Template/link/index.php
@@ -18,9 +18,9 @@
</td>
<td>
<ul>
- <?= $this->a(t('Edit'), 'link', 'edit', array('link_id' => $link['id'])) ?>
+ <?= $this->url->link(t('Edit'), 'link', 'edit', array('link_id' => $link['id'])) ?>
<?= t('or') ?>
- <?= $this->a(t('Remove'), 'link', 'confirm', array('link_id' => $link['id'])) ?>
+ <?= $this->url->link(t('Remove'), 'link', 'confirm', array('link_id' => $link['id'])) ?>
</ul>
</td>
</tr>
diff --git a/app/Template/link/remove.php b/app/Template/link/remove.php
index a802feb0..12ca14bb 100644
--- a/app/Template/link/remove.php
+++ b/app/Template/link/remove.php
@@ -8,8 +8,8 @@
</p>
<div class="form-actions">
- <?= $this->a(t('Yes'), 'link', 'remove', array('link_id' => $link['id']), true, 'btn btn-red') ?>
+ <?= $this->url->link(t('Yes'), 'link', 'remove', array('link_id' => $link['id']), true, 'btn btn-red') ?>
<?= t('or') ?>
- <?= $this->a(t('cancel'), 'link', 'index') ?>
+ <?= $this->url->link(t('cancel'), 'link', 'index') ?>
</div>
</div> \ No newline at end of file
diff --git a/app/Template/notification/comment_creation.php b/app/Template/notification/comment_creation.php
index b28e261a..747c4f43 100644
--- a/app/Template/notification/comment_creation.php
+++ b/app/Template/notification/comment_creation.php
@@ -2,6 +2,6 @@
<h3><?= t('New comment posted by %s', $comment['name'] ?: $comment['username']) ?></h3>
-<?= $this->markdown($comment['comment']) ?>
+<?= $this->text->markdown($comment['comment']) ?>
<?= $this->render('notification/footer', array('task' => $task, 'application_url' => $application_url)) ?> \ No newline at end of file
diff --git a/app/Template/notification/comment_update.php b/app/Template/notification/comment_update.php
index 88154f0b..a15e5d6d 100644
--- a/app/Template/notification/comment_update.php
+++ b/app/Template/notification/comment_update.php
@@ -2,6 +2,6 @@
<h3><?= t('Comment updated') ?></h3>
-<?= $this->markdown($comment['comment']) ?>
+<?= $this->text->markdown($comment['comment']) ?>
<?= $this->render('notification/footer', array('task' => $task, 'application_url' => $application_url)) ?> \ No newline at end of file
diff --git a/app/Template/notification/footer.php b/app/Template/notification/footer.php
index 4de1487e..7041c43b 100644
--- a/app/Template/notification/footer.php
+++ b/app/Template/notification/footer.php
@@ -2,5 +2,5 @@
Kanboard
<?php if (isset($application_url) && ! empty($application_url)): ?>
- - <a href="<?= $application_url.$this->u('task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>"><?= t('view the task on Kanboard') ?></a>.
+ - <a href="<?= $application_url.$this->url->href('task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>"><?= t('view the task on Kanboard') ?></a>.
<?php endif ?>
diff --git a/app/Template/notification/task_assignee_change.php b/app/Template/notification/task_assignee_change.php
index faab92f3..c9729ac9 100644
--- a/app/Template/notification/task_assignee_change.php
+++ b/app/Template/notification/task_assignee_change.php
@@ -14,7 +14,7 @@
<?php if (! empty($task['description'])): ?>
<h2><?= t('Description') ?></h2>
- <?= $this->markdown($task['description']) ?: t('There is no description.') ?>
+ <?= $this->text->markdown($task['description']) ?: t('There is no description.') ?>
<?php endif ?>
<?= $this->render('notification/footer', array('task' => $task, 'application_url' => $application_url)) ?> \ No newline at end of file
diff --git a/app/Template/notification/task_creation.php b/app/Template/notification/task_creation.php
index dfd3e591..0905d3f5 100644
--- a/app/Template/notification/task_creation.php
+++ b/app/Template/notification/task_creation.php
@@ -37,7 +37,7 @@
<?php if (! empty($task['description'])): ?>
<h2><?= t('Description') ?></h2>
- <?= $this->markdown($task['description']) ?>
+ <?= $this->text->markdown($task['description']) ?>
<?php endif ?>
<?= $this->render('notification/footer', array('task' => $task, 'application_url' => $application_url)) ?> \ No newline at end of file
diff --git a/app/Template/notification/task_due.php b/app/Template/notification/task_due.php
index 72c8de1b..7482424a 100644
--- a/app/Template/notification/task_due.php
+++ b/app/Template/notification/task_due.php
@@ -5,7 +5,7 @@
<li>
(<strong>#<?= $task['id'] ?></strong>)
<?php if ($application_url): ?>
- <a href="<?= $application_url.$this->u('task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>"><?= $this->e($task['title']) ?></a>
+ <a href="<?= $application_url.$this->url->href('task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>"><?= $this->e($task['title']) ?></a>
<?php else: ?>
<?= $this->e($task['title']) ?>
<?php endif ?>
diff --git a/app/Template/notification/task_update.php b/app/Template/notification/task_update.php
index 71e949dd..ffea49cd 100644
--- a/app/Template/notification/task_update.php
+++ b/app/Template/notification/task_update.php
@@ -37,7 +37,7 @@
<?php if (! empty($task['description'])): ?>
<h2><?= t('Description') ?></h2>
- <?= $this->markdown($task['description']) ?: t('There is no description.') ?>
+ <?= $this->text->markdown($task['description']) ?: t('There is no description.') ?>
<?php endif ?>
<?= $this->render('notification/footer', array('task' => $task, 'application_url' => $application_url)) ?> \ No newline at end of file
diff --git a/app/Template/project/activity.php b/app/Template/project/activity.php
index 7da6be5c..1c5dcb75 100644
--- a/app/Template/project/activity.php
+++ b/app/Template/project/activity.php
@@ -3,22 +3,22 @@
<ul>
<li>
<i class="fa fa-table fa-fw"></i>
- <?= $this->a(t('Back to the board'), 'board', 'show', array('project_id' => $project['id'])) ?>
+ <?= $this->url->link(t('Back to the board'), 'board', 'show', array('project_id' => $project['id'])) ?>
</li>
<li>
<i class="fa fa-calendar fa-fw"></i>
- <?= $this->a(t('Calendar'), 'calendar', 'show', array('project_id' => $project['id'])) ?>
+ <?= $this->url->link(t('Calendar'), 'calendar', 'show', array('project_id' => $project['id'])) ?>
</li>
<li>
<i class="fa fa-search fa-fw"></i>
- <?= $this->a(t('Search'), 'project', 'search', array('project_id' => $project['id'])) ?>
+ <?= $this->url->link(t('Search'), 'project', 'search', array('project_id' => $project['id'])) ?>
</li>
<li>
<i class="fa fa-check-square-o fa-fw"></i>
- <?= $this->a(t('Completed tasks'), 'project', 'tasks', array('project_id' => $project['id'])) ?>
+ <?= $this->url->link(t('Completed tasks'), 'project', 'tasks', array('project_id' => $project['id'])) ?>
</li>
<?php if ($project['is_public']): ?>
- <li><i class="fa fa-rss-square fa-fw"></i><?= $this->a(t('RSS feed'), 'project', 'feed', array('token' => $project['token']), false, '', '', true) ?></li>
+ <li><i class="fa fa-rss-square fa-fw"></i><?= $this->url->link(t('RSS feed'), 'project', 'feed', array('token' => $project['token']), false, '', '', true) ?></li>
<?php endif ?>
</ul>
</div>
diff --git a/app/Template/project/disable.php b/app/Template/project/disable.php
index 48a09a97..ddfcdca2 100644
--- a/app/Template/project/disable.php
+++ b/app/Template/project/disable.php
@@ -8,7 +8,7 @@
</p>
<div class="form-actions">
- <?= $this->a(t('Yes'), 'project', 'disable', array('project_id' => $project['id'], 'disable' => 'yes'), true, 'btn btn-red') ?>
- <?= t('or') ?> <?= $this->a(t('cancel'), 'project', 'show', array('project_id' => $project['id'])) ?>
+ <?= $this->url->link(t('Yes'), 'project', 'disable', array('project_id' => $project['id'], 'disable' => 'yes'), true, 'btn btn-red') ?>
+ <?= t('or') ?> <?= $this->url->link(t('cancel'), 'project', 'show', array('project_id' => $project['id'])) ?>
</div>
</div> \ No newline at end of file
diff --git a/app/Template/project/duplicate.php b/app/Template/project/duplicate.php
index 7e7fd85e..8967c306 100644
--- a/app/Template/project/duplicate.php
+++ b/app/Template/project/duplicate.php
@@ -6,18 +6,18 @@
<p class="alert alert-info">
<?= t('Which parts of the project do you want to duplicate?') ?>
</p>
- <form method="post" action="<?= $this->u('project', 'duplicate', array('project_id' => $project['id'], 'duplicate' => 'yes')) ?>" autocomplete="off">
+ <form method="post" action="<?= $this->url->href('project', 'duplicate', array('project_id' => $project['id'], 'duplicate' => 'yes')) ?>" autocomplete="off">
- <?= $this->formCsrf() ?>
+ <?= $this->form->csrf() ?>
- <?= $this->formCheckbox('category', t('Categories'), 1, true) ?>
- <?= $this->formCheckbox('action', t('Actions'), 1, true) ?>
- <?= $this->formCheckbox('swimlane', t('Swimlanes'), 1, false) ?>
- <?= $this->formCheckbox('task', t('Tasks'), 1, false) ?>
+ <?= $this->form->checkbox('category', t('Categories'), 1, true) ?>
+ <?= $this->form->checkbox('action', t('Actions'), 1, true) ?>
+ <?= $this->form->checkbox('swimlane', t('Swimlanes'), 1, false) ?>
+ <?= $this->form->checkbox('task', t('Tasks'), 1, false) ?>
<div class="form-actions">
<input type="submit" value="<?= t('Duplicate') ?>" class="btn btn-red"/>
- <?= t('or') ?> <?= $this->a(t('cancel'), 'project', 'show', array('project_id' => $project['id'])) ?>
+ <?= t('or') ?> <?= $this->url->link(t('cancel'), 'project', 'show', array('project_id' => $project['id'])) ?>
</div>
</form>
</div> \ No newline at end of file
diff --git a/app/Template/project/edit.php b/app/Template/project/edit.php
index 8b94e378..794267f4 100644
--- a/app/Template/project/edit.php
+++ b/app/Template/project/edit.php
@@ -1,28 +1,28 @@
<div class="page-header">
<h2><?= t('Edit project') ?></h2>
</div>
-<form method="post" action="<?= $this->u('project', 'update', array('project_id' => $project['id'])) ?>" autocomplete="off">
+<form method="post" action="<?= $this->url->href('project', 'update', array('project_id' => $project['id'])) ?>" autocomplete="off">
- <?= $this->formCsrf() ?>
- <?= $this->formHidden('id', $values) ?>
+ <?= $this->form->csrf() ?>
+ <?= $this->form->hidden('id', $values) ?>
- <?= $this->formLabel(t('Name'), 'name') ?>
- <?= $this->formText('name', $values, $errors, array('required', 'maxlength="50"')) ?>
+ <?= $this->form->label(t('Name'), 'name') ?>
+ <?= $this->form->text('name', $values, $errors, array('required', 'maxlength="50"')) ?>
- <?= $this->formLabel(t('Identifier'), 'identifier') ?>
- <?= $this->formText('identifier', $values, $errors, array('maxlength="50"')) ?>
+ <?= $this->form->label(t('Identifier'), 'identifier') ?>
+ <?= $this->form->text('identifier', $values, $errors, array('maxlength="50"')) ?>
<p class="form-help"><?= t('The project identifier is an optional alphanumeric code used to identify your project.') ?></p>
- <?php if ($this->userSession->isAdmin()): ?>
- <?= $this->formCheckbox('is_private', t('Private project'), 1, $project['is_private'] == 1) ?>
+ <?php if ($this->user->isAdmin()): ?>
+ <?= $this->form->checkbox('is_private', t('Private project'), 1, $project['is_private'] == 1) ?>
<?php endif ?>
- <?= $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/project/enable.php b/app/Template/project/enable.php
index b683ea7c..c10d2f12 100644
--- a/app/Template/project/enable.php
+++ b/app/Template/project/enable.php
@@ -8,7 +8,7 @@
</p>
<div class="form-actions">
- <?= $this->a(t('Yes'), 'project', 'enable', array('project_id' => $project['id'], 'enable' => 'yes'), true, 'btn btn-red') ?>
- <?= t('or') ?> <?= $this->a(t('cancel'), 'project', 'show', array('project_id' => $project['id'])) ?>
+ <?= $this->url->link(t('Yes'), 'project', 'enable', array('project_id' => $project['id'], 'enable' => 'yes'), true, 'btn btn-red') ?>
+ <?= t('or') ?> <?= $this->url->link(t('cancel'), 'project', 'show', array('project_id' => $project['id'])) ?>
</div>
</div> \ No newline at end of file
diff --git a/app/Template/project/feed.php b/app/Template/project/feed.php
index 14427af9..2062e801 100644
--- a/app/Template/project/feed.php
+++ b/app/Template/project/feed.php
@@ -1,16 +1,16 @@
<?= '<?xml version="1.0" encoding="utf-8"?>' ?>
<feed xml:lang="en-US" xmlns="http://www.w3.org/2005/Atom">
<title><?= t('%s\'s activity', $project['name']) ?></title>
- <link rel="alternate" type="text/html" href="<?= $this->getCurrentBaseUrl() ?>"/>
- <link rel="self" type="application/atom+xml" href="<?= $this->getCurrentBaseUrl().$this->u('project', 'feed', array('token' => $project['token'])) ?>"/>
+ <link rel="alternate" type="text/html" href="<?= $this->url->base() ?>"/>
+ <link rel="self" type="application/atom+xml" href="<?= $this->url->base().$this->url->href('project', 'feed', array('token' => $project['token'])) ?>"/>
<updated><?= date(DATE_ATOM) ?></updated>
- <id><?= $this->getCurrentBaseUrl() ?></id>
- <icon><?= $this->getCurrentBaseUrl() ?>assets/img/favicon.png</icon>
+ <id><?= $this->url->base() ?></id>
+ <icon><?= $this->url->base() ?>assets/img/favicon.png</icon>
<?php foreach ($events as $e): ?>
<entry>
<title type="text"><?= $e['event_title'] ?></title>
- <link rel="alternate" href="<?= $this->getCurrentBaseUrl().$this->u('task', 'show', array('task_id' => $e['task_id'])) ?>"/>
+ <link rel="alternate" href="<?= $this->url->base().$this->url->href('task', 'show', array('task_id' => $e['task_id'])) ?>"/>
<id><?= $e['id'].'-'.$e['event_name'].'-'.$e['task_id'].'-'.$e['date_creation'] ?></id>
<published><?= date(DATE_ATOM, $e['date_creation']) ?></published>
<updated><?= date(DATE_ATOM, $e['date_creation']) ?></updated>
diff --git a/app/Template/project/index.php b/app/Template/project/index.php
index 8d2bc30b..1080968e 100644
--- a/app/Template/project/index.php
+++ b/app/Template/project/index.php
@@ -1,10 +1,10 @@
<section id="main">
<div class="page-header">
<ul>
- <?php if ($this->userSession->isAdmin()): ?>
- <li><i class="fa fa-plus fa-fw"></i><?= $this->a(t('New project'), 'project', 'create') ?></li>
+ <?php if ($this->user->isAdmin()): ?>
+ <li><i class="fa fa-plus fa-fw"></i><?= $this->url->link(t('New project'), 'project', 'create') ?></li>
<?php endif ?>
- <li><i class="fa fa-lock fa-fw"></i><?= $this->a(t('New private project'), 'project', 'create', array('private' => 1)) ?></li>
+ <li><i class="fa fa-lock fa-fw"></i><?= $this->url->link(t('New private project'), 'project', 'create', array('private' => 1)) ?></li>
</ul>
</div>
<section>
@@ -22,7 +22,7 @@
<?php foreach ($paginator->getCollection() as $project): ?>
<tr>
<td>
- <?= $this->a('#'.$project['id'], 'board', 'show', array('project_id' => $project['id']), false, 'dashboard-table-link') ?>
+ <?= $this->url->link('#'.$project['id'], 'board', 'show', array('project_id' => $project['id']), false, 'dashboard-table-link') ?>
</td>
<td>
<?php if ($project['is_active']): ?>
@@ -35,7 +35,7 @@
<?= $this->e($project['identifier']) ?>
</td>
<td>
- <?= $this->a('<i class="fa fa-table"></i>', 'board', 'show', array('project_id' => $project['id']), false, 'dashboard-table-link', t('Board')) ?>&nbsp;
+ <?= $this->url->link('<i class="fa fa-table"></i>', 'board', 'show', array('project_id' => $project['id']), false, 'dashboard-table-link', t('Board')) ?>&nbsp;
<?php if ($project['is_public']): ?>
<i class="fa fa-share-alt fa-fw"></i>
@@ -44,9 +44,9 @@
<i class="fa fa-lock fa-fw"></i>
<?php endif ?>
- <?= $this->a($this->e($project['name']), 'project', 'show', array('project_id' => $project['id'])) ?>
+ <?= $this->url->link($this->e($project['name']), 'project', 'show', array('project_id' => $project['id'])) ?>
<?php if (! empty($project['description'])): ?>
- <span class="column-tooltip" title='<?= $this->e($this->markdown($project['description'])) ?>'>
+ <span class="column-tooltip" title='<?= $this->e($this->text->markdown($project['description'])) ?>'>
<i class="fa fa-info-circle"></i>
</span>
<?php endif ?>
diff --git a/app/Template/project/integrations.php b/app/Template/project/integrations.php
index d4fab23b..698e438c 100644
--- a/app/Template/project/integrations.php
+++ b/app/Template/project/integrations.php
@@ -2,53 +2,53 @@
<h2><?= t('Integration with third-party services') ?></h2>
</div>
-<form method="post" action="<?= $this->u('project', 'integration', array('project_id' => $project['id'])) ?>" autocomplete="off">
- <?= $this->formCsrf() ?>
+<form method="post" action="<?= $this->url->href('project', 'integration', array('project_id' => $project['id'])) ?>" autocomplete="off">
+ <?= $this->form->csrf() ?>
<h3><i class="fa fa-github fa-fw"></i>&nbsp;<?= t('Github webhooks') ?></h3>
<div class="listing">
- <input type="text" class="auto-select" readonly="readonly" value="<?= $this->getCurrentBaseUrl().$this->u('webhook', 'github', array('token' => $webhook_token, 'project_id' => $project['id'])) ?>"/><br/>
+ <input type="text" class="auto-select" readonly="readonly" value="<?= $this->url->base().$this->url->href('webhook', 'github', array('token' => $webhook_token, 'project_id' => $project['id'])) ?>"/><br/>
<p class="form-help"><a href="http://kanboard.net/documentation/github-webhooks" target="_blank"><?= t('Help on Github webhooks') ?></a></p>
</div>
<h3><img src="assets/img/gitlab-icon.png"/>&nbsp;<?= t('Gitlab webhooks') ?></h3>
<div class="listing">
- <input type="text" class="auto-select" readonly="readonly" value="<?= $this->getCurrentBaseUrl().$this->u('webhook', 'gitlab', array('token' => $webhook_token, 'project_id' => $project['id'])) ?>"/><br/>
+ <input type="text" class="auto-select" readonly="readonly" value="<?= $this->url->base().$this->url->href('webhook', 'gitlab', array('token' => $webhook_token, 'project_id' => $project['id'])) ?>"/><br/>
<p class="form-help"><a href="http://kanboard.net/documentation/gitlab-webhooks" target="_blank"><?= t('Help on Gitlab webhooks') ?></a></p>
</div>
<h3><i class="fa fa-bitbucket fa-fw"></i>&nbsp;<?= t('Bitbucket webhooks') ?></h3>
<div class="listing">
- <input type="text" class="auto-select" readonly="readonly" value="<?= $this->getCurrentBaseUrl().$this->u('webhook', 'bitbucket', array('token' => $webhook_token, 'project_id' => $project['id'])) ?>"/><br/>
+ <input type="text" class="auto-select" readonly="readonly" value="<?= $this->url->base().$this->url->href('webhook', 'bitbucket', array('token' => $webhook_token, 'project_id' => $project['id'])) ?>"/><br/>
<p class="form-help"><a href="http://kanboard.net/documentation/bitbucket-webhooks" target="_blank"><?= t('Help on Bitbucket webhooks') ?></a></p>
</div>
<h3><img src="assets/img/jabber-icon.png"/> <?= t('Jabber (XMPP)') ?></h3>
<div class="listing">
- <?= $this->formCheckbox('jabber', t('Send notifications to Jabber'), 1, isset($values['jabber']) && $values['jabber'] == 1) ?>
+ <?= $this->form->checkbox('jabber', t('Send notifications to Jabber'), 1, isset($values['jabber']) && $values['jabber'] == 1) ?>
- <?= $this->formLabel(t('XMPP server address'), 'jabber_server') ?>
- <?= $this->formText('jabber_server', $values, $errors, array('placeholder="tcp://myserver:5222"')) ?>
+ <?= $this->form->label(t('XMPP server address'), 'jabber_server') ?>
+ <?= $this->form->text('jabber_server', $values, $errors, array('placeholder="tcp://myserver:5222"')) ?>
<p class="form-help"><?= t('The server address must use this format: "tcp://hostname:5222"') ?></p>
- <?= $this->formLabel(t('Jabber domain'), 'jabber_domain') ?>
- <?= $this->formText('jabber_domain', $values, $errors, array('placeholder="example.com"')) ?>
+ <?= $this->form->label(t('Jabber domain'), 'jabber_domain') ?>
+ <?= $this->form->text('jabber_domain', $values, $errors, array('placeholder="example.com"')) ?>
- <?= $this->formLabel(t('Username'), 'jabber_username') ?>
- <?= $this->formText('jabber_username', $values, $errors) ?>
+ <?= $this->form->label(t('Username'), 'jabber_username') ?>
+ <?= $this->form->text('jabber_username', $values, $errors) ?>
- <?= $this->formLabel(t('Password'), 'jabber_password') ?>
- <?= $this->formPassword('jabber_password', $values, $errors) ?>
+ <?= $this->form->label(t('Password'), 'jabber_password') ?>
+ <?= $this->form->password('jabber_password', $values, $errors) ?>
- <?= $this->formLabel(t('Jabber nickname'), 'jabber_nickname') ?>
- <?= $this->formText('jabber_nickname', $values, $errors) ?>
+ <?= $this->form->label(t('Jabber nickname'), 'jabber_nickname') ?>
+ <?= $this->form->text('jabber_nickname', $values, $errors) ?>
- <?= $this->formLabel(t('Multi-user chat room'), 'jabber_room') ?>
- <?= $this->formText('jabber_room', $values, $errors, array('placeholder="myroom@conference.example.com"')) ?>
+ <?= $this->form->label(t('Multi-user chat room'), 'jabber_room') ?>
+ <?= $this->form->text('jabber_room', $values, $errors, array('placeholder="myroom@conference.example.com"')) ?>
<p class="form-help"><a href="http://kanboard.net/documentation/jabber" target="_blank"><?= t('Help on Jabber integration') ?></a></p>
@@ -60,16 +60,16 @@
<h3><img src="assets/img/hipchat-icon.png"/> <?= t('Hipchat') ?></h3>
<div class="listing">
- <?= $this->formCheckbox('hipchat', t('Send notifications to Hipchat'), 1, isset($values['hipchat']) && $values['hipchat'] == 1) ?>
+ <?= $this->form->checkbox('hipchat', t('Send notifications to Hipchat'), 1, isset($values['hipchat']) && $values['hipchat'] == 1) ?>
- <?= $this->formLabel(t('API URL'), 'hipchat_api_url') ?>
- <?= $this->formText('hipchat_api_url', $values, $errors) ?>
+ <?= $this->form->label(t('API URL'), 'hipchat_api_url') ?>
+ <?= $this->form->text('hipchat_api_url', $values, $errors) ?>
- <?= $this->formLabel(t('Room API ID or name'), 'hipchat_room_id') ?>
- <?= $this->formText('hipchat_room_id', $values, $errors) ?>
+ <?= $this->form->label(t('Room API ID or name'), 'hipchat_room_id') ?>
+ <?= $this->form->text('hipchat_room_id', $values, $errors) ?>
- <?= $this->formLabel(t('Room notification token'), 'hipchat_room_token') ?>
- <?= $this->formText('hipchat_room_token', $values, $errors) ?>
+ <?= $this->form->label(t('Room notification token'), 'hipchat_room_token') ?>
+ <?= $this->form->text('hipchat_room_token', $values, $errors) ?>
<p class="form-help"><a href="http://kanboard.net/documentation/hipchat" target="_blank"><?= t('Help on Hipchat integration') ?></a></p>
@@ -81,10 +81,10 @@
<h3><i class="fa fa-slack fa-fw"></i>&nbsp;<?= t('Slack') ?></h3>
<div class="listing">
- <?= $this->formCheckbox('slack', t('Send notifications to a Slack channel'), 1, isset($values['slack']) && $values['slack'] == 1) ?>
+ <?= $this->form->checkbox('slack', t('Send notifications to a Slack channel'), 1, isset($values['slack']) && $values['slack'] == 1) ?>
- <?= $this->formLabel(t('Webhook URL'), 'slack_webhook_url') ?>
- <?= $this->formText('slack_webhook_url', $values, $errors) ?>
+ <?= $this->form->label(t('Webhook URL'), 'slack_webhook_url') ?>
+ <?= $this->form->text('slack_webhook_url', $values, $errors) ?>
<p class="form-help"><a href="http://kanboard.net/documentation/slack" target="_blank"><?= t('Help on Slack integration') ?></a></p>
diff --git a/app/Template/project/layout.php b/app/Template/project/layout.php
index 8cd1fd3c..f5409500 100644
--- a/app/Template/project/layout.php
+++ b/app/Template/project/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' => $project['id'])) ?>
+ <?= $this->url->link(t('Back to the board'), 'board', 'show', array('project_id' => $project['id'])) ?>
</li>
<li>
<i class="fa fa-folder fa-fw"></i>
- <?= $this->a(t('All projects'), 'project', 'index') ?>
+ <?= $this->url->link(t('All projects'), 'project', 'index') ?>
</li>
</ul>
</div>
diff --git a/app/Template/project/new.php b/app/Template/project/new.php
index b68258b4..25b70ac2 100644
--- a/app/Template/project/new.php
+++ b/app/Template/project/new.php
@@ -1,20 +1,20 @@
<section id="main">
<div class="page-header">
<ul>
- <li><i class="fa fa-folder fa-fw"></i><?= $this->a(t('All projects'), 'project', 'index') ?></li>
+ <li><i class="fa fa-folder fa-fw"></i><?= $this->url->link(t('All projects'), 'project', 'index') ?></li>
</ul>
</div>
<section>
- <form method="post" action="<?= $this->u('project', 'save') ?>" autocomplete="off">
+ <form method="post" action="<?= $this->url->href('project', 'save') ?>" autocomplete="off">
- <?= $this->formCsrf() ?>
- <?= $this->formHidden('is_private', $values) ?>
- <?= $this->formLabel(t('Name'), 'name') ?>
- <?= $this->formText('name', $values, $errors, array('autofocus', 'required', 'maxlength="50"')) ?>
+ <?= $this->form->csrf() ?>
+ <?= $this->form->hidden('is_private', $values) ?>
+ <?= $this->form->label(t('Name'), 'name') ?>
+ <?= $this->form->text('name', $values, $errors, array('autofocus', 'required', 'maxlength="50"')) ?>
<div class="form-actions">
<input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
- <?= t('or') ?> <?= $this->a(t('cancel'), 'project', 'index') ?>
+ <?= t('or') ?> <?= $this->url->link(t('cancel'), 'project', 'index') ?>
</div>
</form>
</section>
diff --git a/app/Template/project/remove.php b/app/Template/project/remove.php
index 0f6fec78..fa43fc78 100644
--- a/app/Template/project/remove.php
+++ b/app/Template/project/remove.php
@@ -8,7 +8,7 @@
</p>
<div class="form-actions">
- <?= $this->a(t('Yes'), 'project', 'remove', array('project_id' => $project['id'], 'remove' => 'yes'), true, 'btn btn-red') ?>
- <?= t('or') ?> <?= $this->a(t('cancel'), 'project', 'show', array('project_id' => $project['id'])) ?>
+ <?= $this->url->link(t('Yes'), 'project', 'remove', array('project_id' => $project['id'], 'remove' => 'yes'), true, 'btn btn-red') ?>
+ <?= t('or') ?> <?= $this->url->link(t('cancel'), 'project', 'show', array('project_id' => $project['id'])) ?>
</div>
</div> \ No newline at end of file
diff --git a/app/Template/project/search.php b/app/Template/project/search.php
index 47ba0f77..a8e387c6 100644
--- a/app/Template/project/search.php
+++ b/app/Template/project/search.php
@@ -3,28 +3,28 @@
<ul>
<li>
<i class="fa fa-table fa-fw"></i>
- <?= $this->a(t('Back to the board'), 'board', 'show', array('project_id' => $project['id'])) ?>
+ <?= $this->url->link(t('Back to the board'), 'board', 'show', array('project_id' => $project['id'])) ?>
</li>
<li>
<i class="fa fa-calendar fa-fw"></i>
- <?= $this->a(t('Calendar'), 'calendar', 'show', array('project_id' => $project['id'])) ?>
+ <?= $this->url->link(t('Calendar'), 'calendar', 'show', array('project_id' => $project['id'])) ?>
</li>
<li>
<i class="fa fa-check-square-o fa-fw"></i>
- <?= $this->a(t('Completed tasks'), 'project', 'tasks', array('project_id' => $project['id'])) ?>
+ <?= $this->url->link(t('Completed tasks'), 'project', 'tasks', array('project_id' => $project['id'])) ?>
</li>
<li>
<i class="fa fa-dashboard fa-fw"></i>
- <?= $this->a(t('Activity'), 'project', 'activity', array('project_id' => $project['id'])) ?>
+ <?= $this->url->link(t('Activity'), 'project', 'activity', array('project_id' => $project['id'])) ?>
</li>
</ul>
</div>
<section>
<form method="get" action="?" autocomplete="off">
- <?= $this->formHidden('controller', $values) ?>
- <?= $this->formHidden('action', $values) ?>
- <?= $this->formHidden('project_id', $values) ?>
- <?= $this->formText('search', $values, array(), array('autofocus', 'required', 'placeholder="'.t('Search').'"'), 'form-input-large') ?>
+ <?= $this->form->hidden('controller', $values) ?>
+ <?= $this->form->hidden('action', $values) ?>
+ <?= $this->form->hidden('project_id', $values) ?>
+ <?= $this->form->text('search', $values, array(), array('autofocus', 'required', 'placeholder="'.t('Search').'"'), 'form-input-large') ?>
<input type="submit" value="<?= t('Search') ?>" class="btn btn-blue"/>
</form>
diff --git a/app/Template/project/share.php b/app/Template/project/share.php
index 07f29fdc..a9146599 100644
--- a/app/Template/project/share.php
+++ b/app/Template/project/share.php
@@ -6,14 +6,14 @@
<div class="listing">
<ul class="no-bullet">
- <li><strong><i class="fa fa-share-alt"></i> <?= $this->a(t('Public link'), 'board', 'readonly', array('token' => $project['token']), false, '', '', true) ?></strong></li>
- <li><strong><i class="fa fa-rss-square"></i> <?= $this->a(t('RSS feed'), 'project', 'feed', array('token' => $project['token']), false, '', '', true) ?></strong></li>
- <li><strong><i class="fa fa-calendar"></i> <?= $this->a(t('iCal feed'), 'ical', 'project', array('token' => $project['token']), false, '', '', true) ?></strong></li>
+ <li><strong><i class="fa fa-share-alt"></i> <?= $this->url->link(t('Public link'), 'board', 'readonly', array('token' => $project['token']), false, '', '', true) ?></strong></li>
+ <li><strong><i class="fa fa-rss-square"></i> <?= $this->url->link(t('RSS feed'), 'project', 'feed', array('token' => $project['token']), false, '', '', true) ?></strong></li>
+ <li><strong><i class="fa fa-calendar"></i> <?= $this->url->link(t('iCal feed'), 'ical', 'project', array('token' => $project['token']), false, '', '', true) ?></strong></li>
</ul>
</div>
- <?= $this->a(t('Disable public access'), 'project', 'share', array('project_id' => $project['id'], 'switch' => 'disable'), true, 'btn btn-red') ?>
+ <?= $this->url->link(t('Disable public access'), 'project', 'share', array('project_id' => $project['id'], 'switch' => 'disable'), true, 'btn btn-red') ?>
<?php else: ?>
- <?= $this->a(t('Enable public access'), 'project', 'share', array('project_id' => $project['id'], 'switch' => 'enable'), true, 'btn btn-blue') ?>
+ <?= $this->url->link(t('Enable public access'), 'project', 'share', array('project_id' => $project['id'], 'switch' => 'enable'), true, 'btn btn-blue') ?>
<?php endif ?>
diff --git a/app/Template/project/show.php b/app/Template/project/show.php
index 9c6cd1a8..9ffbd5bc 100644
--- a/app/Template/project/show.php
+++ b/app/Template/project/show.php
@@ -9,8 +9,8 @@
<?php endif ?>
<?php if ($project['is_public']): ?>
- <li><i class="fa fa-share-alt"></i> <?= $this->a(t('Public link'), 'board', 'readonly', array('token' => $project['token']), false, '', '', true) ?></li>
- <li><i class="fa fa-rss-square"></i> <?= $this->a(t('RSS feed'), 'project', 'feed', array('token' => $project['token']), false, '', '', true) ?></li>
+ <li><i class="fa fa-share-alt"></i> <?= $this->url->link(t('Public link'), 'board', 'readonly', array('token' => $project['token']), false, '', '', true) ?></li>
+ <li><i class="fa fa-rss-square"></i> <?= $this->url->link(t('RSS feed'), 'project', 'feed', array('token' => $project['token']), false, '', '', true) ?></li>
<?php else: ?>
<li><?= t('Public access disabled') ?></li>
<?php endif ?>
@@ -22,11 +22,11 @@
<?php if ($stats['nb_tasks'] > 0): ?>
<?php if ($stats['nb_active_tasks'] > 0): ?>
- <li><?= $this->a(t('%d tasks on the board', $stats['nb_active_tasks']), 'board', 'show', array('project_id' => $project['id'])) ?></li>
+ <li><?= $this->url->link(t('%d tasks on the board', $stats['nb_active_tasks']), 'board', 'show', array('project_id' => $project['id'])) ?></li>
<?php endif ?>
<?php if ($stats['nb_inactive_tasks'] > 0): ?>
- <li><?= $this->a(t('%d closed tasks', $stats['nb_inactive_tasks']), 'project', 'tasks', array('project_id' => $project['id'])) ?></li>
+ <li><?= $this->url->link(t('%d closed tasks', $stats['nb_inactive_tasks']), 'project', 'tasks', array('project_id' => $project['id'])) ?></li>
<?php endif ?>
<li><?= t('%d tasks in total', $stats['nb_tasks']) ?></li>
@@ -50,7 +50,7 @@
<td>
<?= $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 ?>
@@ -67,6 +67,6 @@
</div>
<article class="markdown">
- <?= $this->markdown($project['description']) ?>
+ <?= $this->text->markdown($project['description']) ?>
</article>
<?php endif ?>
diff --git a/app/Template/project/sidebar.php b/app/Template/project/sidebar.php
index 31e3ff04..5c7ea715 100644
--- a/app/Template/project/sidebar.php
+++ b/app/Template/project/sidebar.php
@@ -2,71 +2,71 @@
<h2><?= t('Actions') ?></h2>
<ul>
<li>
- <?= $this->a(t('Summary'), 'project', 'show', array('project_id' => $project['id'])) ?>
+ <?= $this->url->link(t('Summary'), 'project', 'show', array('project_id' => $project['id'])) ?>
</li>
- <?php if ($this->isManager($project['id'])): ?>
+ <?php if ($this->user->isManager($project['id'])): ?>
<li>
- <?= $this->a(t('Public access'), 'project', 'share', array('project_id' => $project['id'])) ?>
+ <?= $this->url->link(t('Public access'), 'project', 'share', array('project_id' => $project['id'])) ?>
</li>
<li>
- <?= $this->a(t('Integrations'), 'project', 'integration', array('project_id' => $project['id'])) ?>
+ <?= $this->url->link(t('Integrations'), 'project', 'integration', array('project_id' => $project['id'])) ?>
</li>
<li>
- <?= $this->a(t('Edit project'), 'project', 'edit', array('project_id' => $project['id'])) ?>
+ <?= $this->url->link(t('Edit project'), 'project', 'edit', array('project_id' => $project['id'])) ?>
</li>
<li>
- <?= $this->a(t('Edit board'), 'column', 'index', array('project_id' => $project['id'])) ?>
+ <?= $this->url->link(t('Edit board'), 'column', 'index', array('project_id' => $project['id'])) ?>
</li>
<li>
- <?= $this->a(t('Category management'), 'category', 'index', array('project_id' => $project['id'])) ?>
+ <?= $this->url->link(t('Category management'), 'category', 'index', array('project_id' => $project['id'])) ?>
</li>
<li>
- <?= $this->a(t('Swimlanes'), 'swimlane', 'index', array('project_id' => $project['id'])) ?>
+ <?= $this->url->link(t('Swimlanes'), 'swimlane', 'index', array('project_id' => $project['id'])) ?>
</li>
- <?php if ($this->userSession->isAdmin() || $project['is_private'] == 0): ?>
+ <?php if ($this->user->isAdmin() || $project['is_private'] == 0): ?>
<li>
- <?= $this->a(t('User management'), 'project', 'users', array('project_id' => $project['id'])) ?>
+ <?= $this->url->link(t('User management'), 'project', 'users', array('project_id' => $project['id'])) ?>
</li>
<?php endif ?>
<li>
- <?= $this->a(t('Automatic actions'), 'action', 'index', array('project_id' => $project['id'])) ?>
+ <?= $this->url->link(t('Automatic actions'), 'action', 'index', array('project_id' => $project['id'])) ?>
</li>
<li>
- <?= $this->a(t('Duplicate'), 'project', 'duplicate', array('project_id' => $project['id'])) ?>
+ <?= $this->url->link(t('Duplicate'), 'project', 'duplicate', array('project_id' => $project['id'])) ?>
</li>
<li>
- <?= $this->a(t('Budget'), 'budget', 'index', array('project_id' => $project['id'])) ?>
+ <?= $this->url->link(t('Budget'), 'budget', 'index', array('project_id' => $project['id'])) ?>
</li>
<li>
<?php if ($project['is_active']): ?>
- <?= $this->a(t('Disable'), 'project', 'disable', array('project_id' => $project['id']), true) ?>
+ <?= $this->url->link(t('Disable'), 'project', 'disable', array('project_id' => $project['id']), true) ?>
<?php else: ?>
- <?= $this->a(t('Enable'), 'project', 'enable', array('project_id' => $project['id']), true) ?>
+ <?= $this->url->link(t('Enable'), 'project', 'enable', array('project_id' => $project['id']), true) ?>
<?php endif ?>
</li>
- <?php if ($this->userSession->isAdmin()): ?>
+ <?php if ($this->user->isAdmin()): ?>
<li>
- <?= $this->a(t('Remove'), 'project', 'remove', array('project_id' => $project['id'])) ?>
+ <?= $this->url->link(t('Remove'), 'project', 'remove', array('project_id' => $project['id'])) ?>
</li>
<?php endif ?>
<?php endif ?>
</ul>
- <?php if ($this->acl->isManagerActionAllowed($project['id'])): ?>
+ <?php if ($this->user->isManager($project['id'])): ?>
<h2><?= t('Exports') ?></h2>
<ul>
<li>
- <?= $this->a(t('Tasks'), 'export', 'tasks', array('project_id' => $project['id'])) ?>
+ <?= $this->url->link(t('Tasks'), 'export', 'tasks', array('project_id' => $project['id'])) ?>
</li>
<li>
- <?= $this->a(t('Subtasks'), 'export', 'subtasks', array('project_id' => $project['id'])) ?>
+ <?= $this->url->link(t('Subtasks'), 'export', 'subtasks', array('project_id' => $project['id'])) ?>
</li>
<li>
- <?= $this->a(t('Task transitions'), 'export', 'transitions', array('project_id' => $project['id'])) ?>
+ <?= $this->url->link(t('Task transitions'), 'export', 'transitions', array('project_id' => $project['id'])) ?>
</li>
<li>
- <?= $this->a(t('Daily project summary'), 'export', 'summary', array('project_id' => $project['id'])) ?>
+ <?= $this->url->link(t('Daily project summary'), 'export', 'summary', array('project_id' => $project['id'])) ?>
</li>
</ul>
<?php endif ?>
diff --git a/app/Template/project/tasks.php b/app/Template/project/tasks.php
index b22746f9..06f28061 100644
--- a/app/Template/project/tasks.php
+++ b/app/Template/project/tasks.php
@@ -3,19 +3,19 @@
<ul>
<li>
<i class="fa fa-table fa-fw"></i>
- <?= $this->a(t('Back to the board'), 'board', 'show', array('project_id' => $project['id'])) ?>
+ <?= $this->url->link(t('Back to the board'), 'board', 'show', array('project_id' => $project['id'])) ?>
</li>
<li>
<i class="fa fa-calendar fa-fw"></i>
- <?= $this->a(t('Calendar'), 'calendar', 'show', array('project_id' => $project['id'])) ?>
+ <?= $this->url->link(t('Calendar'), 'calendar', 'show', array('project_id' => $project['id'])) ?>
</li>
<li>
<i class="fa fa-search fa-fw"></i>
- <?= $this->a(t('Search'), 'project', 'search', array('project_id' => $project['id'])) ?>
+ <?= $this->url->link(t('Search'), 'project', 'search', array('project_id' => $project['id'])) ?>
</li>
<li>
<i class="fa fa-dashboard fa-fw"></i>
- <?= $this->a(t('Activity'), 'project', 'activity', array('project_id' => $project['id'])) ?>
+ <?= $this->url->link(t('Activity'), 'project', 'activity', array('project_id' => $project['id'])) ?>
</li>
</ul>
</div>
diff --git a/app/Template/project/users.php b/app/Template/project/users.php
index 18147340..d725a9e8 100644
--- a/app/Template/project/users.php
+++ b/app/Template/project/users.php
@@ -24,12 +24,12 @@
<?php if ($project['is_private'] == 0): ?>
<td>
<ul>
- <li><?= $this->a(t('Revoke'), 'project', 'revoke', array('project_id' => $project['id'], 'user_id' => $user_id), true) ?></li>
+ <li><?= $this->url->link(t('Revoke'), 'project', 'revoke', array('project_id' => $project['id'], 'user_id' => $user_id), true) ?></li>
<li>
<?php if (isset($users['managers'][$user_id])): ?>
- <?= $this->a(t('Set project member'), 'project', 'role', array('project_id' => $project['id'], 'user_id' => $user_id, 'is_owner' => 0), true) ?>
+ <?= $this->url->link(t('Set project member'), 'project', 'role', array('project_id' => $project['id'], 'user_id' => $user_id, 'is_owner' => 0), true) ?>
<?php else: ?>
- <?= $this->a(t('Set project manager'), 'project', 'role', array('project_id' => $project['id'], 'user_id' => $user_id, 'is_owner' => 1), true) ?>
+ <?= $this->url->link(t('Set project manager'), 'project', 'role', array('project_id' => $project['id'], 'user_id' => $user_id, 'is_owner' => 1), true) ?>
<?php endif ?>
</li>
</ul>
@@ -42,14 +42,14 @@
<?php if ($project['is_private'] == 0 && ! empty($users['not_allowed'])): ?>
<hr/>
- <form method="post" action="<?= $this->u('project', 'allow', array('project_id' => $project['id'])) ?>" autocomplete="off">
+ <form method="post" action="<?= $this->url->href('project', 'allow', array('project_id' => $project['id'])) ?>" autocomplete="off">
- <?= $this->formCsrf() ?>
+ <?= $this->form->csrf() ?>
- <?= $this->formHidden('project_id', array('project_id' => $project['id'])) ?>
+ <?= $this->form->hidden('project_id', array('project_id' => $project['id'])) ?>
- <?= $this->formLabel(t('User'), 'user_id') ?>
- <?= $this->formSelect('user_id', $users['not_allowed'], array(), array(), array('data-notfound="'.t('No results match:').'"'), 'chosen-select') ?><br/>
+ <?= $this->form->label(t('User'), 'user_id') ?>
+ <?= $this->form->select('user_id', $users['not_allowed'], array(), array(), array('data-notfound="'.t('No results match:').'"'), 'chosen-select') ?><br/>
<div class="form-actions">
<input type="submit" value="<?= t('Allow this user') ?>" class="btn btn-blue"/>
@@ -61,11 +61,11 @@
<?php if ($project['is_private'] == 0): ?>
<hr/>
-<form method="post" action="<?= $this->u('project', 'allowEverybody', array('project_id' => $project['id'])) ?>">
- <?= $this->formCsrf() ?>
+<form method="post" action="<?= $this->url->href('project', 'allowEverybody', array('project_id' => $project['id'])) ?>">
+ <?= $this->form->csrf() ?>
- <?= $this->formHidden('id', array('id' => $project['id'])) ?>
- <?= $this->formCheckbox('is_everybody_allowed', t('Allow everybody to access to this project'), 1, $project['is_everybody_allowed']) ?>
+ <?= $this->form->hidden('id', array('id' => $project['id'])) ?>
+ <?= $this->form->checkbox('is_everybody_allowed', t('Allow everybody to access to this project'), 1, $project['is_everybody_allowed']) ?>
<div class="form-actions">
<input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
diff --git a/app/Template/subtask/create.php b/app/Template/subtask/create.php
index 8c5aae11..82e378f5 100644
--- a/app/Template/subtask/create.php
+++ b/app/Template/subtask/create.php
@@ -2,26 +2,26 @@
<h2><?= t('Add a sub-task') ?></h2>
</div>
-<form method="post" action="<?= $this->u('subtask', 'save', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>" autocomplete="off">
+<form method="post" action="<?= $this->url->href('subtask', 'save', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>" autocomplete="off">
- <?= $this->formCsrf() ?>
+ <?= $this->form->csrf() ?>
- <?= $this->formHidden('task_id', $values) ?>
+ <?= $this->form->hidden('task_id', $values) ?>
- <?= $this->formLabel(t('Title'), 'title') ?>
- <?= $this->formText('title', $values, $errors, array('required', 'autofocus', 'maxlength="255"')) ?><br/>
+ <?= $this->form->label(t('Title'), 'title') ?>
+ <?= $this->form->text('title', $values, $errors, array('required', 'autofocus', 'maxlength="255"')) ?><br/>
- <?= $this->formLabel(t('Assignee'), 'user_id') ?>
- <?= $this->formSelect('user_id', $users_list, $values, $errors) ?><br/>
+ <?= $this->form->label(t('Assignee'), 'user_id') ?>
+ <?= $this->form->select('user_id', $users_list, $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->formCheckbox('another_subtask', t('Create another sub-task'), 1, isset($values['another_subtask']) && $values['another_subtask'] == 1) ?>
+ <?= $this->form->checkbox('another_subtask', t('Create another sub-task'), 1, isset($values['another_subtask']) && $values['another_subtask'] == 1) ?>
<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/subtask/edit.php b/app/Template/subtask/edit.php
index 3058ff44..2e583069 100644
--- a/app/Template/subtask/edit.php
+++ b/app/Template/subtask/edit.php
@@ -2,28 +2,28 @@
<h2><?= t('Edit a sub-task') ?></h2>
</div>
-<form method="post" action="<?= $this->u('subtask', 'update', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'subtask_id' => $subtask['id'])) ?>" autocomplete="off">
+<form method="post" action="<?= $this->url->href('subtask', 'update', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'subtask_id' => $subtask['id'])) ?>" autocomplete="off">
- <?= $this->formCsrf() ?>
+ <?= $this->form->csrf() ?>
- <?= $this->formHidden('id', $values) ?>
- <?= $this->formHidden('task_id', $values) ?>
+ <?= $this->form->hidden('id', $values) ?>
+ <?= $this->form->hidden('task_id', $values) ?>
- <?= $this->formLabel(t('Title'), 'title') ?>
- <?= $this->formText('title', $values, $errors, array('required', 'autofocus', 'maxlength="255"')) ?><br/>
+ <?= $this->form->label(t('Title'), 'title') ?>
+ <?= $this->form->text('title', $values, $errors, array('required', 'autofocus', 'maxlength="255"')) ?><br/>
- <?= $this->formLabel(t('Assignee'), 'user_id') ?>
- <?= $this->formSelect('user_id', $users_list, $values, $errors) ?><br/>
+ <?= $this->form->label(t('Assignee'), 'user_id') ?>
+ <?= $this->form->select('user_id', $users_list, $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('Time spent'), 'time_spent') ?>
- <?= $this->formNumeric('time_spent', $values, $errors) ?> <?= t('hours') ?><br/>
+ <?= $this->form->label(t('Time spent'), 'time_spent') ?>
+ <?= $this->form->numeric('time_spent', $values, $errors) ?> <?= t('hours') ?><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/subtask/remove.php b/app/Template/subtask/remove.php
index c623791d..65ade31d 100644
--- a/app/Template/subtask/remove.php
+++ b/app/Template/subtask/remove.php
@@ -10,8 +10,8 @@
<p><strong><?= $this->e($subtask['title']) ?></strong></p>
<div class="form-actions">
- <?= $this->a(t('Yes'), 'subtask', 'remove', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'subtask_id' => $subtask['id']), true, 'btn btn-red') ?>
+ <?= $this->url->link(t('Yes'), 'subtask', 'remove', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'subtask_id' => $subtask['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> \ No newline at end of file
diff --git a/app/Template/subtask/restriction_change_status.php b/app/Template/subtask/restriction_change_status.php
index 99e022f8..88e91d82 100644
--- a/app/Template/subtask/restriction_change_status.php
+++ b/app/Template/subtask/restriction_change_status.php
@@ -2,14 +2,14 @@
<h2><?= t('You already have one subtask in progress') ?></h2>
</div>
- <form action="<?= $this->u('subtask', 'changeRestrictionStatus', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'subtask_id' => $subtask['id'])) ?>" method="post">
+ <form action="<?= $this->url->href('subtask', 'changeRestrictionStatus', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'subtask_id' => $subtask['id'])) ?>" method="post">
- <?= $this->formCsrf() ?>
- <?= $this->formHidden('redirect', array('redirect' => $redirect)) ?>
+ <?= $this->form->csrf() ?>
+ <?= $this->form->hidden('redirect', array('redirect' => $redirect)) ?>
<p><?= t('Select the new status of the subtask: "%s"', $subtask_inprogress['title']) ?></p>
- <?= $this->formRadios('status', $status_list) ?>
- <?= $this->formHidden('id', $subtask_inprogress) ?>
+ <?= $this->form->radios('status', $status_list) ?>
+ <?= $this->form->hidden('id', $subtask_inprogress) ?>
<div class="form-actions">
<input type="submit" value="<?= t('Save') ?>" class="btn btn-red"/>
diff --git a/app/Template/subtask/show.php b/app/Template/subtask/show.php
index e5368265..c9690f08 100644
--- a/app/Template/subtask/show.php
+++ b/app/Template/subtask/show.php
@@ -22,14 +22,14 @@
<tr>
<td>
<?php if (! isset($not_editable)): ?>
- <?= $this->toggleSubtaskStatus($subtask, 'task') ?>
+ <?= $this->subtask->toggleStatus($subtask, 'task') ?>
<?php else: ?>
<?= $this->render('subtask/icons', array('subtask' => $subtask)) . $this->e($subtask['title']) ?>
<?php endif ?>
</td>
<td>
<?php if (! empty($subtask['username'])): ?>
- <?= $this->a($this->e($subtask['name'] ?: $subtask['username']), 'user', 'show', array('user_id' => $subtask['user_id'])) ?>
+ <?= $this->url->link($this->e($subtask['name'] ?: $subtask['username']), 'user', 'show', array('user_id' => $subtask['user_id'])) ?>
<?php endif ?>
</td>
<td>
@@ -46,19 +46,19 @@
<ul>
<?php if ($subtask['position'] != $first_position): ?>
<li>
- <?= $this->a(t('Move Up'), 'subtask', 'movePosition', array('project_id' => $project['id'], 'task_id' => $subtask['task_id'], 'subtask_id' => $subtask['id'], 'direction' => 'up'), true) ?>
+ <?= $this->url->link(t('Move Up'), 'subtask', 'movePosition', array('project_id' => $project['id'], 'task_id' => $subtask['task_id'], 'subtask_id' => $subtask['id'], 'direction' => 'up'), true) ?>
</li>
<?php endif ?>
<?php if ($subtask['position'] != $last_position): ?>
<li>
- <?= $this->a(t('Move Down'), 'subtask', 'movePosition', array('project_id' => $project['id'], 'task_id' => $subtask['task_id'], 'subtask_id' => $subtask['id'], 'direction' => 'down'), true) ?>
+ <?= $this->url->link(t('Move Down'), 'subtask', 'movePosition', array('project_id' => $project['id'], 'task_id' => $subtask['task_id'], 'subtask_id' => $subtask['id'], 'direction' => 'down'), true) ?>
</li>
<?php endif ?>
<li>
- <?= $this->a(t('Edit'), 'subtask', 'edit', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'subtask_id' => $subtask['id'])) ?>
+ <?= $this->url->link(t('Edit'), 'subtask', 'edit', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'subtask_id' => $subtask['id'])) ?>
</li>
<li>
- <?= $this->a(t('Remove'), 'subtask', 'confirm', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'subtask_id' => $subtask['id'])) ?>
+ <?= $this->url->link(t('Remove'), 'subtask', 'confirm', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'subtask_id' => $subtask['id'])) ?>
</li>
</ul>
</td>
@@ -68,10 +68,10 @@
</table>
<?php if (! isset($not_editable)): ?>
- <form method="post" action="<?= $this->u('subtask', 'save', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>" autocomplete="off">
- <?= $this->formCsrf() ?>
- <?= $this->formHidden('task_id', array('task_id' => $task['id'])) ?>
- <?= $this->formText('title', array(), array(), array('required', 'placeholder="'.t('Type here to create a new sub-task').'"')) ?>
+ <form method="post" action="<?= $this->url->href('subtask', 'save', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>" autocomplete="off">
+ <?= $this->form->csrf() ?>
+ <?= $this->form->hidden('task_id', array('task_id' => $task['id'])) ?>
+ <?= $this->form->text('title', array(), array(), array('required', 'placeholder="'.t('Type here to create a new sub-task').'"')) ?>
<input type="submit" value="<?= t('Add') ?>" class="btn btn-blue"/>
</form>
<?php endif ?>
diff --git a/app/Template/swimlane/edit.php b/app/Template/swimlane/edit.php
index f39b6fde..cc98b584 100644
--- a/app/Template/swimlane/edit.php
+++ b/app/Template/swimlane/edit.php
@@ -2,15 +2,15 @@
<h2><?= t('Swimlane modification for the project "%s"', $project['name']) ?></h2>
</div>
-<form method="post" action="<?= $this->u('swimlane', 'update', array('project_id' => $project['id'], 'swimlane_id' => $values['id'])) ?>" autocomplete="off">
+<form method="post" action="<?= $this->url->href('swimlane', 'update', array('project_id' => $project['id'], 'swimlane_id' => $values['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('Name'), 'name') ?>
- <?= $this->formText('name', $values, $errors, array('autofocus', 'required', 'maxlength="50"')) ?>
+ <?= $this->form->label(t('Name'), 'name') ?>
+ <?= $this->form->text('name', $values, $errors, array('autofocus', 'required', 'maxlength="50"')) ?>
<div class="form-actions">
<input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
diff --git a/app/Template/swimlane/index.php b/app/Template/swimlane/index.php
index 3482a56c..daee6af5 100644
--- a/app/Template/swimlane/index.php
+++ b/app/Template/swimlane/index.php
@@ -8,13 +8,13 @@
<div class="page-header">
<h2><?= t('Add a new swimlane') ?></h2>
</div>
-<form method="post" action="<?= $this->u('swimlane', 'save', array('project_id' => $project['id'])) ?>" autocomplete="off">
+<form method="post" action="<?= $this->url->href('swimlane', 'save', array('project_id' => $project['id'])) ?>" autocomplete="off">
- <?= $this->formCsrf() ?>
- <?= $this->formHidden('project_id', $values) ?>
+ <?= $this->form->csrf() ?>
+ <?= $this->form->hidden('project_id', $values) ?>
- <?= $this->formLabel(t('Name'), 'name') ?>
- <?= $this->formText('name', $values, $errors, array('autofocus', 'required', 'maxlength="50"')) ?>
+ <?= $this->form->label(t('Name'), 'name') ?>
+ <?= $this->form->text('name', $values, $errors, array('autofocus', 'required', 'maxlength="50"')) ?>
<div class="form-actions">
<input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
@@ -24,15 +24,15 @@
<div class="page-header">
<h2><?= t('Change default swimlane') ?></h2>
</div>
-<form method="post" action="<?= $this->u('swimlane', 'change', array('project_id' => $project['id'])) ?>" autocomplete="off">
+<form method="post" action="<?= $this->url->href('swimlane', 'change', array('project_id' => $project['id'])) ?>" autocomplete="off">
- <?= $this->formCsrf() ?>
- <?= $this->formHidden('id', $default_swimlane) ?>
+ <?= $this->form->csrf() ?>
+ <?= $this->form->hidden('id', $default_swimlane) ?>
- <?= $this->formLabel(t('Rename'), 'default_swimlane') ?>
- <?= $this->formText('default_swimlane', $default_swimlane, array(), array('autofocus', 'required', 'maxlength="50"')) ?><br/>
+ <?= $this->form->label(t('Rename'), 'default_swimlane') ?>
+ <?= $this->form->text('default_swimlane', $default_swimlane, array(), array('autofocus', 'required', 'maxlength="50"')) ?><br/>
- <?= $this->formCheckbox('show_default_swimlane', t('Show default swimlane'), 1, isset($default_swimlane['show_default_swimlane']) && $default_swimlane['show_default_swimlane'] == 1) ?>
+ <?= $this->form->checkbox('show_default_swimlane', t('Show default swimlane'), 1, isset($default_swimlane['show_default_swimlane']) && $default_swimlane['show_default_swimlane'] == 1) ?>
<div class="form-actions">
<input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
diff --git a/app/Template/swimlane/remove.php b/app/Template/swimlane/remove.php
index 3268f51f..1d7c2b7a 100644
--- a/app/Template/swimlane/remove.php
+++ b/app/Template/swimlane/remove.php
@@ -9,9 +9,9 @@
</p>
<div class="form-actions">
- <?= $this->a(t('Yes'), 'swimlane', 'remove', array('project_id' => $project['id'], 'swimlane_id' => $swimlane['id']), true, 'btn btn-red') ?>
+ <?= $this->url->link(t('Yes'), 'swimlane', 'remove', array('project_id' => $project['id'], 'swimlane_id' => $swimlane['id']), true, 'btn btn-red') ?>
<?= t('or') ?>
- <?= $this->a(t('cancel'), 'swimlane', 'index', array('project_id' => $project['id'])) ?>
+ <?= $this->url->link(t('cancel'), 'swimlane', 'index', array('project_id' => $project['id'])) ?>
</div>
</div>
</section> \ No newline at end of file
diff --git a/app/Template/swimlane/table.php b/app/Template/swimlane/table.php
index cf22e31b..f38572a3 100644
--- a/app/Template/swimlane/table.php
+++ b/app/Template/swimlane/table.php
@@ -16,26 +16,26 @@
<ul>
<?php if ($swimlane['position'] != 0 && $swimlane['position'] != 1): ?>
<li>
- <?= $this->a(t('Move Up'), 'swimlane', 'moveup', array('project_id' => $project['id'], 'swimlane_id' => $swimlane['id']), true) ?>
+ <?= $this->url->link(t('Move Up'), 'swimlane', 'moveup', array('project_id' => $project['id'], 'swimlane_id' => $swimlane['id']), true) ?>
</li>
<?php endif ?>
<?php if ($swimlane['position'] != 0 && $swimlane['position'] != count($swimlanes)): ?>
<li>
- <?= $this->a(t('Move Down'), 'swimlane', 'movedown', array('project_id' => $project['id'], 'swimlane_id' => $swimlane['id']), true) ?>
+ <?= $this->url->link(t('Move Down'), 'swimlane', 'movedown', array('project_id' => $project['id'], 'swimlane_id' => $swimlane['id']), true) ?>
</li>
<?php endif ?>
<li>
- <?= $this->a(t('Rename'), 'swimlane', 'edit', array('project_id' => $project['id'], 'swimlane_id' => $swimlane['id'])) ?>
+ <?= $this->url->link(t('Rename'), 'swimlane', 'edit', array('project_id' => $project['id'], 'swimlane_id' => $swimlane['id'])) ?>
</li>
<li>
<?php if ($swimlane['is_active']): ?>
- <?= $this->a(t('Disable'), 'swimlane', 'disable', array('project_id' => $project['id'], 'swimlane_id' => $swimlane['id']), true) ?>
+ <?= $this->url->link(t('Disable'), 'swimlane', 'disable', array('project_id' => $project['id'], 'swimlane_id' => $swimlane['id']), true) ?>
<?php else: ?>
- <?= $this->a(t('Enable'), 'swimlane', 'enable', array('project_id' => $project['id'], 'swimlane_id' => $swimlane['id']), true) ?>
+ <?= $this->url->link(t('Enable'), 'swimlane', 'enable', array('project_id' => $project['id'], 'swimlane_id' => $swimlane['id']), true) ?>
<?php endif ?>
</li>
<li>
- <?= $this->a(t('Remove'), 'swimlane', 'confirm', array('project_id' => $project['id'], 'swimlane_id' => $swimlane['id'])) ?>
+ <?= $this->url->link(t('Remove'), 'swimlane', 'confirm', array('project_id' => $project['id'], 'swimlane_id' => $swimlane['id'])) ?>
</li>
</ul>
</td>
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 ?>
diff --git a/app/Template/tasklink/create.php b/app/Template/tasklink/create.php
index 3394271a..749f2968 100644
--- a/app/Template/tasklink/create.php
+++ b/app/Template/tasklink/create.php
@@ -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> \ No newline at end of file
diff --git a/app/Template/tasklink/edit.php b/app/Template/tasklink/edit.php
index 37c3cb14..73b43277 100644
--- a/app/Template/tasklink/edit.php
+++ b/app/Template/tasklink/edit.php
@@ -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> \ No newline at end of file
diff --git a/app/Template/tasklink/remove.php b/app/Template/tasklink/remove.php
index 9322ec24..262fb488 100644
--- a/app/Template/tasklink/remove.php
+++ b/app/Template/tasklink/remove.php
@@ -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> \ No newline at end of file
diff --git a/app/Template/tasklink/show.php b/app/Template/tasklink/show.php
index d4a3939b..7125b11d 100644
--- a/app/Template/tasklink/show.php
+++ b/app/Template/tasklink/show.php
@@ -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') ?>
diff --git a/app/Template/timetable/index.php b/app/Template/timetable/index.php
index 27cbe39c..7a63a2ec 100644
--- a/app/Template/timetable/index.php
+++ b/app/Template/timetable/index.php
@@ -1,24 +1,24 @@
<div class="page-header">
<h2><?= t('Timetable') ?></h2>
<ul>
- <li><?= $this->a(t('Day timetable'), 'timetableday', 'index', array('user_id' => $user['id'])) ?></li>
- <li><?= $this->a(t('Week timetable'), 'timetableweek', 'index', array('user_id' => $user['id'])) ?></li>
- <li><?= $this->a(t('Time off timetable'), 'timetableoff', 'index', array('user_id' => $user['id'])) ?></li>
- <li><?= $this->a(t('Overtime timetable'), 'timetableextra', 'index', array('user_id' => $user['id'])) ?></li>
+ <li><?= $this->url->link(t('Day timetable'), 'timetableday', 'index', array('user_id' => $user['id'])) ?></li>
+ <li><?= $this->url->link(t('Week timetable'), 'timetableweek', 'index', array('user_id' => $user['id'])) ?></li>
+ <li><?= $this->url->link(t('Time off timetable'), 'timetableoff', 'index', array('user_id' => $user['id'])) ?></li>
+ <li><?= $this->url->link(t('Overtime timetable'), 'timetableextra', 'index', array('user_id' => $user['id'])) ?></li>
</ul>
</div>
<form method="get" action="?" autocomplete="off" class="form-inline">
- <?= $this->formHidden('controller', $values) ?>
- <?= $this->formHidden('action', $values) ?>
- <?= $this->formHidden('user_id', $values) ?>
+ <?= $this->form->hidden('controller', $values) ?>
+ <?= $this->form->hidden('action', $values) ?>
+ <?= $this->form->hidden('user_id', $values) ?>
- <?= $this->formLabel(t('From'), 'from') ?>
- <?= $this->formText('from', $values, array(), array(), 'form-date') ?>
+ <?= $this->form->label(t('From'), 'from') ?>
+ <?= $this->form->text('from', $values, array(), array(), 'form-date') ?>
- <?= $this->formLabel(t('To'), 'to') ?>
- <?= $this->formText('to', $values, array(), array(), 'form-date') ?>
+ <?= $this->form->label(t('To'), 'to') ?>
+ <?= $this->form->text('to', $values, array(), array(), 'form-date') ?>
<input type="submit" value="<?= t('Execute') ?>" class="btn btn-blue"/>
</form>
diff --git a/app/Template/timetable_day/index.php b/app/Template/timetable_day/index.php
index 50aca602..d2877816 100644
--- a/app/Template/timetable_day/index.php
+++ b/app/Template/timetable_day/index.php
@@ -15,7 +15,7 @@
<td><?= $slot['start'] ?></td>
<td><?= $slot['end'] ?></td>
<td>
- <?= $this->a(t('Remove'), 'timetableday', 'confirm', array('user_id' => $user['id'], 'slot_id' => $slot['id'])) ?>
+ <?= $this->url->link(t('Remove'), 'timetableday', 'confirm', array('user_id' => $user['id'], 'slot_id' => $slot['id'])) ?>
</td>
</tr>
<?php endforeach ?>
@@ -24,16 +24,16 @@
<h3><?= t('Add new time slot') ?></h3>
<?php endif ?>
-<form method="post" action="<?= $this->u('timetableday', 'save', array('user_id' => $user['id'])) ?>" autocomplete="off">
+<form method="post" action="<?= $this->url->href('timetableday', 'save', array('user_id' => $user['id'])) ?>" autocomplete="off">
- <?= $this->formHidden('user_id', $values) ?>
- <?= $this->formCsrf() ?>
+ <?= $this->form->hidden('user_id', $values) ?>
+ <?= $this->form->csrf() ?>
- <?= $this->formLabel(t('Start time'), 'start') ?>
- <?= $this->formSelect('start', $this->getDayHours(), $values, $errors) ?>
+ <?= $this->form->label(t('Start time'), 'start') ?>
+ <?= $this->form->select('start', $this->datetime->getDayHours(), $values, $errors) ?>
- <?= $this->formLabel(t('End time'), 'end') ?>
- <?= $this->formSelect('end', $this->getDayHours(), $values, $errors) ?>
+ <?= $this->form->label(t('End time'), 'end') ?>
+ <?= $this->form->select('end', $this->datetime->getDayHours(), $values, $errors) ?>
<div class="form-actions">
<input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
diff --git a/app/Template/timetable_day/remove.php b/app/Template/timetable_day/remove.php
index b3ee8775..1b33b266 100644
--- a/app/Template/timetable_day/remove.php
+++ b/app/Template/timetable_day/remove.php
@@ -6,8 +6,8 @@
<p class="alert alert-info"><?= t('Do you really want to remove this time slot?') ?></p>
<div class="form-actions">
- <?= $this->a(t('Yes'), 'timetableday', 'remove', array('user_id' => $user['id'], 'slot_id' => $slot_id), true, 'btn btn-red') ?>
+ <?= $this->url->link(t('Yes'), 'timetableday', 'remove', array('user_id' => $user['id'], 'slot_id' => $slot_id), true, 'btn btn-red') ?>
<?= t('or') ?>
- <?= $this->a(t('cancel'), 'timetableday', 'index', array('user_id' => $user['id'])) ?>
+ <?= $this->url->link(t('cancel'), 'timetableday', 'index', array('user_id' => $user['id'])) ?>
</div>
</div> \ No newline at end of file
diff --git a/app/Template/timetable_extra/index.php b/app/Template/timetable_extra/index.php
index a0a55bec..d3224ae6 100644
--- a/app/Template/timetable_extra/index.php
+++ b/app/Template/timetable_extra/index.php
@@ -21,7 +21,7 @@
<td><?= $slot['end'] ?></td>
<td><?= $this->e($slot['comment']) ?></td>
<td>
- <?= $this->a(t('Remove'), 'timetableextra', 'confirm', array('user_id' => $user['id'], 'slot_id' => $slot['id'])) ?>
+ <?= $this->url->link(t('Remove'), 'timetableextra', 'confirm', array('user_id' => $user['id'], 'slot_id' => $slot['id'])) ?>
</td>
</tr>
<?php endforeach ?>
@@ -31,24 +31,24 @@
<?php endif ?>
-<form method="post" action="<?= $this->u('timetableextra', 'save', array('user_id' => $user['id'])) ?>" autocomplete="off">
+<form method="post" action="<?= $this->url->href('timetableextra', 'save', array('user_id' => $user['id'])) ?>" autocomplete="off">
- <?= $this->formHidden('user_id', $values) ?>
- <?= $this->formCsrf() ?>
+ <?= $this->form->hidden('user_id', $values) ?>
+ <?= $this->form->csrf() ?>
- <?= $this->formLabel(t('Day'), 'date') ?>
- <?= $this->formText('date', $values, $errors, array('required'), 'form-date') ?>
+ <?= $this->form->label(t('Day'), 'date') ?>
+ <?= $this->form->text('date', $values, $errors, array('required'), 'form-date') ?>
- <?= $this->formCheckbox('all_day', t('All day'), 1) ?>
+ <?= $this->form->checkbox('all_day', t('All day'), 1) ?>
- <?= $this->formLabel(t('Start time'), 'start') ?>
- <?= $this->formSelect('start', $this->getDayHours(), $values, $errors) ?>
+ <?= $this->form->label(t('Start time'), 'start') ?>
+ <?= $this->form->select('start', $this->datetime->getDayHours(), $values, $errors) ?>
- <?= $this->formLabel(t('End time'), 'end') ?>
- <?= $this->formSelect('end', $this->getDayHours(), $values, $errors) ?>
+ <?= $this->form->label(t('End time'), 'end') ?>
+ <?= $this->form->select('end', $this->datetime->getDayHours(), $values, $errors) ?>
- <?= $this->formLabel(t('Comment'), 'comment') ?>
- <?= $this->formText('comment', $values, $errors) ?>
+ <?= $this->form->label(t('Comment'), 'comment') ?>
+ <?= $this->form->text('comment', $values, $errors) ?>
<div class="form-actions">
<input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
diff --git a/app/Template/timetable_extra/remove.php b/app/Template/timetable_extra/remove.php
index d8dc5b3b..fc907438 100644
--- a/app/Template/timetable_extra/remove.php
+++ b/app/Template/timetable_extra/remove.php
@@ -6,8 +6,8 @@
<p class="alert alert-info"><?= t('Do you really want to remove this time slot?') ?></p>
<div class="form-actions">
- <?= $this->a(t('Yes'), 'timetableextra', 'remove', array('user_id' => $user['id'], 'slot_id' => $slot_id), true, 'btn btn-red') ?>
+ <?= $this->url->link(t('Yes'), 'timetableextra', 'remove', array('user_id' => $user['id'], 'slot_id' => $slot_id), true, 'btn btn-red') ?>
<?= t('or') ?>
- <?= $this->a(t('cancel'), 'timetableextra', 'index', array('user_id' => $user['id'])) ?>
+ <?= $this->url->link(t('cancel'), 'timetableextra', 'index', array('user_id' => $user['id'])) ?>
</div>
</div> \ No newline at end of file
diff --git a/app/Template/timetable_off/index.php b/app/Template/timetable_off/index.php
index f35d331e..75e02dbd 100644
--- a/app/Template/timetable_off/index.php
+++ b/app/Template/timetable_off/index.php
@@ -21,7 +21,7 @@
<td><?= $slot['end'] ?></td>
<td><?= $this->e($slot['comment']) ?></td>
<td>
- <?= $this->a(t('Remove'), 'timetableoff', 'confirm', array('user_id' => $user['id'], 'slot_id' => $slot['id'])) ?>
+ <?= $this->url->link(t('Remove'), 'timetableoff', 'confirm', array('user_id' => $user['id'], 'slot_id' => $slot['id'])) ?>
</td>
</tr>
<?php endforeach ?>
@@ -31,24 +31,24 @@
<?php endif ?>
-<form method="post" action="<?= $this->u('timetableoff', 'save', array('user_id' => $user['id'])) ?>" autocomplete="off">
+<form method="post" action="<?= $this->url->href('timetableoff', 'save', array('user_id' => $user['id'])) ?>" autocomplete="off">
- <?= $this->formHidden('user_id', $values) ?>
- <?= $this->formCsrf() ?>
+ <?= $this->form->hidden('user_id', $values) ?>
+ <?= $this->form->csrf() ?>
- <?= $this->formLabel(t('Day'), 'date') ?>
- <?= $this->formText('date', $values, $errors, array('required'), 'form-date') ?>
+ <?= $this->form->label(t('Day'), 'date') ?>
+ <?= $this->form->text('date', $values, $errors, array('required'), 'form-date') ?>
- <?= $this->formCheckbox('all_day', t('All day'), 1) ?>
+ <?= $this->form->checkbox('all_day', t('All day'), 1) ?>
- <?= $this->formLabel(t('Start time'), 'start') ?>
- <?= $this->formSelect('start', $this->getDayHours(), $values, $errors) ?>
+ <?= $this->form->label(t('Start time'), 'start') ?>
+ <?= $this->form->select('start', $this->datetime->getDayHours(), $values, $errors) ?>
- <?= $this->formLabel(t('End time'), 'end') ?>
- <?= $this->formSelect('end', $this->getDayHours(), $values, $errors) ?>
+ <?= $this->form->label(t('End time'), 'end') ?>
+ <?= $this->form->select('end', $this->datetime->getDayHours(), $values, $errors) ?>
- <?= $this->formLabel(t('Comment'), 'comment') ?>
- <?= $this->formText('comment', $values, $errors) ?>
+ <?= $this->form->label(t('Comment'), 'comment') ?>
+ <?= $this->form->text('comment', $values, $errors) ?>
<div class="form-actions">
<input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
diff --git a/app/Template/timetable_off/remove.php b/app/Template/timetable_off/remove.php
index 64863781..621e191c 100644
--- a/app/Template/timetable_off/remove.php
+++ b/app/Template/timetable_off/remove.php
@@ -6,8 +6,8 @@
<p class="alert alert-info"><?= t('Do you really want to remove this time slot?') ?></p>
<div class="form-actions">
- <?= $this->a(t('Yes'), 'timetableoff', 'remove', array('user_id' => $user['id'], 'slot_id' => $slot_id), true, 'btn btn-red') ?>
+ <?= $this->url->link(t('Yes'), 'timetableoff', 'remove', array('user_id' => $user['id'], 'slot_id' => $slot_id), true, 'btn btn-red') ?>
<?= t('or') ?>
- <?= $this->a(t('cancel'), 'timetableoff', 'index', array('user_id' => $user['id'])) ?>
+ <?= $this->url->link(t('cancel'), 'timetableoff', 'index', array('user_id' => $user['id'])) ?>
</div>
</div> \ No newline at end of file
diff --git a/app/Template/timetable_week/index.php b/app/Template/timetable_week/index.php
index 8fb51909..552e9302 100644
--- a/app/Template/timetable_week/index.php
+++ b/app/Template/timetable_week/index.php
@@ -13,11 +13,11 @@
</tr>
<?php foreach ($timetable as $slot): ?>
<tr>
- <td><?= $this->getWeekDay($slot['day']) ?></td>
+ <td><?= $this->datetime->getWeekDay($slot['day']) ?></td>
<td><?= $slot['start'] ?></td>
<td><?= $slot['end'] ?></td>
<td>
- <?= $this->a(t('Remove'), 'timetableweek', 'confirm', array('user_id' => $user['id'], 'slot_id' => $slot['id'])) ?>
+ <?= $this->url->link(t('Remove'), 'timetableweek', 'confirm', array('user_id' => $user['id'], 'slot_id' => $slot['id'])) ?>
</td>
</tr>
<?php endforeach ?>
@@ -26,19 +26,19 @@
<h3><?= t('Add new time slot') ?></h3>
<?php endif ?>
-<form method="post" action="<?= $this->u('timetableweek', 'save', array('user_id' => $user['id'])) ?>" autocomplete="off">
+<form method="post" action="<?= $this->url->href('timetableweek', 'save', array('user_id' => $user['id'])) ?>" autocomplete="off">
- <?= $this->formHidden('user_id', $values) ?>
- <?= $this->formCsrf() ?>
+ <?= $this->form->hidden('user_id', $values) ?>
+ <?= $this->form->csrf() ?>
- <?= $this->formLabel(t('Day'), 'day') ?>
- <?= $this->formSelect('day', $this->getWeekDays(), $values, $errors) ?>
+ <?= $this->form->label(t('Day'), 'day') ?>
+ <?= $this->form->select('day', $this->datetime->getWeekDays(), $values, $errors) ?>
- <?= $this->formLabel(t('Start time'), 'start') ?>
- <?= $this->formSelect('start', $this->getDayHours(), $values, $errors) ?>
+ <?= $this->form->label(t('Start time'), 'start') ?>
+ <?= $this->form->select('start', $this->datetime->getDayHours(), $values, $errors) ?>
- <?= $this->formLabel(t('End time'), 'end') ?>
- <?= $this->formSelect('end', $this->getDayHours(), $values, $errors) ?>
+ <?= $this->form->label(t('End time'), 'end') ?>
+ <?= $this->form->select('end', $this->datetime->getDayHours(), $values, $errors) ?>
<div class="form-actions">
<input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
diff --git a/app/Template/timetable_week/remove.php b/app/Template/timetable_week/remove.php
index f8eb2bbe..f5a10199 100644
--- a/app/Template/timetable_week/remove.php
+++ b/app/Template/timetable_week/remove.php
@@ -6,8 +6,8 @@
<p class="alert alert-info"><?= t('Do you really want to remove this time slot?') ?></p>
<div class="form-actions">
- <?= $this->a(t('Yes'), 'timetableweek', 'remove', array('user_id' => $user['id'], 'slot_id' => $slot_id), true, 'btn btn-red') ?>
+ <?= $this->url->link(t('Yes'), 'timetableweek', 'remove', array('user_id' => $user['id'], 'slot_id' => $slot_id), true, 'btn btn-red') ?>
<?= t('or') ?>
- <?= $this->a(t('cancel'), 'timetableweek', 'index', array('user_id' => $user['id'])) ?>
+ <?= $this->url->link(t('cancel'), 'timetableweek', 'index', array('user_id' => $user['id'])) ?>
</div>
</div> \ No newline at end of file
diff --git a/app/Template/twofactor/check.php b/app/Template/twofactor/check.php
index c29c0129..0e29d526 100644
--- a/app/Template/twofactor/check.php
+++ b/app/Template/twofactor/check.php
@@ -1,8 +1,8 @@
-<form method="post" action="<?= $this->u('twofactor', 'check', array('user_id' => $this->userSession->getId())) ?>" autocomplete="off">
+<form method="post" action="<?= $this->url->href('twofactor', 'check', array('user_id' => $this->userSession->getId())) ?>" autocomplete="off">
- <?= $this->formCsrf() ?>
- <?= $this->formLabel(t('Code'), 'code') ?>
- <?= $this->formText('code', array(), array(), array('placeholder="123456"', 'autofocus'), 'form-numeric') ?>
+ <?= $this->form->csrf() ?>
+ <?= $this->form->label(t('Code'), 'code') ?>
+ <?= $this->form->text('code', array(), array(), array('placeholder="123456"', 'autofocus'), 'form-numeric') ?>
<div class="form-actions">
<input type="submit" value="<?= t('Check my code') ?>" class="btn btn-blue"/>
diff --git a/app/Template/twofactor/disable.php b/app/Template/twofactor/disable.php
index 6909b446..36be4ef9 100644
--- a/app/Template/twofactor/disable.php
+++ b/app/Template/twofactor/disable.php
@@ -8,7 +8,7 @@
</p>
<div class="form-actions">
- <?= $this->a(t('Yes'), 'twofactor', 'disable', array('user_id' => $user['id'], 'disable' => 'yes'), true, 'btn btn-red') ?>
- <?= t('or') ?> <?= $this->a(t('cancel'), 'user', 'show', array('user_id' => $user['id'])) ?>
+ <?= $this->url->link(t('Yes'), 'twofactor', 'disable', array('user_id' => $user['id'], 'disable' => 'yes'), true, 'btn btn-red') ?>
+ <?= t('or') ?> <?= $this->url->link(t('cancel'), 'user', 'show', array('user_id' => $user['id'])) ?>
</div>
</div> \ No newline at end of file
diff --git a/app/Template/twofactor/index.php b/app/Template/twofactor/index.php
index 28e93f14..36b92653 100644
--- a/app/Template/twofactor/index.php
+++ b/app/Template/twofactor/index.php
@@ -2,10 +2,10 @@
<h2><?= t('Two factor authentication') ?></h2>
</div>
-<form method="post" action="<?= $this->u('twofactor', 'save', array('user_id' => $user['id'])) ?>" autocomplete="off">
+<form method="post" action="<?= $this->url->href('twofactor', 'save', array('user_id' => $user['id'])) ?>" autocomplete="off">
- <?= $this->formCsrf() ?>
- <?= $this->formCheckbox('twofactor_activated', t('Enable/disable two factor authentication'), 1, isset($user['twofactor_activated']) && $user['twofactor_activated'] == 1) ?>
+ <?= $this->form->csrf() ?>
+ <?= $this->form->checkbox('twofactor_activated', t('Enable/disable two factor authentication'), 1, isset($user['twofactor_activated']) && $user['twofactor_activated'] == 1) ?>
<div class="form-actions">
<input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
@@ -24,11 +24,11 @@
</div>
<h3><?= t('Test your device') ?></h3>
-<form method="post" action="<?= $this->u('twofactor', 'test', array('user_id' => $user['id'])) ?>" autocomplete="off">
+<form method="post" action="<?= $this->url->href('twofactor', 'test', array('user_id' => $user['id'])) ?>" autocomplete="off">
- <?= $this->formCsrf() ?>
- <?= $this->formLabel(t('Code'), 'code') ?>
- <?= $this->formText('code', array(), array(), array('placeholder="123456"'), 'form-numeric') ?>
+ <?= $this->form->csrf() ?>
+ <?= $this->form->label(t('Code'), 'code') ?>
+ <?= $this->form->text('code', array(), array(), array('placeholder="123456"'), 'form-numeric') ?>
<div class="form-actions">
<input type="submit" value="<?= t('Check my code') ?>" class="btn btn-blue"/>
diff --git a/app/Template/user/calendar.php b/app/Template/user/calendar.php
index 6708c5c3..7ec12496 100644
--- a/app/Template/user/calendar.php
+++ b/app/Template/user/calendar.php
@@ -1,6 +1,6 @@
<div id="user-calendar"
- data-check-url="<?= $this->u('calendar', 'user') ?>"
+ data-check-url="<?= $this->url->href('calendar', 'user') ?>"
data-user-id="<?= $user['id'] ?>"
- data-save-url="<?= $this->u('calendar', 'save') ?>"
+ data-save-url="<?= $this->url->href('calendar', 'save') ?>"
>
</div> \ No newline at end of file
diff --git a/app/Template/user/edit.php b/app/Template/user/edit.php
index bd1c4889..e29dcfca 100644
--- a/app/Template/user/edit.php
+++ b/app/Template/user/edit.php
@@ -1,42 +1,42 @@
<div class="page-header">
<h2><?= t('Edit user') ?></h2>
</div>
-<form method="post" action="<?= $this->u('user', 'edit', array('user_id' => $user['id'])) ?>" autocomplete="off">
+<form method="post" action="<?= $this->url->href('user', 'edit', array('user_id' => $user['id'])) ?>" autocomplete="off">
- <?= $this->formCsrf() ?>
+ <?= $this->form->csrf() ?>
- <?= $this->formHidden('id', $values) ?>
- <?= $this->formHidden('is_ldap_user', $values) ?>
+ <?= $this->form->hidden('id', $values) ?>
+ <?= $this->form->hidden('is_ldap_user', $values) ?>
- <?= $this->formLabel(t('Username'), 'username') ?>
- <?= $this->formText('username', $values, $errors, array('required', $values['is_ldap_user'] == 1 ? 'readonly' : '', 'maxlength="50"')) ?><br/>
+ <?= $this->form->label(t('Username'), 'username') ?>
+ <?= $this->form->text('username', $values, $errors, array('required', $values['is_ldap_user'] == 1 ? 'readonly' : '', 'maxlength="50"')) ?><br/>
- <?= $this->formLabel(t('Name'), 'name') ?>
- <?= $this->formText('name', $values, $errors) ?><br/>
+ <?= $this->form->label(t('Name'), 'name') ?>
+ <?= $this->form->text('name', $values, $errors) ?><br/>
- <?= $this->formLabel(t('Email'), 'email') ?>
- <?= $this->formEmail('email', $values, $errors) ?><br/>
+ <?= $this->form->label(t('Email'), 'email') ?>
+ <?= $this->form->email('email', $values, $errors) ?><br/>
- <?= $this->formLabel(t('Default project'), 'default_project_id') ?>
- <?= $this->formSelect('default_project_id', $projects, $values, $errors) ?><br/>
+ <?= $this->form->label(t('Default project'), 'default_project_id') ?>
+ <?= $this->form->select('default_project_id', $projects, $values, $errors) ?><br/>
- <?= $this->formLabel(t('Timezone'), 'timezone') ?>
- <?= $this->formSelect('timezone', $timezones, $values, $errors) ?><br/>
+ <?= $this->form->label(t('Timezone'), 'timezone') ?>
+ <?= $this->form->select('timezone', $timezones, $values, $errors) ?><br/>
- <?= $this->formLabel(t('Language'), 'language') ?>
- <?= $this->formSelect('language', $languages, $values, $errors) ?><br/>
+ <?= $this->form->label(t('Language'), 'language') ?>
+ <?= $this->form->select('language', $languages, $values, $errors) ?><br/>
<div class="alert alert-error">
- <?= $this->formCheckbox('disable_login_form', t('Disable login form'), 1, isset($values['disable_login_form']) && $values['disable_login_form'] == 1) ?><br/>
+ <?= $this->form->checkbox('disable_login_form', t('Disable login form'), 1, isset($values['disable_login_form']) && $values['disable_login_form'] == 1) ?><br/>
- <?php if ($this->userSession->isAdmin()): ?>
- <?= $this->formCheckbox('is_admin', t('Administrator'), 1, isset($values['is_admin']) && $values['is_admin'] == 1) ?><br/>
+ <?php if ($this->user->isAdmin()): ?>
+ <?= $this->form->checkbox('is_admin', t('Administrator'), 1, isset($values['is_admin']) && $values['is_admin'] == 1) ?><br/>
<?php endif ?>
</div>
<div class="form-actions">
<input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
<?= t('or') ?>
- <?= $this->a(t('cancel'), 'user', 'show', array('user_id' => $user['id'])) ?>
+ <?= $this->url->link(t('cancel'), 'user', 'show', array('user_id' => $user['id'])) ?>
</div>
</form> \ No newline at end of file
diff --git a/app/Template/user/external.php b/app/Template/user/external.php
index b4cea156..df85ace7 100644
--- a/app/Template/user/external.php
+++ b/app/Template/user/external.php
@@ -6,11 +6,11 @@
<h3><i class="fa fa-google"></i> <?= t('Google Account') ?></h3>
<p class="listing">
- <?php if ($this->userSession->isCurrentUser($user['id'])): ?>
+ <?php if ($this->user->isCurrentUser($user['id'])): ?>
<?php if (empty($user['google_id'])): ?>
- <?= $this->a(t('Link my Google Account'), 'user', 'google', array(), true) ?>
+ <?= $this->url->link(t('Link my Google Account'), 'user', 'google', array(), true) ?>
<?php else: ?>
- <?= $this->a(t('Unlink my Google Account'), 'user', 'unlinkGoogle', array(), true) ?>
+ <?= $this->url->link(t('Unlink my Google Account'), 'user', 'unlinkGoogle', array(), true) ?>
<?php endif ?>
<?php else: ?>
<?= empty($user['google_id']) ? t('No account linked.') : t('Account linked.') ?>
@@ -22,11 +22,11 @@
<h3><i class="fa fa-github"></i> <?= t('Github Account') ?></h3>
<p class="listing">
- <?php if ($this->userSession->isCurrentUser($user['id'])): ?>
+ <?php if ($this->user->isCurrentUser($user['id'])): ?>
<?php if (empty($user['github_id'])): ?>
- <?= $this->a(t('Link my GitHub Account'), 'user', 'github', array(), true) ?>
+ <?= $this->url->link(t('Link my GitHub Account'), 'user', 'github', array(), true) ?>
<?php else: ?>
- <?= $this->a(t('Unlink my GitHub Account'), 'user', 'unlinkGitHub', array(), true) ?>
+ <?= $this->url->link(t('Unlink my GitHub Account'), 'user', 'unlinkGitHub', array(), true) ?>
<?php endif ?>
<?php else: ?>
<?= empty($user['github_id']) ? t('No account linked.') : t('Account linked.') ?>
diff --git a/app/Template/user/index.php b/app/Template/user/index.php
index d6b0fecf..6b4396b2 100644
--- a/app/Template/user/index.php
+++ b/app/Template/user/index.php
@@ -1,8 +1,8 @@
<section id="main">
<div class="page-header">
- <?php if ($this->userSession->isAdmin()): ?>
+ <?php if ($this->user->isAdmin()): ?>
<ul>
- <li><i class="fa fa-plus fa-fw"></i><?= $this->a(t('New user'), 'user', 'create') ?></li>
+ <li><i class="fa fa-plus fa-fw"></i><?= $this->url->link(t('New user'), 'user', 'create') ?></li>
</ul>
<?php endif ?>
</div>
@@ -26,10 +26,10 @@
<?php foreach ($paginator->getCollection() as $user): ?>
<tr>
<td>
- <?= $this->a('#'.$user['id'], 'user', 'show', array('user_id' => $user['id'])) ?>
+ <?= $this->url->link('#'.$user['id'], 'user', 'show', array('user_id' => $user['id'])) ?>
</td>
<td>
- <?= $this->a($this->e($user['username']), 'user', 'show', array('user_id' => $user['id'])) ?>
+ <?= $this->url->link($this->e($user['username']), 'user', 'show', array('user_id' => $user['id'])) ?>
</td>
<td>
<?= $this->e($user['name']) ?>
diff --git a/app/Template/user/last.php b/app/Template/user/last.php
index 317334b8..ab25f79b 100644
--- a/app/Template/user/last.php
+++ b/app/Template/user/last.php
@@ -17,7 +17,7 @@
<td><?= dt('%B %e, %Y at %k:%M %p', $login['date_creation']) ?></td>
<td><?= $this->e($login['auth_type']) ?></td>
<td><?= $this->e($login['ip']) ?></td>
- <td><?= $this->e($this->summary($login['user_agent'])) ?></td>
+ <td><?= $this->e($this->text->truncate($login['user_agent'])) ?></td>
</tr>
<?php endforeach ?>
</table>
diff --git a/app/Template/user/layout.php b/app/Template/user/layout.php
index a5a78a3f..e60ab77d 100644
--- a/app/Template/user/layout.php
+++ b/app/Template/user/layout.php
@@ -1,9 +1,9 @@
<section id="main">
<div class="page-header">
- <?php if ($this->userSession->isAdmin()): ?>
+ <?php if ($this->user->isAdmin()): ?>
<ul>
- <li><i class="fa fa-user fa-fw"></i><?= $this->a(t('All users'), 'user', 'index') ?></li>
- <li><i class="fa fa-plus fa-fw"></i><?= $this->a(t('New user'), 'user', 'create') ?></li>
+ <li><i class="fa fa-user fa-fw"></i><?= $this->url->link(t('All users'), 'user', 'index') ?></li>
+ <li><i class="fa fa-plus fa-fw"></i><?= $this->url->link(t('New user'), 'user', 'create') ?></li>
</ul>
<?php endif ?>
</div>
diff --git a/app/Template/user/new.php b/app/Template/user/new.php
index e56f38b1..ba7a3881 100644
--- a/app/Template/user/new.php
+++ b/app/Template/user/new.php
@@ -1,44 +1,44 @@
<section id="main">
<div class="page-header">
<ul>
- <li><i class="fa fa-user fa-fw"></i><?= $this->a(t('All users'), 'user', 'index') ?></li>
+ <li><i class="fa fa-user fa-fw"></i><?= $this->url->link(t('All users'), 'user', 'index') ?></li>
</ul>
</div>
<section>
- <form method="post" action="<?= $this->u('user', 'save') ?>" autocomplete="off">
+ <form method="post" action="<?= $this->url->href('user', 'save') ?>" autocomplete="off">
- <?= $this->formCsrf() ?>
+ <?= $this->form->csrf() ?>
- <?= $this->formLabel(t('Username'), 'username') ?>
- <?= $this->formText('username', $values, $errors, array('autofocus', 'required', 'maxlength="50"')) ?><br/>
+ <?= $this->form->label(t('Username'), 'username') ?>
+ <?= $this->form->text('username', $values, $errors, array('autofocus', 'required', 'maxlength="50"')) ?><br/>
- <?= $this->formLabel(t('Name'), 'name') ?>
- <?= $this->formText('name', $values, $errors) ?><br/>
+ <?= $this->form->label(t('Name'), 'name') ?>
+ <?= $this->form->text('name', $values, $errors) ?><br/>
- <?= $this->formLabel(t('Email'), 'email') ?>
- <?= $this->formEmail('email', $values, $errors) ?><br/>
+ <?= $this->form->label(t('Email'), 'email') ?>
+ <?= $this->form->email('email', $values, $errors) ?><br/>
- <?= $this->formLabel(t('Password'), 'password') ?>
- <?= $this->formPassword('password', $values, $errors, array('required')) ?><br/>
+ <?= $this->form->label(t('Password'), 'password') ?>
+ <?= $this->form->password('password', $values, $errors, array('required')) ?><br/>
- <?= $this->formLabel(t('Confirmation'), 'confirmation') ?>
- <?= $this->formPassword('confirmation', $values, $errors, array('required')) ?><br/>
+ <?= $this->form->label(t('Confirmation'), 'confirmation') ?>
+ <?= $this->form->password('confirmation', $values, $errors, array('required')) ?><br/>
- <?= $this->formLabel(t('Default project'), 'default_project_id') ?>
- <?= $this->formSelect('default_project_id', $projects, $values, $errors) ?><br/>
+ <?= $this->form->label(t('Default project'), 'default_project_id') ?>
+ <?= $this->form->select('default_project_id', $projects, $values, $errors) ?><br/>
- <?= $this->formLabel(t('Timezone'), 'timezone') ?>
- <?= $this->formSelect('timezone', $timezones, $values, $errors) ?><br/>
+ <?= $this->form->label(t('Timezone'), 'timezone') ?>
+ <?= $this->form->select('timezone', $timezones, $values, $errors) ?><br/>
- <?= $this->formLabel(t('Language'), 'language') ?>
- <?= $this->formSelect('language', $languages, $values, $errors) ?><br/>
+ <?= $this->form->label(t('Language'), 'language') ?>
+ <?= $this->form->select('language', $languages, $values, $errors) ?><br/>
- <?= $this->formCheckbox('is_admin', t('Administrator'), 1, isset($values['is_admin']) && $values['is_admin'] == 1 ? true : false) ?>
+ <?= $this->form->checkbox('is_admin', t('Administrator'), 1, isset($values['is_admin']) && $values['is_admin'] == 1 ? true : false) ?>
<div class="form-actions">
<input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
<?= t('or') ?>
- <?= $this->a(t('cancel'), 'user', 'index') ?>
+ <?= $this->url->link(t('cancel'), 'user', 'index') ?>
</div>
</form>
</section>
diff --git a/app/Template/user/notifications.php b/app/Template/user/notifications.php
index 56c48f8f..df5cbb9b 100644
--- a/app/Template/user/notifications.php
+++ b/app/Template/user/notifications.php
@@ -2,18 +2,18 @@
<h2><?= t('Email notifications') ?></h2>
</div>
-<form method="post" action="<?= $this->u('user', 'notifications', array('user_id' => $user['id'])) ?>" autocomplete="off">
+<form method="post" action="<?= $this->url->href('user', 'notifications', array('user_id' => $user['id'])) ?>" autocomplete="off">
- <?= $this->formCsrf() ?>
+ <?= $this->form->csrf() ?>
- <?= $this->formCheckbox('notifications_enabled', t('Enable email notifications'), '1', $notifications['notifications_enabled'] == 1) ?><br/>
+ <?= $this->form->checkbox('notifications_enabled', t('Enable email notifications'), '1', $notifications['notifications_enabled'] == 1) ?><br/>
<?php if (! empty($projects)): ?>
<p><?= t('I want to receive notifications only for those projects:') ?><br/><br/></p>
<div class="form-checkbox-group">
<?php foreach ($projects as $project_id => $project_name): ?>
- <?= $this->formCheckbox('projects['.$project_id.']', $project_name, '1', isset($notifications['project_'.$project_id])) ?><br/>
+ <?= $this->form->checkbox('projects['.$project_id.']', $project_name, '1', isset($notifications['project_'.$project_id])) ?><br/>
<?php endforeach ?>
</div>
<?php endif ?>
@@ -21,6 +21,6 @@
<div class="form-actions">
<input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
<?= t('or') ?>
- <?= $this->a(t('cancel'), 'user', 'show', array('user_id' => $user['id'])) ?>
+ <?= $this->url->link(t('cancel'), 'user', 'show', array('user_id' => $user['id'])) ?>
</div>
</form> \ No newline at end of file
diff --git a/app/Template/user/password.php b/app/Template/user/password.php
index 14de0d42..3ef28d33 100644
--- a/app/Template/user/password.php
+++ b/app/Template/user/password.php
@@ -2,25 +2,25 @@
<h2><?= t('Password modification') ?></h2>
</div>
-<form method="post" action="<?= $this->u('user', 'password', array('user_id' => $user['id'])) ?>" autocomplete="off">
+<form method="post" action="<?= $this->url->href('user', 'password', array('user_id' => $user['id'])) ?>" autocomplete="off">
- <?= $this->formHidden('id', $values) ?>
- <?= $this->formCsrf() ?>
+ <?= $this->form->hidden('id', $values) ?>
+ <?= $this->form->csrf() ?>
<div class="alert alert-error">
- <?= $this->formLabel(t('Current password for the user "%s"', $this->getFullname()), 'current_password') ?>
- <?= $this->formPassword('current_password', $values, $errors) ?><br/>
+ <?= $this->form->label(t('Current password for the user "%s"', $this->user->getFullname()), 'current_password') ?>
+ <?= $this->form->password('current_password', $values, $errors) ?><br/>
</div>
- <?= $this->formLabel(t('New password for the user "%s"', $this->getFullname($user)), 'password') ?>
- <?= $this->formPassword('password', $values, $errors) ?><br/>
+ <?= $this->form->label(t('New password for the user "%s"', $this->user->getFullname($user)), 'password') ?>
+ <?= $this->form->password('password', $values, $errors) ?><br/>
- <?= $this->formLabel(t('Confirmation'), 'confirmation') ?>
- <?= $this->formPassword('confirmation', $values, $errors) ?><br/>
+ <?= $this->form->label(t('Confirmation'), 'confirmation') ?>
+ <?= $this->form->password('confirmation', $values, $errors) ?><br/>
<div class="form-actions">
<input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
<?= t('or') ?>
- <?= $this->a(t('cancel'), 'user', 'show', array('user_id' => $user['id'])) ?>
+ <?= $this->url->link(t('cancel'), 'user', 'show', array('user_id' => $user['id'])) ?>
</div>
</form>
diff --git a/app/Template/user/remove.php b/app/Template/user/remove.php
index e4b09cfa..810a3a3f 100644
--- a/app/Template/user/remove.php
+++ b/app/Template/user/remove.php
@@ -6,8 +6,8 @@
<p class="alert alert-info"><?= t('Do you really want to remove this user: "%s"?', $user['name'] ?: $user['username']) ?></p>
<div class="form-actions">
- <?= $this->a(t('Yes'), 'user', 'remove', array('user_id' => $user['id'], 'confirmation' => 'yes'), true, 'btn btn-red') ?>
+ <?= $this->url->link(t('Yes'), 'user', 'remove', array('user_id' => $user['id'], 'confirmation' => 'yes'), true, 'btn btn-red') ?>
<?= t('or') ?>
- <?= $this->a(t('cancel'), 'user', 'show', array('user_id' => $user['id'])) ?>
+ <?= $this->url->link(t('cancel'), 'user', 'show', array('user_id' => $user['id'])) ?>
</div>
</div> \ No newline at end of file
diff --git a/app/Template/user/sessions.php b/app/Template/user/sessions.php
index 5a06057c..a7504a7a 100644
--- a/app/Template/user/sessions.php
+++ b/app/Template/user/sessions.php
@@ -18,8 +18,8 @@
<td><?= dt('%B %e, %Y at %k:%M %p', $session['date_creation']) ?></td>
<td><?= dt('%B %e, %Y at %k:%M %p', $session['expiration']) ?></td>
<td><?= $this->e($session['ip']) ?></td>
- <td><?= $this->e($this->summary($session['user_agent'])) ?></td>
- <td><?= $this->a(t('Remove'), 'user', 'removeSession', array('user_id' => $user['id'], 'id' => $session['id']), true) ?></td>
+ <td><?= $this->e($this->text->truncate($session['user_agent'])) ?></td>
+ <td><?= $this->url->link(t('Remove'), 'user', 'removeSession', array('user_id' => $user['id'], 'id' => $session['id']), true) ?></td>
</tr>
<?php endforeach ?>
</table>
diff --git a/app/Template/user/share.php b/app/Template/user/share.php
index 55d06897..8f333a6b 100644
--- a/app/Template/user/share.php
+++ b/app/Template/user/share.php
@@ -6,12 +6,12 @@
<div class="listing">
<ul class="no-bullet">
- <li><strong><i class="fa fa-calendar"></i> <?= $this->a(t('iCal feed'), 'ical', 'user', array('token' => $user['token']), false, '', '', true) ?></strong></li>
+ <li><strong><i class="fa fa-calendar"></i> <?= $this->url->link(t('iCal feed'), 'ical', 'user', array('token' => $user['token']), false, '', '', true) ?></strong></li>
</ul>
</div>
- <?= $this->a(t('Disable public access'), 'user', 'share', array('user_id' => $user['id'], 'switch' => 'disable'), true, 'btn btn-red') ?>
+ <?= $this->url->link(t('Disable public access'), 'user', 'share', array('user_id' => $user['id'], 'switch' => 'disable'), true, 'btn btn-red') ?>
<?php else: ?>
- <?= $this->a(t('Enable public access'), 'user', 'share', array('user_id' => $user['id'], 'switch' => 'enable'), true, 'btn btn-blue') ?>
+ <?= $this->url->link(t('Enable public access'), 'user', 'share', array('user_id' => $user['id'], 'switch' => 'enable'), true, 'btn btn-blue') ?>
<?php endif ?>
diff --git a/app/Template/user/show.php b/app/Template/user/show.php
index 1be39cc3..5442e2e7 100644
--- a/app/Template/user/show.php
+++ b/app/Template/user/show.php
@@ -21,8 +21,8 @@
</div>
<ul class="listing">
<li><?= t('Default project:') ?> <strong><?= (isset($user['default_project_id']) && isset($projects[$user['default_project_id']])) ? $this->e($projects[$user['default_project_id']]) : t('None') ?></strong></li>
- <li><?= t('Timezone:') ?> <strong><?= $this->inList($user['timezone'], $timezones) ?></strong></li>
- <li><?= t('Language:') ?> <strong><?= $this->inList($user['language'], $languages) ?></strong></li>
+ <li><?= t('Timezone:') ?> <strong><?= $this->text->in($user['timezone'], $timezones) ?></strong></li>
+ <li><?= t('Language:') ?> <strong><?= $this->text->in($user['language'], $languages) ?></strong></li>
<li><?= t('Notifications:') ?> <strong><?= $user['notifications_enabled'] == 1 ? t('Enabled') : t('Disabled') ?></strong></li>
</ul>
@@ -33,7 +33,7 @@
<div class="listing">
<ul class="no-bullet">
- <li><strong><i class="fa fa-calendar"></i> <?= $this->a(t('iCal feed'), 'ical', 'user', array('token' => $user['token']), false, '', '', true) ?></strong></li>
+ <li><strong><i class="fa fa-calendar"></i> <?= $this->url->link(t('iCal feed'), 'ical', 'user', array('token' => $user['token']), false, '', '', true) ?></strong></li>
</ul>
</div>
<?php endif ?>
diff --git a/app/Template/user/sidebar.php b/app/Template/user/sidebar.php
index 8c7e3cf8..2c8e909a 100644
--- a/app/Template/user/sidebar.php
+++ b/app/Template/user/sidebar.php
@@ -2,75 +2,75 @@
<h2><?= t('Information') ?></h2>
<ul>
<li>
- <?= $this->a(t('Summary'), 'user', 'show', array('user_id' => $user['id'])) ?>
+ <?= $this->url->link(t('Summary'), 'user', 'show', array('user_id' => $user['id'])) ?>
</li>
- <?php if ($this->userSession->isAdmin()): ?>
+ <?php if ($this->user->isAdmin()): ?>
<li>
- <?= $this->a(t('User dashboard'), 'app', 'dashboard', array('user_id' => $user['id'])) ?>
+ <?= $this->url->link(t('User dashboard'), 'app', 'dashboard', array('user_id' => $user['id'])) ?>
</li>
<li>
- <?= $this->a(t('User calendar'), 'user', 'calendar', array('user_id' => $user['id'])) ?>
+ <?= $this->url->link(t('User calendar'), 'user', 'calendar', array('user_id' => $user['id'])) ?>
</li>
<?php endif ?>
- <?php if ($this->userSession->isAdmin() || $this->userSession->isCurrentUser($user['id'])): ?>
+ <?php if ($this->user->isAdmin() || $this->user->isCurrentUser($user['id'])): ?>
<li>
- <?= $this->a(t('Time tracking'), 'user', 'timesheet', array('user_id' => $user['id'])) ?>
+ <?= $this->url->link(t('Time tracking'), 'user', 'timesheet', array('user_id' => $user['id'])) ?>
</li>
<li>
- <?= $this->a(t('Last logins'), 'user', 'last', array('user_id' => $user['id'])) ?>
+ <?= $this->url->link(t('Last logins'), 'user', 'last', array('user_id' => $user['id'])) ?>
</li>
<li>
- <?= $this->a(t('Persistent connections'), 'user', 'sessions', array('user_id' => $user['id'])) ?>
+ <?= $this->url->link(t('Persistent connections'), 'user', 'sessions', array('user_id' => $user['id'])) ?>
</li>
<?php endif ?>
</ul>
<h2><?= t('Actions') ?></h2>
<ul>
- <?php if ($this->userSession->isAdmin() || $this->userSession->isCurrentUser($user['id'])): ?>
+ <?php if ($this->user->isAdmin() || $this->user->isCurrentUser($user['id'])): ?>
<li>
- <?= $this->a(t('Edit profile'), 'user', 'edit', array('user_id' => $user['id'])) ?>
+ <?= $this->url->link(t('Edit profile'), 'user', 'edit', array('user_id' => $user['id'])) ?>
</li>
<?php if ($user['is_ldap_user'] == 0): ?>
<li>
- <?= $this->a(t('Change password'), 'user', 'password', array('user_id' => $user['id'])) ?>
+ <?= $this->url->link(t('Change password'), 'user', 'password', array('user_id' => $user['id'])) ?>
</li>
<?php endif ?>
- <?php if ($this->userSession->isCurrentUser($user['id'])): ?>
+ <?php if ($this->user->isCurrentUser($user['id'])): ?>
<li>
- <?= $this->a(t('Two factor authentication'), 'twofactor', 'index', array('user_id' => $user['id'])) ?>
+ <?= $this->url->link(t('Two factor authentication'), 'twofactor', 'index', array('user_id' => $user['id'])) ?>
</li>
- <?php elseif ($this->userSession->isAdmin() && $user['twofactor_activated'] == 1): ?>
+ <?php elseif ($this->user->isAdmin() && $user['twofactor_activated'] == 1): ?>
<li>
- <?= $this->a(t('Two factor authentication'), 'twofactor', 'disable', array('user_id' => $user['id'])) ?>
+ <?= $this->url->link(t('Two factor authentication'), 'twofactor', 'disable', array('user_id' => $user['id'])) ?>
</li>
<?php endif ?>
<li>
- <?= $this->a(t('Public access'), 'user', 'share', array('user_id' => $user['id'])) ?>
+ <?= $this->url->link(t('Public access'), 'user', 'share', array('user_id' => $user['id'])) ?>
</li>
<li>
- <?= $this->a(t('Email notifications'), 'user', 'notifications', array('user_id' => $user['id'])) ?>
+ <?= $this->url->link(t('Email notifications'), 'user', 'notifications', array('user_id' => $user['id'])) ?>
</li>
<li>
- <?= $this->a(t('External accounts'), 'user', 'external', array('user_id' => $user['id'])) ?>
+ <?= $this->url->link(t('External accounts'), 'user', 'external', array('user_id' => $user['id'])) ?>
</li>
<?php endif ?>
- <?php if ($this->userSession->isAdmin()): ?>
+ <?php if ($this->user->isAdmin()): ?>
<li>
- <?= $this->a(t('Hourly rates'), 'hourlyrate', 'index', array('user_id' => $user['id'])) ?>
+ <?= $this->url->link(t('Hourly rates'), 'hourlyrate', 'index', array('user_id' => $user['id'])) ?>
</li>
<li>
- <?= $this->a(t('Manage timetable'), 'timetable', 'index', array('user_id' => $user['id'])) ?>
+ <?= $this->url->link(t('Manage timetable'), 'timetable', 'index', array('user_id' => $user['id'])) ?>
</li>
<?php endif ?>
- <?php if ($this->userSession->isAdmin() && ! $this->userSession->isCurrentUser($user['id'])): ?>
+ <?php if ($this->user->isAdmin() && ! $this->user->isCurrentUser($user['id'])): ?>
<li>
- <?= $this->a(t('Remove'), 'user', 'remove', array('user_id' => $user['id'])) ?>
+ <?= $this->url->link(t('Remove'), 'user', 'remove', array('user_id' => $user['id'])) ?>
</li>
<?php endif ?>
</ul>
diff --git a/app/Template/user/timesheet.php b/app/Template/user/timesheet.php
index 3ae84df0..5c0d3af8 100644
--- a/app/Template/user/timesheet.php
+++ b/app/Template/user/timesheet.php
@@ -16,8 +16,8 @@
</tr>
<?php foreach ($subtask_paginator->getCollection() as $record): ?>
<tr>
- <td><?= $this->a($this->e($record['task_title']), 'task', 'show', array('project_id' => $record['project_id'], 'task_id' => $record['task_id'])) ?></td>
- <td><?= $this->a($this->e($record['subtask_title']), 'task', 'show', array('project_id' => $record['project_id'], 'task_id' => $record['task_id'])) ?></td>
+ <td><?= $this->url->link($this->e($record['task_title']), 'task', 'show', array('project_id' => $record['project_id'], 'task_id' => $record['task_id'])) ?></td>
+ <td><?= $this->url->link($this->e($record['subtask_title']), 'task', 'show', array('project_id' => $record['project_id'], 'task_id' => $record['task_id'])) ?></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>
<td><?= n($record['time_spent']).' '.t('hours') ?></td>