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

@@ -4,30 +4,30 @@
<?php else: ?>
<table class="table-fixed">
<tr>
<th class="column-8"><?= Helper\order('Id', 'id', $pagination) ?></th>
<th class="column-20"><?= Helper\order(t('Project'), 'name', $pagination) ?></th>
<th class="column-8"><?= $this->order('Id', 'id', $pagination) ?></th>
<th class="column-20"><?= $this->order(t('Project'), 'name', $pagination) ?></th>
<th><?= t('Columns') ?></th>
</tr>
<?php foreach ($projects as $project): ?>
<tr>
<td>
<?= Helper\a('#'.$project['id'], 'board', 'show', array('project_id' => $project['id']), false, 'dashboard-table-link') ?>
<?= $this->a('#'.$project['id'], 'board', 'show', array('project_id' => $project['id']), false, 'dashboard-table-link') ?>
</td>
<td>
<?php if (Helper\is_project_admin($project)): ?>
<?= Helper\a('<i class="fa fa-cog"></i>', 'project', 'show', array('project_id' => $project['id']), false, 'dashboard-table-link', t('Settings')) ?>&nbsp;
<?php if ($this->projectPermission->adminAllowed($project['id'], $this->acl->getUserId())): ?>
<?= $this->a('<i class="fa fa-cog"></i>', 'project', 'show', array('project_id' => $project['id']), false, 'dashboard-table-link', t('Settings')) ?>&nbsp;
<?php endif ?>
<?= Helper\a(Helper\escape($project['name']), 'board', 'show', array('project_id' => $project['id'])) ?>
<?= $this->a($this->e($project['name']), 'board', 'show', array('project_id' => $project['id'])) ?>
</td>
<td class="dashboard-project-stats">
<?php foreach ($project['columns'] as $column): ?>
<strong title="<?= t('Task count') ?>"><?= $column['nb_tasks'] ?></strong>
<span><?= Helper\escape($column['title']) ?></span>
<span><?= $this->e($column['title']) ?></span>
<?php endforeach ?>
</td>
</tr>
<?php endforeach ?>
</table>
<?= Helper\paginate($pagination) ?>
<?= $this->paginate($pagination) ?>
<?php endif ?>