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,22 +33,52 @@ use Joomla\CMS\Layout\LayoutHelper;
<?= HTMLHelper::_('grid.checkall'); ?>
</th>
<th>
<?= Text::_('COM_DEPOT_TABLE_HEAD_ID') ?>
<?= HTMLHelper::_(
'searchtools.sort',
'JGRID_HEADING_ID',
'd.id',
$this->listDirn,
$this->listOrder
); ?>
</th>
<th>
<?= Text::_('COM_DEPOT_TABLE_HEAD_NAME') ?>
<?= HTMLHelper::_(
'searchtools.sort',
'COM_DEPOT_TABLE_HEAD_NAME',
'd.component_name',
$this->listDirn,
$this->listOrder
); ?>
</th>
<th>
<?= Text::_('COM_DEPOT_TABLE_HEAD_QUANTITY') ?>
<?= HTMLHelper::_(
'searchtools.sort',
'COM_DEPOT_TABLE_HEAD_QUANTITY',
'd.quantity',
$this->listDirn,
$this->listOrder
); ?>
</th>
<th>
<?= Text::_('COM_DEPOT_TABLE_HEAD_QUANTITY_EXP') ?>
</th>
<th>
<?= Text::_('COM_DEPOT_TABLE_HEAD_MANUFACTURER') ?>
<?= HTMLHelper::_(
'searchtools.sort',
'COM_DEPOT_TABLE_HEAD_MANUFACTURER',
'manufacturer',
$this->listDirn,
$this->listOrder
); ?>
</th>
<th>
<?= Text::_('COM_DEPOT_TABLE_HEAD_STOCK') ?>
<?= HTMLHelper::_(
'searchtools.sort',
'COM_DEPOT_TABLE_HEAD_STOCK',
'stock_name',
$this->listDirn,
$this->listOrder
); ?>
</th>
</tr>
</thead>
@ -94,10 +124,15 @@ use Joomla\CMS\Layout\LayoutHelper;
</a>
</td>
<td>
<a href="<?= Route::_('index.php?option=com_depot&task=stock.edit&id=' .
<a class="break-word" href="<?= Route::_('index.php?option=com_depot&task=stock.edit&id=' .
(int) $item->id) ?>" title="<?= Text::_('JACTION_EDIT') ?>">
<?= $this->escape($item->stock_name); ?>
</a>
<div class="small">
<?= $this->escape($item->owner); ?>
</div>
</td>
</tr>
<?php endforeach; ?>