gestione categorie interne & fix

This commit is contained in:
2025-09-01 12:56:30 +02:00
parent 16ac92a59e
commit f9b01eb01e
40 changed files with 2252 additions and 424 deletions

View File

@ -0,0 +1,32 @@
<?php
/**
* @version CVS: 1.0.0
* @package Com_Anand
* @author Super User <dev@component-creator.com>
* @copyright 2023 Super User
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// No direct access
defined('_JEXEC') or die;
use \Joomla\CMS\HTML\HTMLHelper;
use \Joomla\CMS\Factory;
use \Joomla\CMS\Uri\Uri;
use \Joomla\CMS\Router\Route;
use \Joomla\CMS\Language\Text;
use \Joomla\CMS\Session\Session;
use Joomla\Utilities\ArrayHelper;
?>
<div class="item_fields">
<table class="table">
</table>
</div>

View File

@ -0,0 +1,42 @@
<?php
/**
* @version 1.1.4
* @package Com_Circolari
*/
defined('_JEXEC') or die;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Router\Route;
HTMLHelper::_('behavior.keepalive');
HTMLHelper::_('behavior.core');
?>
<form action="<?php echo Route::_('index.php?option=com_circolari&view=categoria&layout=edit&id=' . (int) ($this->item->id ?? 0)); ?>"
method="post"
name="adminForm"
id="adminForm"
class="form-validate">
<?php echo HTMLHelper::_('uitab.startTabSet', 'categoriaTab', ['active' => 'details']); ?>
<?php echo HTMLHelper::_('uitab.addTab', 'categoriaTab', 'details', JText::_('COM_CIRCOLARI_TITLE_CATEGORIA')); ?>
<div class="row">
<div class="col-lg-9 col-md-8">
<?php echo $this->form->renderField('title'); ?>
<?php echo $this->form->renderField('alias'); ?>
<?php echo $this->form->renderField('description'); ?>
</div>
<div class="col-lg-3 col-md-4">
<?php echo $this->form->renderField('state'); ?>
<?php echo $this->form->renderField('ordering'); ?>
<?php echo $this->form->renderField('id'); ?>
</div>
</div>
<?php echo HTMLHelper::_('uitab.endTab'); ?>
<?php echo HTMLHelper::_('uitab.endTabSet'); ?>
<input type="hidden" name="task" value=""/>
<?php echo HTMLHelper::_('form.token'); ?>
</form>

View File

@ -0,0 +1,78 @@
<?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>

View File

@ -25,7 +25,7 @@ HTMLHelper::_('bootstrap.tooltip');
<form
action="<?php echo Route::_('index.php?option=com_circolari&layout=edit&id=' . (int) $this->item->id); ?>"
method="post" enctype="multipart/form-data" name="adminForm" id="circolare-form" class="form-validate form-horizontal">
method="post" enctype="multipart/form-data" name="adminForm" id="adminForm" class="form-validate" class="form-validate form-horizontal">
<?php echo HTMLHelper::_('uitab.startTabSet', 'myTab', array('active' => 'Circolari')); ?>
@ -36,7 +36,9 @@ HTMLHelper::_('bootstrap.tooltip');
<legend><?php echo Text::_('COM_CIRCOLARI_FIELDSET_CIRCOLARI'); ?></legend>
<?php echo $this->form->renderField('title'); ?>
<?php echo $this->form->renderField('alias'); ?>
<?php echo $this->form->renderField('catid'); ?>
<?php echo $this->form->renderField('categoria_id'); ?>
<?php echo $this->form->renderField('usergroup_id'); ?>
<?php echo $this->form->renderField('hits'); ?>
<?php echo $this->form->renderField('description'); ?>
<?php echo $this->form->renderField('attachment'); ?>
<?php echo $this->form->renderField('image'); ?>