Version 0.9.13
This commit is contained in:
@ -84,7 +84,7 @@ use Joomla\CMS\Layout\LayoutHelper;
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php echo $this->pagination->getListFooter(); ?>
|
||||
<?= $this->pagination->getListFooter(); ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<input type="hidden" name="task" value="">
|
||||
|
@ -10,9 +10,8 @@
|
||||
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\Router\Route;
|
||||
use Joomla\CMS\Layout\LayoutHelper;
|
||||
use Joomla\CMS\Session\Session;
|
||||
use Joomla\CMS\Router\Route;
|
||||
|
||||
/** @var \Joomla\CMS\WebAsset\WebAssetManager $wa */
|
||||
$wa = $this->document->getWebAssetManager();
|
||||
@ -44,12 +43,12 @@ if ($saveOrder && !empty($this->items)) {
|
||||
<?php else: ?>
|
||||
<table class="table table-striped table-hover" id="packageList">
|
||||
<caption class="visually-hidden">
|
||||
<?php echo Text::_('COM_DEPOT_PACKAGES_TABLE_CAPTION'); ?>,
|
||||
<?= Text::_('COM_DEPOT_PACKAGES_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>
|
||||
@ -58,10 +57,10 @@ if ($saveOrder && !empty($this->items)) {
|
||||
<?= HTMLHelper::_('grid.checkall'); ?>
|
||||
</td>
|
||||
<th scope="col" class="w-1 text-center">
|
||||
<?php echo HTMLHelper::_('searchtools.sort', '', 'p.ordering', $listDirn, $listOrder, null, 'asc', 'JGRID_HEADING_ORDERING', 'icon-sort'); ?>
|
||||
<?= HTMLHelper::_('searchtools.sort', '', 'p.ordering', $listDirn, $listOrder, null, 'asc', 'JGRID_HEADING_ORDERING', 'icon-sort'); ?>
|
||||
</th>
|
||||
<th scope="col" class="w-1 text-center">
|
||||
<?php echo HTMLHelper::_('searchtools.sort', 'JSTATUS', 'p.state', $listDirn, $listOrder); ?>
|
||||
<?= HTMLHelper::_('searchtools.sort', 'JSTATUS', 'p.state', $listDirn, $listOrder); ?>
|
||||
</th>
|
||||
<th>
|
||||
<?= HTMLHelper::_(
|
||||
@ -109,7 +108,7 @@ if ($saveOrder && !empty($this->items)) {
|
||||
$ordering = ($listOrder == 'ordering');
|
||||
$canChange = true;
|
||||
?>
|
||||
<tr class="row<?= $i % 2; ?>" data-draggable-group="0" item-id="<?php echo $item->id; ?>">
|
||||
<tr class="row<?= $i % 2; ?>" data-draggable-group="0" item-id="<?= $item->id; ?>">
|
||||
<th>
|
||||
<?= HTMLHelper::_('grid.id', $i, $item->id); ?>
|
||||
</th>
|
||||
@ -123,11 +122,11 @@ if ($saveOrder && !empty($this->items)) {
|
||||
$iconClass = ' inactive" title="' . Text::_('JORDERINGDISABLED');
|
||||
}
|
||||
?>
|
||||
<span class="sortable-handler <?php echo $iconClass ?>">
|
||||
<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="<?php echo $item->ordering; ?>"
|
||||
<input type="text" name="order[]" size="5" value="<?= $item->ordering; ?>"
|
||||
class="width-20 text-area-order hidden">
|
||||
<?php endif; ?>
|
||||
<div class="small">
|
||||
@ -135,7 +134,7 @@ if ($saveOrder && !empty($this->items)) {
|
||||
</div>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<?php echo HTMLHelper::_('jgrid.published', $item->state, $i, 'packages.', $canChange); ?>
|
||||
<?= HTMLHelper::_('jgrid.published', $item->state, $i, 'packages.', $canChange); ?>
|
||||
</td>
|
||||
<th>
|
||||
<a href="<?= Route::_('index.php?option=com_depot&task=package.edit&id=' .
|
||||
@ -156,7 +155,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="">
|
||||
|
@ -32,12 +32,9 @@ $wa->useScript('form.validate')
|
||||
<?= Text::_('COM_DEPOT_LEGEND_PART_DETAILS') ?>
|
||||
</legend>
|
||||
<div class="row">
|
||||
<div class="col-12 col-lg-6">
|
||||
<div class="col-12 col-lg-9">
|
||||
<?= $this->form->renderFieldset('details'); ?>
|
||||
</div>
|
||||
<div class="col-12 col-lg-6">
|
||||
<?= $this->form->getInput('description'); ?>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<?= HtmlHelper::_('uitab.endTab'); ?>
|
||||
|
@ -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="">
|
||||
|
@ -13,6 +13,20 @@ use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\Router\Route;
|
||||
use Joomla\CMS\Layout\LayoutHelper;
|
||||
|
||||
$wa = $this->document->getWebAssetManager();
|
||||
$wa->useScript('table.columns')
|
||||
->useScript('multiselect');
|
||||
|
||||
$user = $this->getCurrentUser();
|
||||
$userID = $user->get('id');
|
||||
$listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$saveOrder = $listOrder == 's.ordering';
|
||||
|
||||
if ($saveOrder && !empty($this->items)) {
|
||||
$saveOrderingUrl = 'index.php?option=com_depot&task=stocks.saveOrderAjax&tmpl=component';
|
||||
HTMLHelper::_('draggablelist.draggable');
|
||||
}
|
||||
?>
|
||||
<form action="<?= Route::_('index.php?option=com_depot&view=stocks'); ?>" method="post" name="adminForm" id="adminForm">
|
||||
|
||||
@ -26,79 +40,109 @@ use Joomla\CMS\Layout\LayoutHelper;
|
||||
</div>
|
||||
<?php else: ?>
|
||||
|
||||
<table class="table table-striped table-hover">
|
||||
<table class="table table-striped table-hover" id="stockList">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
<td>
|
||||
<?= HTMLHelper::_('grid.checkall'); ?>
|
||||
</th>
|
||||
<th>
|
||||
<?= HTMLHelper::_(
|
||||
'searchtools.sort',
|
||||
'JGRID_HEADING_ID',
|
||||
's.id',
|
||||
$this->listDirn,
|
||||
$this->listOrder
|
||||
); ?>
|
||||
</td>
|
||||
<th scope="col" class="w-1 text-center">
|
||||
<?= HTMLHelper::_('searchtools.sort', '', 's.ordering', $listDirn, $listOrder, null, 'asc', 'JGRID_HEADING_ORDERING', 'icon-sort'); ?>
|
||||
</th>
|
||||
<th>
|
||||
<?= HTMLHelper::_(
|
||||
'searchtools.sort',
|
||||
'COM_DEPOT_TABLE_HEAD_STOCK',
|
||||
's.name',
|
||||
$this->listDirn,
|
||||
$this->listOrder
|
||||
$listDirn,
|
||||
$listOrder
|
||||
); ?>
|
||||
</th>
|
||||
<th>
|
||||
<?= Text::_('COM_DEPOT_TABLE_HEAD_DESCRIPTION') ?>
|
||||
<?= HTMLHelper::_(
|
||||
'searchtools.sort',
|
||||
'COM_DEPOT_TABLE_HEAD_DESCRIPTION',
|
||||
's.description',
|
||||
$listDirn,
|
||||
$listOrder
|
||||
); ?>
|
||||
</th>
|
||||
<th>
|
||||
<?= HTMLHelper::_(
|
||||
'searchtools.sort',
|
||||
'COM_DEPOT_TABLE_HEAD_OWNER',
|
||||
'owner',
|
||||
$this->listDirn,
|
||||
$this->listOrder
|
||||
$listDirn,
|
||||
$listOrder
|
||||
); ?>
|
||||
</th>
|
||||
<th>
|
||||
<?= HTMLHelper::_(
|
||||
'searchtools.sort',
|
||||
'JGRID_HEADING_ID',
|
||||
's.id',
|
||||
$listDirn,
|
||||
$listOrder
|
||||
); ?>
|
||||
</th>
|
||||
</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>
|
||||
<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>
|
||||
<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); ?>
|
||||
</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; ?>
|
||||
</td>
|
||||
<th>
|
||||
<a href="<?= Route::_('index.php?option=com_depot&task=stock.edit&id=' .
|
||||
(int) $item->id) ?>" title="<?= Text::_('JACTION_EDIT') ?>">
|
||||
<?= $this->escape($item->name); ?>
|
||||
</a>
|
||||
</th>
|
||||
<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>
|
||||
<td>
|
||||
<?= $item->id ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php echo $this->pagination->getListFooter(); ?>
|
||||
<?= $this->pagination->getListFooter(); ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<input type="hidden" name="task" value="">
|
||||
|
Reference in New Issue
Block a user