summaryrefslogtreecommitdiff
path: root/app/Template/board
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/board
parent364382b1b58db8bf1bd2c8866e21c869a7a5d6d0 (diff)
Refactoring/simplification of the pull-request about links
Diffstat (limited to 'app/Template/board')
-rw-r--r--app/Template/board/tasklinks.php41
1 files changed, 14 insertions, 27 deletions
diff --git a/app/Template/board/tasklinks.php b/app/Template/board/tasklinks.php
index d7b64e1d..9c4f52ca 100644
--- a/app/Template/board/tasklinks.php
+++ b/app/Template/board/tasklinks.php
@@ -1,28 +1,15 @@
-<section class="tooltip-tasklinks">
-<div>
-<ul>
-<?php
-$previous_link = null;
-foreach ($links as $link): ?>
- <?php if (null == $previous_link || $previous_link != $link['label']): ?>
- <?php if (null != $previous_link): ?>
- </ul>
+<div class="tooltip-tasklinks">
+ <ul>
+ <?php foreach($links as $link): ?>
+ <li>
+ <strong><?= t($link['label']) ?></strong>
+ <?= $this->a(
+ $this->e('#'.$link['task_id'].' - '.$link['title']),
+ 'task', 'show', array('task_id' => $link['task_id'], 'project_id' => $link['project_id']),
+ false,
+ $link['is_active'] ? '' : 'task-link-closed'
+ ) ?>
</li>
- <?php endif ?>
- <?php $previous_link = $link['label']; ?>
- <li><?= t($this->e($link['label'])) ?>
- <ul>
- <?php endif ?>
- <li<?php if (0 == $link['task_inverse_is_active']): ?> class="task-closed"<?php endif ?>>
- <?= $this->e($link['task_inverse_category']) ?>
- <?= $this->a('#'.$this->e($link['task_inverse_id']).' - '.trim($this->e($link['task_inverse_title'])),
- 'task',
- 'show',
- array('task_id' => $link['task_inverse_id'], 'project_id' => $link['task_inverse_project_id'])) ?>
- </li>
-<?php endforeach ?>
- </ul>
- </li>
-</ul>
-</div>
-</section>
+ <?php endforeach ?>
+ </ul>
+</div> \ No newline at end of file