summaryrefslogtreecommitdiff
path: root/app/Template/link/index.php
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2015-02-14 16:11:13 -0500
committerFrederic Guillot <fred@kanboard.net>2015-02-14 16:11:13 -0500
commitf7e4c3928aba9cb7f5222cb4af67846312bbb435 (patch)
tree78f5854a0bdc538c977bad718a11d605a4caaca6 /app/Template/link/index.php
parent364382b1b58db8bf1bd2c8866e21c869a7a5d6d0 (diff)
Refactoring/simplification of the pull-request about links
Diffstat (limited to 'app/Template/link/index.php')
-rw-r--r--app/Template/link/index.php21
1 files changed, 12 insertions, 9 deletions
diff --git a/app/Template/link/index.php b/app/Template/link/index.php
index 0c19b614..90d1c357 100644
--- a/app/Template/link/index.php
+++ b/app/Template/link/index.php
@@ -1,30 +1,33 @@
<div class="page-header">
<h2><?= t('Link labels') ?></h2>
</div>
-
-<section>
<?php if (! empty($links)): ?>
<table>
<tr>
- <th width="70%"><?= t('Link labels') ?></th>
+ <th class="column-70"><?= t('Link labels') ?></th>
<th><?= t('Actions') ?></th>
</tr>
<?php foreach ($links as $link): ?>
<tr>
- <td><?= t($this->e($link['label'])) ?><?php if (isset($link['label_inverse']) && !empty($link['label_inverse'])): ?> | <?= t($this->e($link['label_inverse'])) ?><?php endif ?></td>
+ <td>
+ <strong><?= t($link['label']) ?></strong>
+
+ <?php if (! empty($link['opposite_label'])): ?>
+ | <?= t($link['opposite_label']) ?>
+ <?php endif ?>
+ </td>
<td>
<ul>
- <?= $this->a(t('Edit'), 'link', 'edit', array('link_id' => $link['link_id'], 'project_id' => $link['project_id'])) ?>
+ <?= $this->a(t('Edit'), 'link', 'edit', array('link_id' => $link['id'])) ?>
<?= t('or') ?>
- <?= $this->a(t('Remove'), 'link', 'confirm', array('link_id' => $link['link_id'], 'project_id' => $link['project_id'])) ?>
+ <?= $this->a(t('Remove'), 'link', 'confirm', array('link_id' => $link['id'])) ?>
</ul>
</td>
</tr>
<?php endforeach ?>
</table>
<?php else: ?>
- <?= t('There is no link yet.') ?>
+ <?= t('There is no link.') ?>
<?php endif ?>
-</section>
-<?= $this->render('link/edit', array('values' => $values, 'errors' => $errors, 'project' => $project)) ?>
+<?= $this->render('link/create', array('values' => $values, 'errors' => $errors)) ?> \ No newline at end of file