summaryrefslogtreecommitdiff
path: root/app/Template/board
diff options
context:
space:
mode:
Diffstat (limited to 'app/Template/board')
-rw-r--r--app/Template/board/assignee.php14
-rw-r--r--app/Template/board/category.php14
-rw-r--r--app/Template/board/comments.php4
-rw-r--r--app/Template/board/description.php2
-rw-r--r--app/Template/board/edit.php26
-rw-r--r--app/Template/board/files.php4
-rw-r--r--app/Template/board/filters.php16
-rw-r--r--app/Template/board/index.php4
-rw-r--r--app/Template/board/public.php2
-rw-r--r--app/Template/board/remove.php4
-rw-r--r--app/Template/board/show.php6
-rw-r--r--app/Template/board/subtasks.php6
-rw-r--r--app/Template/board/swimlane.php10
-rw-r--r--app/Template/board/task.php30
14 files changed, 71 insertions, 71 deletions
diff --git a/app/Template/board/assignee.php b/app/Template/board/assignee.php
index 434daa51..1faf07f8 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="<?= Helper\u('board', 'updateAssignee', array('task_id' => $values['id'])) ?>">
+ <form method="post" action="<?= $this->u('board', 'updateAssignee', array('task_id' => $values['id'])) ?>">
- <?= Helper\form_csrf() ?>
+ <?= $this->formCsrf() ?>
- <?= Helper\form_hidden('id', $values) ?>
- <?= Helper\form_hidden('project_id', $values) ?>
+ <?= $this->formHidden('id', $values) ?>
+ <?= $this->formHidden('project_id', $values) ?>
- <?= Helper\form_label(t('Assignee'), 'owner_id') ?>
- <?= Helper\form_select('owner_id', $users_list, $values) ?><br/>
+ <?= $this->formLabel(t('Assignee'), 'owner_id') ?>
+ <?= $this->formSelect('owner_id', $users_list, $values) ?><br/>
<div class="form-actions">
<input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
<?= t('or') ?>
- <?= Helper\a(t('cancel'), 'board', 'show', array('project_id' => $project['id'])) ?>
+ <?= $this->a(t('cancel'), 'board', 'show', array('project_id' => $project['id'])) ?>
</div>
</form>
</section>
diff --git a/app/Template/board/category.php b/app/Template/board/category.php
index 88d8e71c..3fc77632 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="<?= Helper\u('board', 'updateCategory', array('task_id' => $values['id'])) ?>">
+ <form method="post" action="<?= $this->u('board', 'updateCategory', array('task_id' => $values['id'])) ?>">
- <?= Helper\form_csrf() ?>
+ <?= $this->formCsrf() ?>
- <?= Helper\form_hidden('id', $values) ?>
- <?= Helper\form_hidden('project_id', $values) ?>
+ <?= $this->formHidden('id', $values) ?>
+ <?= $this->formHidden('project_id', $values) ?>
- <?= Helper\form_label(t('Category'), 'category_id') ?>
- <?= Helper\form_select('category_id', $categories_list, $values) ?><br/>
+ <?= $this->formLabel(t('Category'), 'category_id') ?>
+ <?= $this->formSelect('category_id', $categories_list, $values) ?><br/>
<div class="form-actions">
<input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
<?= t('or') ?>
- <?= Helper\a(t('cancel'), 'board', 'show', array('project_id' => $project['id'])) ?>
+ <?= $this->a(t('cancel'), 'board', 'show', array('project_id' => $project['id'])) ?>
</div>
</form>
</section>
diff --git a/app/Template/board/comments.php b/app/Template/board/comments.php
index 83d6bd9a..5424df78 100644
--- a/app/Template/board/comments.php
+++ b/app/Template/board/comments.php
@@ -1,12 +1,12 @@
<section>
<?php foreach ($comments as $comment): ?>
<p class="comment-title">
- <span class="comment-username"><?= Helper\escape($comment['name'] ?: $comment['username']) ?></span> @ <span class="comment-date"><?= dt('%b %e, %Y, %k:%M %p', $comment['date']) ?></span>
+ <span class="comment-username"><?= $this->e($comment['name'] ?: $comment['username']) ?></span> @ <span class="comment-date"><?= dt('%b %e, %Y, %k:%M %p', $comment['date']) ?></span>
</p>
<div class="comment-inner">
<div class="markdown">
- <?= Helper\markdown($comment['comment']) ?>
+ <?= $this->markdown($comment['comment']) ?>
</div>
</div>
<?php endforeach ?>
diff --git a/app/Template/board/description.php b/app/Template/board/description.php
index 85e042dd..b38f5bf4 100644
--- a/app/Template/board/description.php
+++ b/app/Template/board/description.php
@@ -1,5 +1,5 @@
<section class="tooltip-large">
<div class="markdown">
- <?= Helper\markdown($task['description']) ?>
+ <?= $this->markdown($task['description']) ?>
</div>
</section> \ No newline at end of file
diff --git a/app/Template/board/edit.php b/app/Template/board/edit.php
index a44abcc8..65a8fb26 100644
--- a/app/Template/board/edit.php
+++ b/app/Template/board/edit.php
@@ -4,8 +4,8 @@
<section>
<h3><?= t('Change columns') ?></h3>
-<form method="post" action="<?= Helper\u('board', 'update', array('project_id' => $project['id'])) ?>" autocomplete="off">
- <?= Helper\form_csrf() ?>
+<form method="post" action="<?= $this->u('board', 'update', array('project_id' => $project['id'])) ?>" autocomplete="off">
+ <?= $this->formCsrf() ?>
<?php $i = 0; ?>
<table>
<tr>
@@ -16,23 +16,23 @@
</tr>
<?php foreach ($columns as $column): ?>
<tr>
- <td><?= Helper\form_label('#'.++$i, 'title['.$column['id'].']', array('title="column_id='.$column['id'].'"')) ?></td>
- <td><?= Helper\form_text('title['.$column['id'].']', $values, $errors, array('required')) ?></td>
- <td><?= Helper\form_number('task_limit['.$column['id'].']', $values, $errors, array('placeholder="'.t('limit').'"')) ?></td>
+ <td><?= $this->formLabel('#'.++$i, 'title['.$column['id'].']', array('title="column_id='.$column['id'].'"')) ?></td>
+ <td><?= $this->formText('title['.$column['id'].']', $values, $errors, array('required')) ?></td>
+ <td><?= $this->formNumber('task_limit['.$column['id'].']', $values, $errors, array('placeholder="'.t('limit').'"')) ?></td>
<td>
<ul>
<?php if ($column['position'] != 1): ?>
<li>
- <?= Helper\a(t('Move Up'), 'board', 'moveColumn', array('project_id' => $project['id'], 'column_id' => $column['id'], 'direction' => 'up'), true) ?>
+ <?= $this->a(t('Move Up'), 'board', 'moveColumn', array('project_id' => $project['id'], 'column_id' => $column['id'], 'direction' => 'up'), true) ?>
</li>
<?php endif ?>
<?php if ($column['position'] != count($columns)): ?>
<li>
- <?= Helper\a(t('Move Down'), 'board', 'moveColumn', array('project_id' => $project['id'], 'column_id' => $column['id'], 'direction' => 'down'), true) ?>
+ <?= $this->a(t('Move Down'), 'board', 'moveColumn', array('project_id' => $project['id'], 'column_id' => $column['id'], 'direction' => 'down'), true) ?>
</li>
<?php endif ?>
<li>
- <?= Helper\a(t('Remove'), 'board', 'remove', array('project_id' => $project['id'], 'column_id' => $column['id'])) ?>
+ <?= $this->a(t('Remove'), 'board', 'remove', array('project_id' => $project['id'], 'column_id' => $column['id'])) ?>
</li>
</ul>
</td>
@@ -46,14 +46,14 @@
</form>
<hr/>
<h3><?= t('Add a new column') ?></h3>
-<form method="post" action="<?= Helper\u('board', 'add', array('project_id' => $project['id'])) ?>" autocomplete="off">
+<form method="post" action="<?= $this->u('board', 'add', array('project_id' => $project['id'])) ?>" autocomplete="off">
- <?= Helper\form_csrf() ?>
+ <?= $this->formCsrf() ?>
- <?= Helper\form_hidden('project_id', $values) ?>
+ <?= $this->formHidden('project_id', $values) ?>
- <?= Helper\form_label(t('Title'), 'title') ?>
- <?= Helper\form_text('title', $values, $errors, array('required')) ?>
+ <?= $this->formLabel(t('Title'), 'title') ?>
+ <?= $this->formText('title', $values, $errors, array('required')) ?>
<div class="form-actions">
<input type="submit" value="<?= t('Add this column') ?>" class="btn btn-blue"/>
diff --git a/app/Template/board/files.php b/app/Template/board/files.php
index 66d5bff9..fee0b63b 100644
--- a/app/Template/board/files.php
+++ b/app/Template/board/files.php
@@ -2,8 +2,8 @@
<?php foreach ($files as $file): ?>
<i class="fa fa-file-o fa-fw"></i>
- <?= Helper\a(
- Helper\escape($file['name']),
+ <?= $this->a(
+ $this->e($file['name']),
'file',
'download',
array('file_id' => $file['id'], 'task_id' => $file['task_id'])
diff --git a/app/Template/board/filters.php b/app/Template/board/filters.php
index a913f7be..1bce0029 100644
--- a/app/Template/board/filters.php
+++ b/app/Template/board/filters.php
@@ -2,34 +2,34 @@
<ul class="board-filters">
<li class="hide-tablet">
<?= t('Filter by user') ?>
- <?= Helper\form_select('user_id', $users) ?>
+ <?= $this->formSelect('user_id', $users) ?>
</li>
<li class="hide-tablet">
<?= t('Filter by category') ?>
- <?= Helper\form_select('category_id', $categories) ?>
+ <?= $this->formSelect('category_id', $categories) ?>
</li>
<li class="hide-tablet">
<a href="#" id="filter-due-date"><?= t('Filter by due date') ?></a>
</li>
<li>
<i class="fa fa-search"></i>
- <?= Helper\a(t('Search'), 'project', 'search', array('project_id' => $project['id'])) ?>
+ <?= $this->a(t('Search'), 'project', 'search', array('project_id' => $project['id'])) ?>
</li>
<li>
<i class="fa fa-check-square-o fa-fw"></i>
- <?= Helper\a(t('Completed tasks'), 'project', 'tasks', array('project_id' => $project['id'])) ?>
+ <?= $this->a(t('Completed tasks'), 'project', 'tasks', array('project_id' => $project['id'])) ?>
</li>
<li>
<i class="fa fa-dashboard fa-fw"></i>
- <?= Helper\a(t('Activity'), 'project', 'activity', array('project_id' => $project['id'])) ?>
+ <?= $this->a(t('Activity'), 'project', 'activity', array('project_id' => $project['id'])) ?>
</li>
<li>
<i class="fa fa-line-chart fa-fw"></i>
- <?= Helper\a(t('Analytics'), 'analytic', 'tasks', array('project_id' => $project['id'])) ?>
+ <?= $this->a(t('Analytics'), 'analytic', 'tasks', array('project_id' => $project['id'])) ?>
</li>
- <?php if (Helper\is_admin()): ?>
+ <?php if ($this->projectPermission->adminAllowed($project['id'], $this->acl->getUserId())): ?>
<li><i class="fa fa-cog fa-fw"></i>
- <?= Helper\a(t('Configure'), 'project', 'show', array('project_id' => $project['id'])) ?>
+ <?= $this->a(t('Configure'), 'project', 'show', array('project_id' => $project['id'])) ?>
<?php endif ?>
</ul>
</div> \ No newline at end of file
diff --git a/app/Template/board/index.php b/app/Template/board/index.php
index 53c662a0..78537085 100644
--- a/app/Template/board/index.php
+++ b/app/Template/board/index.php
@@ -1,12 +1,12 @@
<section id="main">
- <?= Helper\template('board/filters', array(
+ <?= $this->render('board/filters', array(
'categories' => $categories,
'users' => $users,
'project' => $project,
)) ?>
- <?= Helper\template('board/show', array(
+ <?= $this->render('board/show', array(
'project' => $project,
'swimlanes' => $swimlanes,
'categories' => $categories,
diff --git a/app/Template/board/public.php b/app/Template/board/public.php
index 0544f392..8eb6415d 100644
--- a/app/Template/board/public.php
+++ b/app/Template/board/public.php
@@ -1,6 +1,6 @@
<section id="main" class="public-board">
- <?= Helper\template('board/show', array(
+ <?= $this->render('board/show', array(
'project' => $project,
'swimlanes' => $swimlanes,
'categories' => $categories,
diff --git a/app/Template/board/remove.php b/app/Template/board/remove.php
index 4529063b..4b0370eb 100644
--- a/app/Template/board/remove.php
+++ b/app/Template/board/remove.php
@@ -9,7 +9,7 @@
</p>
<div class="form-actions">
- <?= Helper\a(t('Yes'), 'board', 'remove', array('project_id' => $project['id'], 'column_id' => $column['id'], 'remove' => 'yes'), true, 'btn btn-red') ?>
- <?= t('or') ?> <?= Helper\a(t('cancel'), 'board', 'edit', array('project_id' => $project['id'])) ?>
+ <?= $this->a(t('Yes'), 'board', 'remove', array('project_id' => $project['id'], 'column_id' => $column['id'], 'remove' => 'yes'), true, 'btn btn-red') ?>
+ <?= t('or') ?> <?= $this->a(t('cancel'), 'board', 'edit', array('project_id' => $project['id'])) ?>
</div>
</div> \ No newline at end of file
diff --git a/app/Template/board/show.php b/app/Template/board/show.php
index 7df19bc1..5fbb576c 100644
--- a/app/Template/board/show.php
+++ b/app/Template/board/show.php
@@ -5,8 +5,8 @@
<table id="board"
data-project-id="<?= $project['id'] ?>"
data-check-interval="<?= $board_private_refresh_interval ?>"
- data-save-url="<?= Helper\u('board', 'save', array('project_id' => $project['id'])) ?>"
- data-check-url="<?= Helper\u('board', 'check', array('project_id' => $project['id'], 'timestamp' => time())) ?>"
+ 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())) ?>"
>
<?php endif ?>
@@ -15,7 +15,7 @@
<p class="alert alert-error"><?= t('There is no column in your project!') ?></p>
<?php break ?>
<?php else: ?>
- <?= Helper\template('board/swimlane', array(
+ <?= $this->render('board/swimlane', array(
'project' => $project,
'swimlane' => $swimlane,
'board_highlight_period' => $board_highlight_period,
diff --git a/app/Template/board/subtasks.php b/app/Template/board/subtasks.php
index 53330022..72e2b15c 100644
--- a/app/Template/board/subtasks.php
+++ b/app/Template/board/subtasks.php
@@ -1,13 +1,13 @@
<section id="tooltip-subtasks">
<?php foreach ($subtasks as $subtask): ?>
- <?= Helper\a(
- trim(Helper\template('subtask/icons', array('subtask' => $subtask))) . Helper\escape($subtask['title']),
+ <?= $this->a(
+ trim($this->render('subtask/icons', array('subtask' => $subtask))) . $this->e($subtask['title']),
'board',
'toggleSubtask',
array('task_id' => $subtask['task_id'], 'subtask_id' => $subtask['id'])
) ?>
- <?= Helper\escape(empty($subtask['username']) ? '' : ' ['.Helper\get_username($subtask).']') ?>
+ <?= $this->e(empty($subtask['username']) ? '' : ' ['.$this->getFullname($subtask).']') ?>
<br/>
<?php endforeach ?>
diff --git a/app/Template/board/swimlane.php b/app/Template/board/swimlane.php
index e48eb6f1..5766141e 100644
--- a/app/Template/board/swimlane.php
+++ b/app/Template/board/swimlane.php
@@ -7,15 +7,15 @@
<th>
<?php if (! $not_editable): ?>
<div class="board-add-icon">
- <?= Helper\a('+', 'task', 'create', array('project_id' => $column['project_id'], 'column_id' => $column['id'], 'swimlane_id' => $swimlane['id']), false, 'task-creation-popover', t('Add a new task')) ?>
+ <?= $this->a('+', 'task', 'create', array('project_id' => $column['project_id'], 'column_id' => $column['id'], 'swimlane_id' => $swimlane['id']), false, 'task-creation-popover', t('Add a new task')) ?>
</div>
<?php endif ?>
- <?= Helper\escape($column['title']) ?>
+ <?= $this->e($column['title']) ?>
<?php if ($column['task_limit']): ?>
<span title="<?= t('Task limit') ?>" class="task-limit">
- (<span id="task-number-column-<?= $column['id'] ?>"><?= $column['nb_tasks'] ?></span>/<?= Helper\escape($column['task_limit']) ?>)
+ (<span id="task-number-column-<?= $column['id'] ?>"><?= $column['nb_tasks'] ?></span>/<?= $this->e($column['task_limit']) ?>)
</span>
<?php else: ?>
<span title="<?= t('Task count') ?>" class="task-count">
@@ -28,7 +28,7 @@
<tr>
<?php if (! $hide_swimlane): ?>
<th class="board-swimlane-title">
- <?= Helper\escape($swimlane['name']) ?>
+ <?= $this->e($swimlane['name']) ?>
</th>
<?php endif ?>
@@ -46,7 +46,7 @@
<?php endif ?>
<?php foreach ($column['tasks'] as $task): ?>
- <?= Helper\template('board/task', array(
+ <?= $this->render('board/task', array(
'project' => $project,
'task' => $task,
'categories' => $categories,
diff --git a/app/Template/board/task.php b/app/Template/board/task.php
index d077c773..f9f03dc3 100644
--- a/app/Template/board/task.php
+++ b/app/Template/board/task.php
@@ -4,7 +4,7 @@
<div class="task-board task-<?= $task['color_id'] ?> <?= $task['date_modification'] > time() - $board_highlight_period ? 'task-board-recent' : '' ?>">
- <?= Helper\a('#'.$task['id'], 'task', 'readonly', array('task_id' => $task['id'], 'token' => $project['token'])) ?>
+ <?= $this->a('#'.$task['id'], 'task', 'readonly', array('task_id' => $task['id'], 'token' => $project['token'])) ?>
<?php if ($task['reference']): ?>
<span class="task-board-reference" title="<?= t('Reference') ?>">
@@ -23,11 +23,11 @@
</span>
<?php if ($task['score']): ?>
- <span class="task-score"><?= Helper\escape($task['score']) ?></span>
+ <span class="task-score"><?= $this->e($task['score']) ?></span>
<?php endif ?>
<div class="task-board-title">
- <?= Helper\a(Helper\escape($task['title']), 'task', 'readonly', array('task_id' => $task['id'], 'token' => $project['token'])) ?>
+ <?= $this->a($this->e($task['title']), 'task', 'readonly', array('task_id' => $task['id'], 'token' => $project['token'])) ?>
</div>
<?php else: ?>
@@ -37,10 +37,10 @@
data-owner-id="<?= $task['owner_id'] ?>"
data-category-id="<?= $task['category_id'] ?>"
data-due-date="<?= $task['date_due'] ?>"
- data-task-url="<?= Helper\u('task', 'show', array('task_id' => $task['id'])) ?>"
+ data-task-url="<?= $this->u('task', 'show', array('task_id' => $task['id'])) ?>"
title="<?= t('View this task') ?>">
- <?= Helper\a('#'.$task['id'], 'task', 'edit', array('task_id' => $task['id']), false, 'task-edit-popover', t('Edit this task')) ?>
+ <?= $this->a('#'.$task['id'], 'task', 'edit', array('task_id' => $task['id']), false, 'task-edit-popover', t('Edit this task')) ?>
<?php if ($task['reference']): ?>
<span class="task-board-reference" title="<?= t('Reference') ?>">
@@ -51,9 +51,9 @@
&nbsp;-&nbsp;
<span class="task-board-user">
- <?= Helper\a(
+ <?= $this->a(
(! empty($task['owner_id']) ? t('Assigned to %s', $task['assignee_name'] ?: $task['assignee_username']) : t('Nobody assigned')) .
- ( Helper\is_current_user($task['owner_id']) ? '&nbsp;<i class="fa fa-star"></i>' : ''),
+ ( $this->acl->isCurrentUser($task['owner_id']) ? '&nbsp;<i class="fa fa-star"></i>' : ''),
'board',
'changeAssignee',
array('task_id' => $task['id']),
@@ -64,11 +64,11 @@
</span>
<?php if ($task['score']): ?>
- <span class="task-score"><?= Helper\escape($task['score']) ?></span>
+ <span class="task-score"><?= $this->e($task['score']) ?></span>
<?php endif ?>
<div class="task-board-title">
- <?= Helper\a(Helper\escape($task['title']), 'task', 'show', array('task_id' => $task['id']), false, '', t('View this task')) ?>
+ <?= $this->a($this->e($task['title']), 'task', 'show', array('task_id' => $task['id']), false, '', t('View this task')) ?>
</div>
<?php endif ?>
@@ -77,8 +77,8 @@
<?php if ($task['category_id']): ?>
<div class="task-board-category-container">
<span class="task-board-category">
- <?= Helper\a(
- Helper\in_list($task['category_id'], $categories),
+ <?= $this->a(
+ $this->inList($task['category_id'], $categories),
'board',
'changeCategory',
array('task_id' => $task['id']),
@@ -103,19 +103,19 @@
<div class="task-board-icons">
<?php if (! empty($task['nb_subtasks'])): ?>
- <span title="<?= t('Sub-Tasks') ?>" class="task-board-tooltip" data-href="<?= helper\u('board', 'subtasks', array('task_id' => $task['id'])) ?>"><?= $task['nb_completed_subtasks'].'/'.$task['nb_subtasks'] ?> <i class="fa fa-bars"></i></span>
+ <span title="<?= t('Sub-Tasks') ?>" class="task-board-tooltip" data-href="<?= $this->u('board', 'subtasks', array('task_id' => $task['id'])) ?>"><?= $task['nb_completed_subtasks'].'/'.$task['nb_subtasks'] ?> <i class="fa fa-bars"></i></span>
<?php endif ?>
<?php if (! empty($task['nb_files'])): ?>
- <span title="<?= t('Attachments') ?>" class="task-board-tooltip" data-href="<?= helper\u('board', 'attachments', array('task_id' => $task['id'])) ?>"><?= $task['nb_files'] ?> <i class="fa fa-paperclip"></i></span>
+ <span title="<?= t('Attachments') ?>" class="task-board-tooltip" data-href="<?= $this->u('board', 'attachments', array('task_id' => $task['id'])) ?>"><?= $task['nb_files'] ?> <i class="fa fa-paperclip"></i></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="<?= helper\u('board', 'comments', array('task_id' => $task['id'])) ?>"><?= $task['nb_comments'] ?> <i class="fa fa-comment-o"></i></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->u('board', 'comments', array('task_id' => $task['id'])) ?>"><?= $task['nb_comments'] ?> <i class="fa fa-comment-o"></i></span>
<?php endif ?>
<?php if (! empty($task['description'])): ?>
- <span title="<?= t('Description') ?>" class="task-board-tooltip" data-href="<?= helper\u('board', 'description', array('task_id' => $task['id'])) ?>">
+ <span title="<?= t('Description') ?>" class="task-board-tooltip" data-href="<?= $this->u('board', 'description', array('task_id' => $task['id'])) ?>">
<?php if (! isset($not_editable)): ?>
<a class="task-description-popover" href="?controller=task&amp;action=description&amp;task_id=<?= $task['id'] ?>"><i class="fa fa-file-text-o" data-href="?controller=task&amp;action=description&amp;task_id=<?= $task['id'] ?>"></i></a>
<?php else: ?>