fix tag-lists

This commit is contained in:
Dennis Eichhorn 2024-04-07 18:11:03 +00:00
parent 4ac7fcef52
commit 184ca689da
2 changed files with 6 additions and 1 deletions

View File

@ -105,6 +105,7 @@ echo $this->data['nav']->render(); ?>
<td>
<td data-label="<?= $this->getHtml('Name'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($template->name); ?></a>
<td data-label="<?= $this->getHtml('Tag'); ?>">
<div class="tag-list">
<?php
foreach ($template->tags as $tag) : ?>
<span class="tag" style="background: <?= $this->printHtml($tag->color); ?>">
@ -112,6 +113,7 @@ echo $this->data['nav']->render(); ?>
<?= $this->printHtml($tag->getL11n()); ?>
</span>
<?php endforeach; ?>
</div>
<td data-label="<?= $this->getHtml('Creator'); ?>"><a class="content" href="<?= UriFactory::build('{/base}/profile/view?{?}&for=' . $template->createdBy->id); ?>"><?= $this->printHtml($this->renderUserName('%3$s %2$s %1$s', [$template->createdBy->name1, $template->createdBy->name2, $template->createdBy->name3, $template->createdBy->login ?? ''])); ?></a>
<td data-label="<?= $this->getHtml('Updated'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($template->createdAt->format('Y-m-d')); ?></a>
<?php endforeach; ?>

View File

@ -160,13 +160,16 @@ echo $this->data['nav']->render(); ?>
<td><?= $template->createdAt->format('Y-m-d'); ?>
<tr>
<td><?= $this->getHtml('Tags'); ?>
<td><?php
<td>
<div class="tag-list">
<?php
foreach ($template->tags as $tag) : ?>
<span class="tag" style="background: <?= $this->printHtml($tag->color); ?>">
<?= empty($tag->icon) ? '' : '<i class="g-icon">' . $this->printHtml($tag->icon) . '</i>'; ?>
<?= $this->printHtml($tag->getL11n()); ?>
</span>
<?php endforeach; ?>
</div>
</table>
</div>
</div>