fix tag-lists

This commit is contained in:
Dennis Eichhorn 2024-04-07 18:11:03 +00:00
parent c9b37aba18
commit 5a57a57a0e
2 changed files with 4 additions and 0 deletions

View File

@ -37,12 +37,14 @@ echo $this->data['nav']->render(); ?>
<article>
<?= Markdown::parse(\substr($doc->docRaw, 0, 500)); ?>
</article>
<div class="tag-list">
<?php foreach ($doc->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>
</div>
<div class="portlet-foot">
<a href="<?= $url; ?>" class="button rf"><?= $this->getHtml('More', '0', '0'); ?></a>

View File

@ -38,12 +38,14 @@ echo $this->data['nav']->render();
<div class="portlet-body">
<article><?= $doc->doc; ?></article>
<div class="tag-list">
<?php foreach ($doc->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>
<?php $files = $doc->files; foreach ($files as $file) : ?>
<span><a class="content" href="<?= UriFactory::build('{/base}/media/view?id=' . $file->id);?>"><?= $file->name; ?></a></span>