Ordering and search, no pagination yet

This commit is contained in:
2023-10-31 23:25:42 +01:00
parent 6d03c99a34
commit 3f72ee89ca
30 changed files with 466 additions and 107 deletions

View File

@ -33,14 +33,35 @@ use Joomla\CMS\Layout\LayoutHelper;
<?= HTMLHelper::_('grid.checkall'); ?>
</th>
<th>
<?= Text::_('COM_DEPOT_TABLE_HEAD_ID') ?>
<?= HTMLHelper::_(
'searchtools.sort',
'JGRID_HEADING_ID',
's.id',
$this->listDirn,
$this->listOrder
); ?>
</th>
<th>
<?= Text::_('COM_DEPOT_TABLE_HEAD_STOCK') ?>
<?= HTMLHelper::_(
'searchtools.sort',
'COM_DEPOT_TABLE_HEAD_STOCK',
's.name',
$this->listDirn,
$this->listOrder
); ?>
</th>
<th>
<?= Text::_('COM_DEPOT_TABLE_HEAD_DESCRIPTION') ?>
</th>
<th>
<?= HTMLHelper::_(
'searchtools.sort',
'COM_DEPOT_TABLE_HEAD_OWNER',
'owner',
$this->listDirn,
$this->listOrder
); ?>
</th>
</tr>
</thead>
<tbody>
@ -61,6 +82,18 @@ use Joomla\CMS\Layout\LayoutHelper;
<td>
<?= $this->escape($item->description); ?>
</td>
<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>
</tr>
<?php endforeach; ?>
</tbody>