aggiunta firma circolari
This commit is contained in:
@ -1,67 +1,44 @@
|
||||
<?php
|
||||
// ... intestazione invariata ...
|
||||
\defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Language\Text;
|
||||
|
||||
/** @var \Pcrt\Component\Circolari\Site\View\Circolare\HtmlView $this */
|
||||
$item = $this->item;
|
||||
dump($item);
|
||||
|
||||
$buttons = $this->getModel()->getBottoniFirma((int)$item->tipologia_firma_id);
|
||||
dump($this->getModel()->currentUser);
|
||||
|
||||
// $listOrder / $listDirn / $filter già come li hai
|
||||
$Itemid = (int) ($input->getInt('Itemid') ?: 0);
|
||||
?>
|
||||
<form action="<?php echo htmlspecialchars(Uri::getInstance()->toString(), ENT_QUOTES, 'UTF-8'); ?>"
|
||||
method="post"
|
||||
name="adminForm"
|
||||
id="adminForm"
|
||||
class="com-content-category__articles">
|
||||
|
||||
<!-- filtro -->
|
||||
<!-- (invariato) -->
|
||||
<div class="container my-5 mega-container">
|
||||
|
||||
<!-- Limite per pagina -->
|
||||
<?php if ($pagination && \method_exists($pagination, 'getLimitBox')) : ?>
|
||||
<div class="com-content-category__pagination btn-group float-end">
|
||||
<label for="limit" class="visually-hidden"><?php echo Text::_('JGLOBAL_DISPLAY_NUM'); ?></label>
|
||||
<?php echo $pagination->getLimitBox(); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<!-- tabella -->
|
||||
<table class="com-content-category__table category table table-striped table-bordered table-hover mt-3">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col" id="circolari_header_title">
|
||||
<?php echo HTMLHelper::_('grid.sort', 'JGLOBAL_TITLE', 'c.title', $listDirn, $listOrder, null, 'asc', '', 'adminForm'); ?>
|
||||
</th>
|
||||
<th scope="col" id="circolari_header_date" class="small">
|
||||
<?php echo HTMLHelper::_('grid.sort', Text::_('JDATE'), 'c.created', $listDirn, $listOrder, null, 'asc', '', 'adminForm'); ?>
|
||||
</th>
|
||||
<th scope="col" id="circolari_header_attachment" class="text-center">
|
||||
<?php echo Text::_('COM_CIRCOLARI_ATTACHMENT') ?: 'Allegato'; ?>
|
||||
</th>
|
||||
<th scope="col" id="circolari_header_hits" class="text-end">
|
||||
<?php echo HTMLHelper::_('grid.sort', 'JGLOBAL_HITS', 'c.hits', $listDirn, $listOrder, null, 'asc', '', 'adminForm'); ?>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<!-- tbody invariato -->
|
||||
</table>
|
||||
|
||||
<!-- paginazione -->
|
||||
<?php if ($pagination && $pagination->pagesTotal > 1) : ?>
|
||||
<div class="com-content-category__navigation w-100">
|
||||
<p class="com-content-category__counter counter float-end pt-3 pe-2">
|
||||
<?php echo $pagination->getPagesCounter(); ?>
|
||||
</p>
|
||||
<div class="com-content-category__pagination">
|
||||
<?php echo $pagination->getPagesLinks(); ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<!-- hidden -->
|
||||
<div>
|
||||
<input type="hidden" name="option" value="com_circolari">
|
||||
<input type="hidden" name="view" value="circolari">
|
||||
<?php if ($Itemid) : ?><input type="hidden" name="Itemid" value="<?php echo $Itemid; ?>"><?php endif; ?>
|
||||
<input type="hidden" name="filter_order" value="<?php echo $listOrder; ?>">
|
||||
<input type="hidden" name="filter_order_Dir" value="<?php echo $listDirn; ?>">
|
||||
<input type="hidden" name="limitstart" value="<?php echo (int) ($pagination?->limitstart ?? 0); ?>">
|
||||
<?php echo HTMLHelper::_('form.token'); ?>
|
||||
<div class="row mb-4 align-items-end">
|
||||
<div class="col-md-9 col-12">
|
||||
<h1 class="h2 mb-1"><?= $this->escape($item->title); ?></h1>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
<div class="col-md-3 col-12 text-md-end mt-2 mt-md-0">
|
||||
<a href="#" class="small text-decoration-none text-uppercase fw-bold">Condividi</a>
|
||||
</div>
|
||||
|
||||
<?php if ( $item->firma_obbligatoria && !empty($buttons)) : ?>
|
||||
<div class="mt-4">
|
||||
<div class="d-flex flex-wrap gap-2">
|
||||
<?php foreach ($buttons as $btn) : ?>
|
||||
<button type="button" class="btn btn-primary btn-sm">
|
||||
<?php echo htmlspecialchars($btn->label, ENT_QUOTES, 'UTF-8'); ?>
|
||||
</button>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<div class="article-body mt-3">
|
||||
<?php echo $item->description ?: $item->testo ?: $item->descrizione ?: '<em>(Nessun testo)</em>'; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
Reference in New Issue
Block a user