ADD list of items
This commit is contained in:
@ -7,26 +7,61 @@
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.md
|
||||
* @since 0.0.1
|
||||
*/
|
||||
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\Router\Route;
|
||||
|
||||
?>
|
||||
<h2>Welcome to my Depot Component!</h2>
|
||||
|
||||
<p>Link: <a href="index.php?option=com_depot&view=part&layout=edit&id=1">Part</a></p>
|
||||
<form action="<?= Route::_('index.php?option=com_depot&view=parts'); ?>" method="post" name="adminForm" id="adminForm">
|
||||
|
||||
<table class="table table-striped table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>COM_DEPOT_TABLE_HEAD_ID</th>
|
||||
<th>COM_DEPOT_TABLE_HEAD_NAME</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($this->items as $i => $item): ?>
|
||||
<tr>
|
||||
<td>
|
||||
<?= $item->id ?>
|
||||
<td>
|
||||
<?= $item->component_name ?>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?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_NAME') ?>
|
||||
</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=part.edit&id=' .
|
||||
(int) $item->id) ?>" title="<?= Text::_('JACTION_EDIT') ?>">
|
||||
<?= $this->escape($item->component_name); ?>
|
||||
</a>
|
||||
</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