Helper refactoring

This commit is contained in:
Frederic Guillot
2016-03-04 20:10:34 -05:00
parent f32507d423
commit 8f3e2b2e5c
141 changed files with 562 additions and 445 deletions

View File

@@ -18,7 +18,7 @@
</tr>
<?php foreach ($time_spent_columns as $column): ?>
<tr>
<td><?= $this->e($column['title']) ?></td>
<td><?= $this->text->e($column['title']) ?></td>
<td><?= $this->dt->duration($column['time_spent']) ?></td>
</tr>
<?php endforeach ?>

View File

@@ -3,7 +3,7 @@
<div
data-color-id="<?= $color_id ?>"
class="color-square color-<?= $color_id ?> <?= isset($values['color_id']) && $values['color_id'] === $color_id ? 'color-square-selected' : '' ?>"
title="<?= $this->e($color_name) ?>">
title="<?= $this->text->e($color_name) ?>">
</div>
<?php endforeach ?>
</div>

View File

@@ -1,5 +1,5 @@
<section id="task-summary">
<h2><?= $this->e($task['title']) ?></h2>
<h2><?= $this->text->e($task['title']) ?></h2>
<div class="task-summary-container color-<?= $task['color_id'] ?>">
<div class="task-summary-column">
<ul class="no-bullet">
@@ -18,12 +18,12 @@
</li>
<?php if (! empty($task['reference'])): ?>
<li>
<strong><?= t('Reference:') ?></strong> <span><?= $this->e($task['reference']) ?></span>
<strong><?= t('Reference:') ?></strong> <span><?= $this->text->e($task['reference']) ?></span>
</li>
<?php endif ?>
<?php if (! empty($task['score'])): ?>
<li>
<strong><?= t('Complexity:') ?></strong> <span><?= $this->e($task['score']) ?></span>
<strong><?= t('Complexity:') ?></strong> <span><?= $this->text->e($task['score']) ?></span>
</li>
<?php endif ?>
<?php if ($project['is_public']): ?>
@@ -39,18 +39,18 @@
<?php if (! empty($task['category_name'])): ?>
<li>
<strong><?= t('Category:') ?></strong>
<span><?= $this->e($task['category_name']) ?></span>
<span><?= $this->text->e($task['category_name']) ?></span>
</li>
<?php endif ?>
<?php if (! empty($task['swimlane_name'])): ?>
<li>
<strong><?= t('Swimlane:') ?></strong>
<span><?= $this->e($task['swimlane_name']) ?></span>
<span><?= $this->text->e($task['swimlane_name']) ?></span>
</li>
<?php endif ?>
<li>
<strong><?= t('Column:') ?></strong>
<span><?= $this->e($task['column_title']) ?></span>
<span><?= $this->text->e($task['column_title']) ?></span>
</li>
<li>
<strong><?= t('Position:') ?></strong>
@@ -64,7 +64,7 @@
<strong><?= t('Assignee:') ?></strong>
<span>
<?php if ($task['assignee_username']): ?>
<?= $this->e($task['assignee_name'] ?: $task['assignee_username']) ?>
<?= $this->text->e($task['assignee_name'] ?: $task['assignee_username']) ?>
<?php else: ?>
<?= t('not assigned') ?>
<?php endif ?>
@@ -73,7 +73,7 @@
<?php if ($task['creator_username']): ?>
<li>
<strong><?= t('Creator:') ?></strong>
<span><?= $this->e($task['creator_name'] ?: $task['creator_username']) ?></span>
<span><?= $this->text->e($task['creator_name'] ?: $task['creator_username']) ?></span>
</li>
<?php endif ?>
<?php if ($task['date_due']): ?>

View File

@@ -4,7 +4,7 @@
<div class="confirm">
<p class="alert alert-info">
<?= t('Do you really want to remove this task: "%s"?', $this->e($task['title'])) ?>
<?= t('Do you really want to remove this task: "%s"?', $this->text->e($task['title'])) ?>
</p>
<div class="form-actions">

View File

@@ -14,7 +14,7 @@
</tr>
<?php foreach ($subtask_paginator->getCollection() as $record): ?>
<tr>
<td><?= $this->url->link($this->e($record['user_fullname'] ?: $record['username']), 'user', 'show', array('user_id' => $record['user_id'])) ?></td>
<td><?= $this->url->link($this->text->e($record['user_fullname'] ?: $record['username']), 'user', 'show', array('user_id' => $record['user_id'])) ?></td>
<td><?= t($record['subtask_title']) ?></td>
<td><?= $this->dt->datetime($record['start']) ?></td>
<td><?= $this->dt->datetime($record['end']) ?></td>

View File

@@ -5,9 +5,9 @@
</div>
<ul class="listing">
<li><?= t('Estimate:') ?> <strong><?= $this->e($task['time_estimated']) ?></strong> <?= t('hours') ?></li>
<li><?= t('Spent:') ?> <strong><?= $this->e($task['time_spent']) ?></strong> <?= t('hours') ?></li>
<li><?= t('Remaining:') ?> <strong><?= $this->e($task['time_estimated'] - $task['time_spent']) ?></strong> <?= t('hours') ?></li>
<li><?= t('Estimate:') ?> <strong><?= $this->text->e($task['time_estimated']) ?></strong> <?= t('hours') ?></li>
<li><?= t('Spent:') ?> <strong><?= $this->text->e($task['time_spent']) ?></strong> <?= t('hours') ?></li>
<li><?= t('Remaining:') ?> <strong><?= $this->text->e($task['time_estimated'] - $task['time_spent']) ?></strong> <?= t('hours') ?></li>
</ul>
<?php endif ?>

View File

@@ -16,9 +16,9 @@
<?php foreach ($transitions as $transition): ?>
<tr>
<td><?= $this->dt->datetime($transition['date']) ?></td>
<td><?= $this->e($transition['src_column']) ?></td>
<td><?= $this->e($transition['dst_column']) ?></td>
<td><?= $this->url->link($this->e($transition['name'] ?: $transition['username']), 'user', 'show', array('user_id' => $transition['user_id'])) ?></td>
<td><?= $this->text->e($transition['src_column']) ?></td>
<td><?= $this->text->e($transition['dst_column']) ?></td>
<td><?= $this->url->link($this->text->e($transition['name'] ?: $transition['username']), 'user', 'show', array('user_id' => $transition['user_id'])) ?></td>
<td><?= $this->dt->duration($transition['time_spent']) ?></td>
</tr>
<?php endforeach ?>