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

@@ -19,7 +19,7 @@
<div class="sidebar-content">
<div class="page-header">
<h2><?= $this->e($title) ?></h2>
<h2><?= $this->text->e($title) ?></h2>
</div>
<?= $content_for_sublayout ?>
</div>

View File

@@ -10,19 +10,19 @@
<?php foreach ($paginator->getCollection() as $project): ?>
<tr>
<td>
<?= $this->e($this->user->getFullname($project)) ?>
<?= $this->text->e($this->user->getFullname($project)) ?>
</td>
<td>
<?= $this->url->link('<i class="fa fa-th"></i>', 'board', 'show', array('project_id' => $project['id']), false, 'dashboard-table-link', t('Board')) ?>
<?= $this->url->link('<i class="fa fa-sliders fa-fw"></i>', 'gantt', 'project', array('project_id' => $project['id']), false, 'dashboard-table-link', t('Gantt chart')) ?>
<?= $this->url->link('<i class="fa fa-cog fa-fw"></i>', 'project', 'show', array('project_id' => $project['id']), false, 'dashboard-table-link', t('Project settings')) ?>
<?= $this->e($project['project_name']) ?>
<?= $this->text->e($project['project_name']) ?>
</td>
<td class="dashboard-project-stats">
<?php foreach ($project['columns'] as $column): ?>
<strong title="<?= t('Task count') ?>"><?= $column['nb_tasks'] ?></strong>
<span><?= $this->e($column['title']) ?></span>
<span><?= $this->text->e($column['title']) ?></span>
<?php endforeach ?>
</td>
</tr>

View File

@@ -14,20 +14,20 @@
<?php foreach ($paginator->getCollection() as $task): ?>
<tr>
<td class="task-table color-<?= $task['color_id'] ?>">
<?= $this->url->link('#'.$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->text->e($task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, '', t('View this task')) ?>
</td>
<td>
<?= $this->url->link($this->e($task['project_name']), 'board', 'show', array('project_id' => $task['project_id'])) ?>
<?= $this->url->link($this->text->e($task['project_name']), 'board', 'show', array('project_id' => $task['project_id'])) ?>
</td>
<td>
<?= $this->e($task['column_name']) ?>
<?= $this->text->e($task['column_name']) ?>
</td>
<td>
<?= $this->url->link($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->text->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']): ?>
<?= $this->e($task['assignee_name'] ?: $task['assignee_username']) ?>
<?= $this->text->e($task['assignee_name'] ?: $task['assignee_username']) ?>
<?php else: ?>
<?= t('Unassigned') ?>
<?php endif ?>

View File

@@ -6,7 +6,7 @@
<strong><?= $role_name ?></strong>
<ul>
<?php foreach ($users[$role] as $user_id => $user): ?>
<li><?= $this->url->link($this->e($user), 'Projectuser', 'opens', array('user_id' => $user_id)) ?></li>
<li><?= $this->url->link($this->text->e($user), 'Projectuser', 'opens', array('user_id' => $user_id)) ?></li>
<?php endforeach ?>
</ul>
<?php endif ?>