UPD version 0.9.12
This commit is contained in:
@ -10,11 +10,24 @@
|
||||
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\Router\Route;
|
||||
use Joomla\CMS\Layout\LayoutHelper;
|
||||
use Joomla\CMS\Router\Route;
|
||||
|
||||
/** @var \Joomla\CMS\WebAsset\WebAssetManager $wa */
|
||||
$wa = $this->document->getWebAssetManager();
|
||||
$wa->useScript('table.columns')
|
||||
->useScript('multiselect');
|
||||
|
||||
$canChange = true;
|
||||
$listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$saveOrder = $listOrder == 'd.ordering';
|
||||
|
||||
if ($saveOrder && !empty($this->items)) {
|
||||
$saveOrderingUrl = 'index.php?option=com_depot&task=parts.saveOrderAjax&tmpl=component';
|
||||
HTMLHelper::_('draggablelist.draggable');
|
||||
}
|
||||
?>
|
||||
|
||||
<form action="<?= Route::_('index.php?option=com_depot&view=parts'); ?>" method="post" name="adminForm" id="adminForm">
|
||||
|
||||
<?= LayoutHelper::render('joomla.searchtools.default', ['view' => $this]); ?>
|
||||
@ -26,28 +39,31 @@ use Joomla\CMS\Layout\LayoutHelper;
|
||||
<?= Text::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<table class="table table-striped table-hover">
|
||||
<table class="table table-striped table-hover" id="partsList">
|
||||
<caption class="visually-hidden">
|
||||
<?php echo Text::_('COM_BANNERS_CLIENTS_TABLE_CAPTION'); ?>,
|
||||
<span id="orderedBy">
|
||||
<?php echo Text::_('JGLOBAL_SORTED_BY'); ?>
|
||||
</span>,
|
||||
<span id="filteredBy">
|
||||
<?php echo Text::_('JGLOBAL_FILTERED_BY'); ?>
|
||||
</span>
|
||||
</caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
<td class="w-1 text-center">
|
||||
<?= HTMLHelper::_('grid.checkall'); ?>
|
||||
</td>
|
||||
<th scope="col" class="w-1 text-center">
|
||||
<?php echo HTMLHelper::_('searchtools.sort', 'JSTATUS', 'd.state', $listDirn, $listOrder); ?>
|
||||
</th>
|
||||
<th>
|
||||
<?= HTMLHelper::_(
|
||||
'searchtools.sort',
|
||||
'JGRID_HEADING_ID',
|
||||
'd.id',
|
||||
$this->listDirn,
|
||||
$this->listOrder
|
||||
); ?>
|
||||
</th>
|
||||
<th>
|
||||
<th scope="col">
|
||||
<?= HTMLHelper::_(
|
||||
'searchtools.sort',
|
||||
'COM_DEPOT_TABLE_HEAD_NAME',
|
||||
'd.component_name',
|
||||
$this->listDirn,
|
||||
$this->listOrder
|
||||
$listDirn,
|
||||
$listOrder
|
||||
); ?>
|
||||
</th>
|
||||
<th>
|
||||
@ -55,8 +71,8 @@ use Joomla\CMS\Layout\LayoutHelper;
|
||||
'searchtools.sort',
|
||||
'COM_DEPOT_TABLE_HEAD_QUANTITY',
|
||||
'd.quantity',
|
||||
$this->listDirn,
|
||||
$this->listOrder
|
||||
$listDirn,
|
||||
$listOrder
|
||||
); ?>
|
||||
</th>
|
||||
<th>
|
||||
@ -67,8 +83,8 @@ use Joomla\CMS\Layout\LayoutHelper;
|
||||
'searchtools.sort',
|
||||
'COM_DEPOT_TABLE_HEAD_MANUFACTURER',
|
||||
'manufacturer',
|
||||
$this->listDirn,
|
||||
$this->listOrder
|
||||
$listDirn,
|
||||
$listOrder
|
||||
); ?>
|
||||
</th>
|
||||
<th>
|
||||
@ -76,8 +92,17 @@ use Joomla\CMS\Layout\LayoutHelper;
|
||||
'searchtools.sort',
|
||||
'COM_DEPOT_TABLE_HEAD_STOCK',
|
||||
'stock_name',
|
||||
$this->listDirn,
|
||||
$this->listOrder
|
||||
$listDirn,
|
||||
$listOrder
|
||||
); ?>
|
||||
</th>
|
||||
<th scope="col" class="w-1 text-center">
|
||||
<?= HTMLHelper::_(
|
||||
'searchtools.sort',
|
||||
'JGRID_HEADING_ID',
|
||||
'd.id',
|
||||
$listDirn,
|
||||
$listOrder
|
||||
); ?>
|
||||
</th>
|
||||
</tr>
|
||||
@ -85,13 +110,13 @@ use Joomla\CMS\Layout\LayoutHelper;
|
||||
<tbody>
|
||||
<?php foreach ($this->items as $i => $item): ?>
|
||||
<tr>
|
||||
<td>
|
||||
<?= HTMLHelper::_('grid.id', $i, $item->id); ?>
|
||||
<td class="text-center">
|
||||
<?= HTMLHelper::_('grid.id', $i, $item->id, false, 'cid', 'cb', $item->component_name); ?>
|
||||
</td>
|
||||
<td>
|
||||
<?= $item->id ?>
|
||||
<td class="text-center">
|
||||
<?php echo HTMLHelper::_('jgrid.published', $item->state, $i, 'parts.', $canChange); ?>
|
||||
</td>
|
||||
<td>
|
||||
<th>
|
||||
<div class="break-word">
|
||||
<a href="<?= Route::_('index.php?option=com_depot&task=part.edit&id=' .
|
||||
(int) $item->id) ?>" title="<?= Text::_('JACTION_EDIT') ?>">
|
||||
@ -110,7 +135,7 @@ use Joomla\CMS\Layout\LayoutHelper;
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</td>
|
||||
</th>
|
||||
<td>
|
||||
<?= $this->escape($item->quantity); ?>
|
||||
</td>
|
||||
@ -124,7 +149,6 @@ use Joomla\CMS\Layout\LayoutHelper;
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
|
||||
<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); ?>
|
||||
@ -132,7 +156,9 @@ use Joomla\CMS\Layout\LayoutHelper;
|
||||
<div class="small">
|
||||
<?= $this->escape($item->owner); ?>
|
||||
</div>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
<?= $item->id ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
|
Reference in New Issue
Block a user