2023-10-23 21:55:15 +02:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* @package Depot.Administrator
|
|
|
|
* @subpackage com_depot
|
|
|
|
* @author Thomas Kuschel <thomas@kuschel.at>
|
|
|
|
* @copyright (C) 2023 KW4NZ, <https://www.kuschel.at>
|
|
|
|
* @license GNU General Public License version 2 or later; see LICENSE.md
|
|
|
|
* @since 0.9.3
|
|
|
|
*/
|
|
|
|
|
|
|
|
use Joomla\CMS\HTML\HTMLHelper;
|
|
|
|
use Joomla\CMS\Language\Text;
|
|
|
|
use Joomla\CMS\Router\Route;
|
2023-10-26 16:42:11 +02:00
|
|
|
use Joomla\CMS\Layout\LayoutHelper;
|
2023-10-23 21:55:15 +02:00
|
|
|
|
|
|
|
?>
|
|
|
|
<form action="<?= Route::_('index.php?option=com_depot&view=stocks'); ?>" method="post" name="adminForm" id="adminForm">
|
|
|
|
|
2023-10-26 16:42:11 +02:00
|
|
|
<?= LayoutHelper::render('joomla.searchtools.default', ['view' => $this]); ?>
|
|
|
|
|
2023-10-23 21:55:15 +02:00
|
|
|
<?php if (empty($this->items)): ?>
|
|
|
|
<div class="alert alert-info">
|
|
|
|
<span class="icon-info-circle" aria-hidden="true">
|
|
|
|
</span>
|
|
|
|
<?= Text::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
|
|
|
|
</div>
|
|
|
|
<?php else: ?>
|
|
|
|
|
|
|
|
<table class="table table-striped table-hover">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th>
|
|
|
|
<?= HTMLHelper::_('grid.checkall'); ?>
|
|
|
|
</th>
|
|
|
|
<th>
|
2023-10-31 23:25:42 +01:00
|
|
|
<?= HTMLHelper::_(
|
|
|
|
'searchtools.sort',
|
|
|
|
'JGRID_HEADING_ID',
|
|
|
|
's.id',
|
|
|
|
$this->listDirn,
|
|
|
|
$this->listOrder
|
|
|
|
); ?>
|
2023-10-23 21:55:15 +02:00
|
|
|
</th>
|
|
|
|
<th>
|
2023-10-31 23:25:42 +01:00
|
|
|
<?= HTMLHelper::_(
|
|
|
|
'searchtools.sort',
|
|
|
|
'COM_DEPOT_TABLE_HEAD_STOCK',
|
|
|
|
's.name',
|
|
|
|
$this->listDirn,
|
|
|
|
$this->listOrder
|
|
|
|
); ?>
|
2023-10-23 21:55:15 +02:00
|
|
|
</th>
|
|
|
|
<th>
|
|
|
|
<?= Text::_('COM_DEPOT_TABLE_HEAD_DESCRIPTION') ?>
|
|
|
|
</th>
|
2023-10-31 23:25:42 +01:00
|
|
|
<th>
|
|
|
|
<?= HTMLHelper::_(
|
|
|
|
'searchtools.sort',
|
|
|
|
'COM_DEPOT_TABLE_HEAD_OWNER',
|
|
|
|
'owner',
|
|
|
|
$this->listDirn,
|
|
|
|
$this->listOrder
|
|
|
|
); ?>
|
|
|
|
</th>
|
2023-10-23 21:55:15 +02:00
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<?php foreach ($this->items as $i => $item): ?>
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<?= HTMLHelper::_('grid.id', $i, $item->id); ?>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<?= $item->id ?>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<a href="<?= Route::_('index.php?option=com_depot&task=stock.edit&id=' .
|
|
|
|
(int) $item->id) ?>" title="<?= Text::_('JACTION_EDIT') ?>">
|
|
|
|
<?= $this->escape($item->name); ?>
|
|
|
|
</a>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<?= $this->escape($item->description); ?>
|
|
|
|
</td>
|
2023-10-31 23:25:42 +01:00
|
|
|
<td>
|
|
|
|
<div class="word-break">
|
|
|
|
<?php if (!empty($item->owner)): ?>
|
|
|
|
<?= $item->owner; ?>
|
|
|
|
<div class="small">
|
|
|
|
<?= Text::_('JGLOBAL_USERNAME') . ': ' . $item->owner_username; ?>
|
|
|
|
</div>
|
|
|
|
<?php else: ?>
|
|
|
|
<?= Text::_('JGLOBAL_AUTH_USER_NOT_FOUND'); ?>
|
|
|
|
<?php endif; ?>
|
|
|
|
</div>
|
|
|
|
</td>
|
2023-10-23 21:55:15 +02:00
|
|
|
</tr>
|
|
|
|
<?php endforeach; ?>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
2023-11-01 08:06:41 +01:00
|
|
|
<?php echo $this->pagination->getListFooter(); ?>
|
2023-10-23 21:55:15 +02:00
|
|
|
<?php endif; ?>
|
|
|
|
|
|
|
|
<input type="hidden" name="task" value="">
|
|
|
|
<input type="hidden" name="boxchecked" value="0">
|
|
|
|
<?= HTMLHelper::_('form.token'); ?>
|
|
|
|
</form>
|