oms-Knowledgebase/Theme/Backend/wiki-category-list.tpl.php
2019-10-06 17:50:12 +02:00

48 lines
1.7 KiB
PHP

<?php
/**
* Orange Management
*
* PHP Version 7.4
*
* @package Modules\Knowledgebase
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
$categories = $this->getData('categories');
/**
* @var \phpOMS\Views\View $this
*/
echo $this->getData('nav')->render();
?>
<div class="row">
<div class="col-xs-12">
<div class="box wf-100">
<table class="default">
<caption><?= $this->getHtml('Categories') ?><i class="fa fa-download floatRight download btn"></i></caption>
<thead>
<tr>
<td><?= $this->getHtml('ID', '0', '0'); ?>
<td class="wf-100"><?= $this->getHtml('Name') ?>
<tfoot>
<tr><td colspan="2">
<tbody>
<?php $c = 0; foreach ($categories as $key => $value) : ++$c;
$url = \phpOMS\Uri\UriFactory::build('{/prefix}admin/account/settings?{?}&id=' . $value->getId()); ?>
<tr data-href="<?= $url; ?>">
<td data-label="<?= $this->getHtml('ID', '0', '0') ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getId()); ?></a>
<td data-label="<?= $this->getHtml('Name') ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getName()); ?></a>
<?php endforeach; ?>
<?php if ($c === 0) : ?>
<tr><td colspan="2" class="empty"><?= $this->getHtml('Empty', '0', '0'); ?>
<?php endif; ?>
</table>
</div>
</div>
</div>