Adding views of stacks, manufacturers lists
This commit is contained in:
62
admin/tmpl/manufacturer/edit.php
Normal file
62
admin/tmpl/manufacturer/edit.php
Normal file
@ -0,0 +1,62 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Depot.Administrator
|
||||
* @subpackage com_depot
|
||||
* @author Thomas Kuschel <thomas@kuschel.at>
|
||||
* @copyright (C) 2023 KW4NZ, <https://www.kuschel.at>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.md
|
||||
* @since 0.0.3
|
||||
*/
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\Router\Route;
|
||||
|
||||
/** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
|
||||
$wa = $this->document->getWebAssetManager();
|
||||
$wa->useScript('form.validate')
|
||||
->useScript('keepalive');
|
||||
|
||||
?>
|
||||
<form action="<?= Route::_('index.php?option=com_depot&view=manufactuerer&layout=edit&id=' . (int) $this->item->id); ?>"
|
||||
method="post" name="adminForm" id="item-form" class="form-validate">
|
||||
<?= HtmlHelper::_('uitab.startTabSet', 'myTab', ['active' => 'details']); ?>
|
||||
<?= HTMLHelper::_(
|
||||
'uitab.addTab',
|
||||
'myTab',
|
||||
'details',
|
||||
empty($this->item->id) ? Text::_('COM_DEPOT_TAB_NEW_MANUFACTURER') :
|
||||
Text::_('COM_DEPOT_TAB_EDIT_MANUFACTURER')
|
||||
); ?>
|
||||
<fieldset id="fieldset-details" class="options-form">
|
||||
<legend>
|
||||
<?= Text::_('COM_DEPOT_LEGEND_MANUFACTURER_DETAILS') ?>
|
||||
</legend>
|
||||
<div class="row">
|
||||
<div class="col-12 col-lg-6">
|
||||
<?= $this->form->renderFieldset('details'); ?>
|
||||
</div>
|
||||
<div class="col-12 col-lg-6">
|
||||
<?= $this->form->getInput('description'); ?>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<?= HtmlHelper::_('uitab.endTab'); ?>
|
||||
|
||||
<?= HTMLHelper::_('uitab.addTab', 'myTab', 'statistics', Text::_('COM_DEPOT_TAB_STATISTICS')); ?>
|
||||
<fieldset class="options-form">
|
||||
<legend>
|
||||
<?= Text::_('COM_DEPOT_LEGEND_STATISTICS') ?>
|
||||
</legend>
|
||||
<div class="row">
|
||||
<div class="col-12 col-lg-9">
|
||||
<?= $this->form->renderFieldset('statistics'); ?>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<?= HTMLHelper::_('uitab.endTab'); ?>
|
||||
|
||||
<?= HtmlHelper::_('uitab.endTabSet'); ?>
|
||||
|
||||
<input type="hidden" name="task" value="manufacturer.edit" />
|
||||
<?= HTMLHelper::_('form.token'); ?>
|
||||
</form>
|
73
admin/tmpl/manufacturers/default.php
Normal file
73
admin/tmpl/manufacturers/default.php
Normal file
@ -0,0 +1,73 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Depot.Administrator
|
||||
* @subpackage com_depot
|
||||
* @author Thomas Kuschel <thomas@kuschel.at>
|
||||
* @copyright (C) 2023 KW4NZ, <https://www.kuschel.at>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.md
|
||||
* @since 0.9.3
|
||||
*/
|
||||
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\Router\Route;
|
||||
|
||||
?>
|
||||
<form action="<?= Route::_('index.php?option=com_depot&view=manufacturers'); ?>" method="post" name="adminForm"
|
||||
id="adminForm">
|
||||
|
||||
<?php if (empty($this->items)): ?>
|
||||
<div class="alert alert-info">
|
||||
<span class="icon-info-circle" aria-hidden="true">
|
||||
</span>
|
||||
<?= Text::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
|
||||
<table class="table table-striped table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
<?= HTMLHelper::_('grid.checkall'); ?>
|
||||
</th>
|
||||
<th>
|
||||
<?= Text::_('COM_DEPOT_TABLE_HEAD_ID') ?>
|
||||
</th>
|
||||
<th>
|
||||
<?= Text::_('COM_DEPOT_TABLE_HEAD_MANUFACTURER_ACRONYM') ?>
|
||||
</th>
|
||||
<th>
|
||||
<?= Text::_('COM_DEPOT_TABLE_HEAD_MANUFACTURER') ?>
|
||||
</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=manufacturer.edit&id=' .
|
||||
(int) $item->id) ?>" title="<?= Text::_('JACTION_EDIT') ?>">
|
||||
<?= $this->escape($item->name_short); ?>
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<?= $this->escape($item->name_long); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<input type="hidden" name="task" value="">
|
||||
<input type="hidden" name="boxchecked" value="0">
|
||||
<?= HTMLHelper::_('form.token'); ?>
|
||||
</form>
|
@ -5,7 +5,7 @@
|
||||
* @author Thomas Kuschel <thomas@kuschel.at>
|
||||
* @copyright (C) 2023 KW4NZ, <https://www.kuschel.at>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.md
|
||||
* @since 0.0.3
|
||||
* @since 0.9.2
|
||||
*/
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Language\Text;
|
||||
@ -29,7 +29,7 @@ $wa->useScript('form.validate')
|
||||
); ?>
|
||||
<fieldset id="fieldset-details" class="options-form">
|
||||
<legend>
|
||||
<?= Text::_('COM_DEPOT_LEGEND_DETAILS') ?>
|
||||
<?= Text::_('COM_DEPOT_LEGEND_PART_DETAILS') ?>
|
||||
</legend>
|
||||
<div class="row">
|
||||
<div class="col-12 col-lg-6">
|
||||
|
@ -13,7 +13,6 @@ use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\Router\Route;
|
||||
|
||||
?>
|
||||
<h2>Welcome to my Depot Component!</h2>
|
||||
|
||||
<form action="<?= Route::_('index.php?option=com_depot&view=parts'); ?>" method="post" name="adminForm" id="adminForm">
|
||||
|
||||
@ -37,6 +36,18 @@ use Joomla\CMS\Router\Route;
|
||||
<th>
|
||||
<?= Text::_('COM_DEPOT_TABLE_HEAD_NAME') ?>
|
||||
</th>
|
||||
<th>
|
||||
<?= Text::_('COM_DEPOT_TABLE_HEAD_QUANTITY') ?>
|
||||
</th>
|
||||
<th>
|
||||
<?= Text::_('COM_DEPOT_TABLE_HEAD_QUANTITY_EXP') ?>
|
||||
</th>
|
||||
<th>
|
||||
<?= Text::_('COM_DEPOT_TABLE_HEAD_MANUFACTURER') ?>
|
||||
</th>
|
||||
<th>
|
||||
<?= Text::_('COM_DEPOT_TABLE_HEAD_STOCK') ?>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@ -54,6 +65,24 @@ use Joomla\CMS\Router\Route;
|
||||
<?= $this->escape($item->component_name); ?>
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<?= $this->escape($item->quantity); ?>
|
||||
</td>
|
||||
<td>
|
||||
<?= "10^" . $item->quantity_exp; ?>
|
||||
</td>
|
||||
<td>
|
||||
<a href="<?= Route::_('index.php?option=com_depot&task=manufacturer.edit&id=' .
|
||||
(int) $item->id) ?>" title="<?= Text::_('JACTION_EDIT') ?>">
|
||||
<?= $this->escape($item->manufacturer); ?>
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="<?= Route::_('index.php?option=com_depot&task=stock.edit&id=' .
|
||||
(int) $item->id) ?>" title="<?= Text::_('JACTION_EDIT') ?>">
|
||||
<?= $this->escape($item->stock_name); ?>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
|
62
admin/tmpl/stock/edit.php
Normal file
62
admin/tmpl/stock/edit.php
Normal file
@ -0,0 +1,62 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Depot.Administrator
|
||||
* @subpackage com_depot
|
||||
* @author Thomas Kuschel <thomas@kuschel.at>
|
||||
* @copyright (C) 2023 KW4NZ, <https://www.kuschel.at>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.md
|
||||
* @since 0.0.3
|
||||
*/
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\Router\Route;
|
||||
|
||||
/** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
|
||||
$wa = $this->document->getWebAssetManager();
|
||||
$wa->useScript('form.validate')
|
||||
->useScript('keepalive');
|
||||
|
||||
?>
|
||||
<form action="<?= Route::_('index.php?option=com_depot&view=stock&layout=edit&id=' . (int) $this->item->id); ?>"
|
||||
method="post" name="adminForm" id="item-form" class="form-validate">
|
||||
<?= HtmlHelper::_('uitab.startTabSet', 'myTab', ['active' => 'details']); ?>
|
||||
<?= HTMLHelper::_(
|
||||
'uitab.addTab',
|
||||
'myTab',
|
||||
'details',
|
||||
empty($this->item->id) ? Text::_('COM_DEPOT_TAB_NEW_STOCK') :
|
||||
Text::_('COM_DEPOT_TAB_EDIT_STOCK')
|
||||
); ?>
|
||||
<fieldset id="fieldset-details" class="options-form">
|
||||
<legend>
|
||||
<?= Text::_('COM_DEPOT_LEGEND_STOCK_DETAILS') ?>
|
||||
</legend>
|
||||
<div class="row">
|
||||
<div class="col-12 col-lg-6">
|
||||
<?= $this->form->renderFieldset('details'); ?>
|
||||
</div>
|
||||
<div class="col-12 col-lg-6">
|
||||
<?= $this->form->getInput('description'); ?>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<?= HtmlHelper::_('uitab.endTab'); ?>
|
||||
|
||||
<?= HTMLHelper::_('uitab.addTab', 'myTab', 'statistics', Text::_('COM_DEPOT_TAB_STATISTICS')); ?>
|
||||
<fieldset class="options-form">
|
||||
<legend>
|
||||
<?= Text::_('COM_DEPOT_LEGEND_STATISTICS') ?>
|
||||
</legend>
|
||||
<div class="row">
|
||||
<div class="col-12 col-lg-9">
|
||||
<?= $this->form->renderFieldset('statistics'); ?>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<?= HTMLHelper::_('uitab.endTab'); ?>
|
||||
|
||||
<?= HtmlHelper::_('uitab.endTabSet'); ?>
|
||||
|
||||
<input type="hidden" name="task" value="stock.edit" />
|
||||
<?= HTMLHelper::_('form.token'); ?>
|
||||
</form>
|
71
admin/tmpl/stocks/default.php
Normal file
71
admin/tmpl/stocks/default.php
Normal file
@ -0,0 +1,71 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Depot.Administrator
|
||||
* @subpackage com_depot
|
||||
* @author Thomas Kuschel <thomas@kuschel.at>
|
||||
* @copyright (C) 2023 KW4NZ, <https://www.kuschel.at>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.md
|
||||
* @since 0.9.3
|
||||
*/
|
||||
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\Router\Route;
|
||||
|
||||
?>
|
||||
<form action="<?= Route::_('index.php?option=com_depot&view=stocks'); ?>" method="post" name="adminForm" id="adminForm">
|
||||
|
||||
<?php if (empty($this->items)): ?>
|
||||
<div class="alert alert-info">
|
||||
<span class="icon-info-circle" aria-hidden="true">
|
||||
</span>
|
||||
<?= Text::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
|
||||
<table class="table table-striped table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
<?= HTMLHelper::_('grid.checkall'); ?>
|
||||
</th>
|
||||
<th>
|
||||
<?= Text::_('COM_DEPOT_TABLE_HEAD_ID') ?>
|
||||
</th>
|
||||
<th>
|
||||
<?= Text::_('COM_DEPOT_TABLE_HEAD_STOCK') ?>
|
||||
</th>
|
||||
<th>
|
||||
<?= Text::_('COM_DEPOT_TABLE_HEAD_DESCRIPTION') ?>
|
||||
</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>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<input type="hidden" name="task" value="">
|
||||
<input type="hidden" name="boxchecked" value="0">
|
||||
<?= HTMLHelper::_('form.token'); ?>
|
||||
</form>
|
Reference in New Issue
Block a user