aggiunta vista singola circolare
This commit is contained in:
26
site/tmpl/circolare/default.php
Normal file
26
site/tmpl/circolare/default.php
Normal 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>
|
||||
29
site/tmpl/circolare/default.xml
Normal file
29
site/tmpl/circolare/default.xml
Normal 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 l’Itemid -->
|
||||
<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>
|
||||
Reference in New Issue
Block a user