mirror of
https://github.com/Karaka-Management/oms-Knowledgebase.git
synced 2026-02-14 09:18:40 +00:00
Add tag icons
This commit is contained in:
parent
4dc8ef8e53
commit
a5ba6aeeca
|
|
@ -99,6 +99,7 @@ final class ApiController extends Controller
|
||||||
if (!isset($tag['id'])) {
|
if (!isset($tag['id'])) {
|
||||||
$request->setData('title', $tag['title'], true);
|
$request->setData('title', $tag['title'], true);
|
||||||
$request->setData('color', $tag['color'], true);
|
$request->setData('color', $tag['color'], true);
|
||||||
|
$request->setData('icon', $tag['icon'] ?? null, true);
|
||||||
$request->setData('language', $tag['language'], true);
|
$request->setData('language', $tag['language'], true);
|
||||||
|
|
||||||
$internalResponse = new HttpResponse();
|
$internalResponse = new HttpResponse();
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ echo $this->getData('nav')->render(); ?>
|
||||||
<div class="portlet-foot">
|
<div class="portlet-foot">
|
||||||
<div class="overflowfix">
|
<div class="overflowfix">
|
||||||
<?php $tags = $doc->getTags(); foreach ($tags as $tag) : ?>
|
<?php $tags = $doc->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; ?>
|
<?php endforeach; ?>
|
||||||
<a href="<?= $url; ?>" class="button floatRight">More</a>
|
<a href="<?= $url; ?>" class="button floatRight">More</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@ echo $this->getData('nav')->render();
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-6 overflowfix">
|
<div class="col-xs-6 overflowfix">
|
||||||
<?php foreach ($tags as $tag) : ?>
|
<?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; ?>
|
<?php endforeach; ?>
|
||||||
</div>
|
</div>
|
||||||
<?php if ($editable) : ?>
|
<?php if ($editable) : ?>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user