mirror of
https://github.com/Karaka-Management/oms-News.git
synced 2026-01-11 16:18:41 +00:00
Add tag icons
This commit is contained in:
parent
e10e33a924
commit
b18ab42ce7
|
|
@ -182,6 +182,7 @@ final class ApiController extends Controller
|
|||
if (!isset($tag['id'])) {
|
||||
$request->setData('title', $tag['title'], true);
|
||||
$request->setData('color', $tag['color'], true);
|
||||
$request->setData('icon', $tag['icon'] ?? null, true);
|
||||
$request->setData('language', $tag['language'], true);
|
||||
|
||||
$internalResponse = new HttpResponse();
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ echo $this->getData('nav')->render(); ?>
|
|||
<div class="portlet-foot">
|
||||
<div class="overflowfix">
|
||||
<?php $tags = $news->getTags(); foreach ($tags as $tag) : ?>
|
||||
<span class="tag" style="background: <?= $this->printHtml($tag->getColor()); ?>"><?= $this->printHtml($tag->getTitle()); ?></span>
|
||||
<span class="tag" style="background: <?= $this->printHtml($tag->color); ?>"><?= $tag->icon !== null ? '<i class="' . $this->printHtml($tag->icon ?? '') . '"></i>' : ''; ?><?= $this->printHtml($tag->getTitle()); ?></span>
|
||||
<?php endforeach; ?>
|
||||
<a tabindex="0" href="<?= $url; ?>" class="button floatRight">More</a>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ echo $this->getData('nav')->render(); ?>
|
|||
<div class="row">
|
||||
<div class="col-xs-6 overflowfix">
|
||||
<?php foreach ($tags as $tag) : ?>
|
||||
<span class="tag" style="background: <?= $this->printHtml($tag->getColor()); ?>"><?= $this->printHtml($tag->getTitle()); ?></span>
|
||||
<span class="tag" style="background: <?= $this->printHtml($tag->color); ?>"><?= $tag->icon !== null ? '<i class="' . $this->printHtml($tag->icon ?? '') . '"></i>' : ''; ?><?= $this->printHtml($tag->getTitle()); ?></span>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<?php if ($editable) : ?>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user