Version 0.9.13

This commit is contained in:
2023-11-18 21:05:43 +01:00
parent f656fb70fa
commit bedb36c136
24 changed files with 383 additions and 136 deletions

View File

@ -39,14 +39,14 @@ if ($saveOrder && !empty($this->items)) {
<?= Text::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
</div>
<?php else: ?>
<table class="table table-striped table-hover" id="partsList">
<table class="table table-striped table-hover" id="partList">
<caption class="visually-hidden">
<?php echo Text::_('COM_BANNERS_CLIENTS_TABLE_CAPTION'); ?>,
<?= Text::_('COM_DEPOT_PARTS_TABLE_CAPTION'); ?>,
<span id="orderedBy">
<?php echo Text::_('JGLOBAL_SORTED_BY'); ?>
<?= Text::_('JGLOBAL_SORTED_BY'); ?>
</span>,
<span id="filteredBy">
<?php echo Text::_('JGLOBAL_FILTERED_BY'); ?>
<?= Text::_('JGLOBAL_FILTERED_BY'); ?>
</span>
</caption>
<thead>
@ -55,7 +55,10 @@ if ($saveOrder && !empty($this->items)) {
<?= HTMLHelper::_('grid.checkall'); ?>
</td>
<th scope="col" class="w-1 text-center">
<?php echo HTMLHelper::_('searchtools.sort', 'JSTATUS', 'd.state', $listDirn, $listOrder); ?>
<?= HTMLHelper::_('searchtools.sort', '', 'd.ordering', $listDirn, $listOrder, null, 'asc', 'JGRID_HEADING_ORDERING', 'icon-sort'); ?>
</th>
<th scope="col" class="w-1 text-center">
<?= HTMLHelper::_('searchtools.sort', 'JSTATUS', 'd.state', $listDirn, $listOrder); ?>
</th>
<th scope="col">
<?= HTMLHelper::_(
@ -78,6 +81,15 @@ if ($saveOrder && !empty($this->items)) {
<th>
<?= Text::_('COM_DEPOT_TABLE_HEAD_QUANTITY_EXP') ?>
</th>
<th>
<?= HTMLHelper::_(
'searchtools.sort',
'COM_DEPOT_TABLE_HEAD_DESCRIPTION',
'd.description',
$listDirn,
$listOrder
); ?>
</th>
<th>
<?= HTMLHelper::_(
'searchtools.sort',
@ -107,14 +119,39 @@ if ($saveOrder && !empty($this->items)) {
</th>
</tr>
</thead>
<tbody>
<?php foreach ($this->items as $i => $item): ?>
<tr>
<td class="text-center">
<tbody <?php if ($saveOrder): ?> class="js-draggable" data-url="<?= $saveOrderingUrl; ?>"
data-direction="<?= strtolower($listDirn); ?>" data-nested="true" <?php endif; ?>>
<?php foreach ($this->items as $i => $item):
$ordering = ($listOrder == 'ordering');
$canChange = true;
?>
<tr class="row<?= $i % 2; ?>" data-draggable-group="0" item-id="<?= $item->id; ?>">
<th>
<?= HTMLHelper::_('grid.id', $i, $item->id, false, 'cid', 'cb', $item->component_name); ?>
</th>
<td class="text-center d-none d-md-table-cell">
<?php
$iconClass = '';
if (!$canChange) {
$iconClass = ' inactive';
} elseif (!$saveOrder) {
$iconClass = ' inactive" title="' . Text::_('JORDERINGDISABLED');
}
?>
<span class="sortable-handler <?= $iconClass ?>">
<span class="icon-ellipsis-v" aria-hidden="true"></span>
</span>
<?php if ($saveOrder): ?>
<input type="text" name="order[]" size="5" value="<?= $item->ordering; ?>"
class="width-20 text-area-order hidden">
<?php endif; ?>
<div class="small">
<?= $item->ordering; ?>
</div>
</td>
<td class="text-center">
<?php echo HTMLHelper::_('jgrid.published', $item->state, $i, 'parts.', $canChange); ?>
<?= HTMLHelper::_('jgrid.published', $item->state, $i, 'parts.', $canChange); ?>
</td>
<th>
<div class="break-word">
@ -142,6 +179,11 @@ if ($saveOrder && !empty($this->items)) {
<td>
<?= "10^" . $item->quantity_exp; ?>
</td>
<td>
<div class="break-word">
<?= $this->escape($item->description); ?>
</div>
</td>
<td>
<a href="<?= Route::_('index.php?option=com_depot&task=manufacturer.edit&id=' .
(int) $item->id) ?>" title="<?= Text::_('JACTION_EDIT') ?>">
@ -164,7 +206,7 @@ if ($saveOrder && !empty($this->items)) {
<?php endforeach; ?>
</tbody>
</table>
<?php echo $this->pagination->getListFooter(); ?>
<?= $this->pagination->getListFooter(); ?>
<?php endif; ?>
<input type="hidden" name="task" value="">