aggiunta vista singola circolare

This commit is contained in:
2025-08-26 11:18:54 +02:00
parent 1814530c64
commit edb8d4e873
6 changed files with 152 additions and 138 deletions

View File

@ -0,0 +1,26 @@
<?php
\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;
?>
<article class="com-content-article item-page">
<header class="page-header">
<h1 class="page-title"><?php echo htmlspecialchars($item->title ?: 'Circolare'); ?></h1>
</header>
<div class="article-body mt-3">
<?php echo $item->description ?: $item->testo ?: $item->descrizione ?: '<em>(Nessun testo)</em>'; ?>
</div>
<?php if (!empty($item->attachment)) : ?>
<p class="mt-3">
<a href="<?php echo htmlspecialchars($item->attachment); ?>" target="_blank" rel="noopener">
<?php echo Text::_('COM_CIRCOLARI_DOWNLOAD_ATTACHMENT') ?: 'Scarica allegato'; ?>
</a>
</p>
<?php endif; ?>
</article>

View File

@ -0,0 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<metadata>
<layout title="COM_CIRCOLARI_MENU_CIRCOLARE" option="com_circolari">
<help key="JHELP_MENUS_MENU_ITEM_GENERIC" />
</layout>
<!-- Parametri passati nella query -->
<fields name="request">
<fieldset name="request">
<!-- opzionale: se lo lasci vuoto userai la voce solo come “contenitore” per lItemid -->
<field name="id" type="number"
label="COM_CIRCOLARI_FIELD_ID_LABEL"
description="COM_CIRCOLARI_FIELD_ID_DESC"
required="false" />
<field name="view" type="hidden" default="circolare" />
</fieldset>
</fields>
<!-- Parametri pagina (avanzate) -->
<fields name="params">
<fieldset name="advanced" label="JGLOBAL_FIELDSET_ADVANCED">
<field name="page_title" type="text" label="JGLOBAL_TITLE" />
<field name="show_page_heading" type="radio" default="1" label="JGLOBAL_SHOW_PAGE_HEADING">
<option value="1">JYES</option>
<option value="0">JNO</option>
</field>
</fieldset>
</fields>
</metadata>