Files
pkg_circolari/administrator/tmpl/categorie/default.php

79 lines
3.1 KiB
PHP

<?php
/**
* @package Com_Circolari
* @version CVS: 1.0.0
* @author Tommaso Cippitelli
*/
defined('_JEXEC') or die;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Factory;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Layout\LayoutHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Session\Session;
HTMLHelper::_('bootstrap.tooltip');
HTMLHelper::_('behavior.multiselect');
$wa = $this->document->getWebAssetManager();
$wa->useStyle('com_circolari.admin')
->useScript('com_circolari.admin');
$user = Factory::getApplication()->getIdentity();
$listOrder = $this->state->get('list.ordering');
$listDirn = $this->state->get('list.direction');
$canChange = $user->authorise('core.edit.state', 'com_circolari');
?>
<form action="<?php echo Route::_('index.php?option=com_circolari&view=categorie'); ?>" method="post" name="adminForm" id="adminForm">
<div class="row">
<div class="col-md-12">
<div id="j-main-container" class="j-main-container">
<?php echo LayoutHelper::render('joomla.searchtools.default', array('view' => $this)); ?>
<div class="clearfix"></div>
<table class="table table-striped" id="categorieList">
<thead>
<tr>
<th class="w-1 text-center">
<input type="checkbox" name="checkall-toggle" class="form-check-input" title="<?php echo Text::_('JGLOBAL_CHECK_ALL'); ?>" onclick="Joomla.checkAll(this)" />
</th>
<th><?php echo HTMLHelper::_('searchtools.sort', 'Titolo', 'a.title', $listDirn, $listOrder); ?></th>
<th><?php echo HTMLHelper::_('searchtools.sort', 'Descrizione', 'a.descrizione', $listDirn, $listOrder); ?></th>
<th class="w-1 text-center"><?php echo HTMLHelper::_('searchtools.sort', 'JSTATUS', 'a.state', $listDirn, $listOrder); ?></th>
<th class="w-1 text-center"><?php echo HTMLHelper::_('searchtools.sort', 'ID', 'a.id', $listDirn, $listOrder); ?></th>
</tr>
</thead>
<tfoot>
<tr>
<td colspan="5"><?php echo $this->pagination->getListFooter(); ?></td>
</tr>
</tfoot>
<tbody>
<?php foreach ($this->items as $i => $item) : ?>
<tr class="row<?php echo $i % 2; ?>">
<td class="text-center"><?php echo HTMLHelper::_('grid.id', $i, $item->id); ?></td>
<td>
<a href="<?php echo Route::_('index.php?option=com_circolari&task=categoria.edit&id=' . (int) $item->id); ?>">
<?php echo htmlspecialchars(($item->title ?? ''), ENT_QUOTES, 'UTF-8'); ?>
</a>
</td>
<td><?php echo htmlspecialchars(($item->description ?? '') ?? '', ENT_QUOTES, 'UTF-8'); ?></td>
<td class="text-center"><?php echo HTMLHelper::_('jgrid.published', $item->state, $i, 'categorie.', $canChange, 'cb'); ?></td>
<td class="text-center"><?php echo (int) $item->id; ?></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<input type="hidden" name="task" value="" />
<input type="hidden" name="boxchecked" value="0" />
<input type="hidden" name="list[fullorder]" value="<?php echo $listOrder . ' ' . $listDirn; ?>" />
<?php echo HTMLHelper::_('form.token'); ?>
</div>
</div>
</div>
</form>