Template helpers refactoring

This commit is contained in:
Frédéric Guillot
2014-12-28 11:28:50 -05:00
parent 88d84073ae
commit 34d7450d3c
155 changed files with 1605 additions and 1609 deletions

View File

@@ -1,7 +1,7 @@
<p class="activity-title">
<?= e('%s commented the task <a href="?controller=task&amp;action=show&amp;task_id=%d">#%d</a>', Helper\escape($author), $task_id, $task_id) ?>
<?= e('%s commented the task <a href="?controller=task&amp;action=show&amp;task_id=%d">#%d</a>', $this->e($author), $task_id, $task_id) ?>
</p>
<div class="activity-description">
<em><?= Helper\escape($task['title']) ?></em><br/>
<div class="markdown"><?= Helper\markdown($comment['comment']) ?></div>
<em><?= $this->e($task['title']) ?></em><br/>
<div class="markdown"><?= $this->markdown($comment['comment']) ?></div>
</div>

View File

@@ -1,6 +1,6 @@
<p class="activity-title">
<?= e('%s updated a comment on the task <a href="?controller=task&amp;action=show&amp;task_id=%d">#%d</a>', Helper\escape($author), $task_id, $task_id) ?>
<?= e('%s updated a comment on the task <a href="?controller=task&amp;action=show&amp;task_id=%d">#%d</a>', $this->e($author), $task_id, $task_id) ?>
</p>
<div class="activity-description">
<em><?= Helper\escape($task['title']) ?></em><br/>
<em><?= $this->e($task['title']) ?></em><br/>
</div>

View File

@@ -1,12 +1,12 @@
<p class="activity-title">
<?= e('%s created a subtask for the task <a href="?controller=task&amp;action=show&amp;task_id=%d">#%d</a>', Helper\escape($author), $task_id, $task_id) ?>
<?= e('%s created a subtask for the task <a href="?controller=task&amp;action=show&amp;task_id=%d">#%d</a>', $this->e($author), $task_id, $task_id) ?>
</p>
<div class="activity-description">
<p><em><?= Helper\escape($task['title']) ?></em></p>
<p><em><?= $this->e($task['title']) ?></em></p>
<ul>
<li>
<?= Helper\escape($subtask['title']) ?> (<strong><?= Helper\escape($subtask['status_name']) ?></strong>)
<?= $this->e($subtask['title']) ?> (<strong><?= $this->e($subtask['status_name']) ?></strong>)
</li>
<li>
<?php if ($subtask['username']): ?>

View File

@@ -1,12 +1,12 @@
<p class="activity-title">
<?= e('%s updated a subtask for the task <a href="?controller=task&amp;action=show&amp;task_id=%d">#%d</a>', Helper\escape($author), $task_id, $task_id) ?>
<?= e('%s updated a subtask for the task <a href="?controller=task&amp;action=show&amp;task_id=%d">#%d</a>', $this->e($author), $task_id, $task_id) ?>
</p>
<div class="activity-description">
<p><em><?= Helper\escape($task['title']) ?></em></p>
<p><em><?= $this->e($task['title']) ?></em></p>
<ul>
<li>
<?= Helper\escape($subtask['title']) ?> (<strong><?= Helper\escape($subtask['status_name']) ?></strong>)
<?= $this->e($subtask['title']) ?> (<strong><?= $this->e($subtask['status_name']) ?></strong>)
</li>
<li>
<?php if ($subtask['username']): ?>

View File

@@ -1,12 +1,12 @@
<p class="activity-title">
<?= e(
'%s change the assignee of the task <a href="?controller=task&amp;action=show&amp;task_id=%d">#%d</a> to %s',
Helper\escape($author),
$this->e($author),
$task_id,
$task_id,
Helper\escape($task['assignee_name'] ?: $task['assignee_username'])
$this->e($task['assignee_name'] ?: $task['assignee_username'])
) ?>
</p>
<p class="activity-description">
<em><?= Helper\escape($task['title']) ?></em>
<em><?= $this->e($task['title']) ?></em>
</p>

View File

@@ -1,6 +1,6 @@
<p class="activity-title">
<?= e('%s closed the task <a href="?controller=task&amp;action=show&amp;task_id=%d">#%d</a>', Helper\escape($author), $task_id, $task_id) ?>
<?= e('%s closed the task <a href="?controller=task&amp;action=show&amp;task_id=%d">#%d</a>', $this->e($author), $task_id, $task_id) ?>
</p>
<p class="activity-description">
<em><?= Helper\escape($task['title']) ?></em>
<em><?= $this->e($task['title']) ?></em>
</p>

View File

@@ -1,6 +1,6 @@
<p class="activity-title">
<?= e('%s created the task <a href="?controller=task&amp;action=show&amp;task_id=%d">#%d</a>', Helper\escape($author), $task_id, $task_id) ?>
<?= e('%s created the task <a href="?controller=task&amp;action=show&amp;task_id=%d">#%d</a>', $this->e($author), $task_id, $task_id) ?>
</p>
<p class="activity-description">
<em><?= Helper\escape($task['title']) ?></em>
<em><?= $this->e($task['title']) ?></em>
</p>

View File

@@ -1,6 +1,6 @@
<p class="activity-title">
<?= e('%s moved the task <a href="?controller=task&amp;action=show&amp;task_id=%d">#%d</a> to the column "%s"', Helper\escape($author), $task_id, $task_id, Helper\escape($task['column_title'])) ?>
<?= e('%s moved the task <a href="?controller=task&amp;action=show&amp;task_id=%d">#%d</a> to the column "%s"', $this->e($author), $task_id, $task_id, $this->e($task['column_title'])) ?>
</p>
<p class="activity-description">
<em><?= Helper\escape($task['title']) ?></em>
<em><?= $this->e($task['title']) ?></em>
</p>

View File

@@ -1,6 +1,6 @@
<p class="activity-title">
<?= e('%s moved the task <a href="?controller=task&amp;action=show&amp;task_id=%d">#%d</a> to the position #%d in the column "%s"', Helper\escape($author), $task_id, $task_id, $task['position'], Helper\escape($task['column_title'])) ?>
<?= e('%s moved the task <a href="?controller=task&amp;action=show&amp;task_id=%d">#%d</a> to the position #%d in the column "%s"', $this->e($author), $task_id, $task_id, $task['position'], $this->e($task['column_title'])) ?>
</p>
<p class="activity-description">
<em><?= Helper\escape($task['title']) ?></em>
<em><?= $this->e($task['title']) ?></em>
</p>

View File

@@ -1,6 +1,6 @@
<p class="activity-title">
<?= e('%s open the task <a href="?controller=task&amp;action=show&amp;task_id=%d">#%d</a>', Helper\escape($author), $task_id, $task_id) ?>
<?= e('%s open the task <a href="?controller=task&amp;action=show&amp;task_id=%d">#%d</a>', $this->e($author), $task_id, $task_id) ?>
</p>
<p class="activity-description">
<em><?= Helper\escape($task['title']) ?></em>
<em><?= $this->e($task['title']) ?></em>
</p>

View File

@@ -1,6 +1,6 @@
<p class="activity-title">
<?= e('%s updated the task <a href="?controller=task&amp;action=show&amp;task_id=%d">#%d</a>', Helper\escape($author), $task_id, $task_id) ?>
<?= e('%s updated the task <a href="?controller=task&amp;action=show&amp;task_id=%d">#%d</a>', $this->e($author), $task_id, $task_id) ?>
</p>
<p class="activity-description">
<em><?= Helper\escape($task['title']) ?></em>
<em><?= $this->e($task['title']) ?></em>
</p>