oms-HumanResourceManagement/Theme/Backend/department-list.tpl.php
Dennis Eichhorn de4f7d31cb ui fixes
2024-04-07 17:31:42 +00:00

54 lines
2.0 KiB
PHP
Executable File

<?php
/**
* Jingga
*
* PHP Version 8.2
*
* @package Modules\HumanResourceManagement
* @copyright Dennis Eichhorn
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
declare(strict_types=1);
use phpOMS\Uri\UriFactory;
/**
* @var \phpOMS\Views\View $this
*/
$departments = $this->data['departments'];
echo $this->data['nav']->render(); ?>
<div class="row">
<div class="col-xs-12">
<div class="portlet">
<div class="portlet-head"><?= $this->getHtml('Departments'); ?><i class="g-icon download btn end-xs">download</i></div>
<div class="slider">
<table class="default sticky">
<thead>
<tr>
<td><?= $this->getHtml('ID', '0', '0'); ?>
<td class="wf-100"><?= $this->getHtml('Name'); ?>
<td><?= $this->getHtml('Employees'); ?>
<td><?= $this->getHtml('Parent'); ?>
<tbody>
<?php $c = 0; foreach ($departments as $key => $value) : ++$c;
$url = UriFactory::build('{/base}/humanresource/department/view?{?}&id=' . $value->id); ?>
<tr tabindex="0" data-href="<?= $url; ?>">
<td data-label="<?= $this->getHtml('ID', '0', '0'); ?>"><a href="<?= $url; ?>"><?= $value->id; ?></a>
<td data-label="<?= $this->getHtml('Name'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->name); ?></a>
<td data-label="<?= $this->getHtml('Employees'); ?>"><?= $this->data['stats'][$value->id] ?? 0; ?>
<td data-label="<?= $this->getHtml('Parent'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->parent->name); ?></a>
<?php endforeach; ?>
<?php if ($c === 0) : ?>
<tr><td colspan="4" class="empty"><?= $this->getHtml('Empty', '0', '0'); ?>
<?php endif; ?>
</table>
</div>
</div>
</div>
</div>