Refactoring/simplification of the pull-request about links
This commit is contained in:
@@ -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>
|
||||
Reference in New Issue
Block a user