primo commit

This commit is contained in:
2024-12-17 17:34:10 +01:00
commit e650f8df99
16435 changed files with 2451012 additions and 0 deletions

View File

@ -0,0 +1,255 @@
<?php
/**
* @package Joomla.Site
* @subpackage com_content
*
* @copyright (C) 2006 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
use Joomla\CMS\Factory;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Associations;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Layout\FileLayout;
use Joomla\CMS\Layout\LayoutHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Uri\Uri;
use Joomla\Component\Content\Administrator\Extension\ContentComponent;
use Joomla\Component\Content\Site\Helper\RouteHelper;
// Create shortcuts to some parameters.
$params = $this->item->params;
$canEdit = $params->get('access-edit');
$user = Factory::getUser();
$info = $params->get('info_block_position', 0);
$htag = $this->params->get('show_page_heading') ? 'h2' : 'h1';
// Check if associations are implemented. If they are, define the parameter.
$assocParam = (Associations::isEnabled() && $params->get('show_associations'));
$currentDate = Factory::getDate()->format('d-m-Y');
$isNotPublishedYet = $this->item->publish_up > $currentDate;
$isExpired = !is_null($this->item->publish_down) && $this->item->publish_down < $currentDate;
$fullimg = json_decode($this->item->images);
$pubblicazione = $this->item->publish_up;
$pubblicazione = Factory::getDate()->format('d.m.Y');
$revisione = $this->item->modified;
$revisione = Factory::getDate()->format('d.m.Y');
$urlcompleto = Uri::getInstance();
$config = JFactory::getConfig();
$nomesito = $config->get('sitename');
$baseImagePath= Uri::root(false) . "media/templates/site/joomla-italia-theme/images/";
?>
<div class="pagina-circolari greendark">
<section class="section bg-white py-2 py-lg-3 py-xl-5">
<div class="container">
<div class="row align-items-center">
<div class="col-auto d-none d-sm-block">
<div class="section-thumb-article mx-3">
<?php if ($fullimg->image_fulltext =='') {
?>
<figure><a href="<?php echo Route::_(RouteHelper::getArticleRoute($this->item->slug, $this->item->catid, $this->item->language)); ?>" itemprop="url" title="service-link"><img src="<?=$baseImagePath?>imgsegnaposto.jpg" class="img-fluid" alt="immagine-segnaposto"/></a></figure>
<?php
} else {
echo LayoutHelper::render('joomla.content.full_image', $this->item);
}
?>
</div>
</div>
<div class="ps-0 ps-lg-3 col col-lg-6 col-xl-7">
<?php // Content is generated by content plugin event "onContentBeforeDisplay"?>
<?php echo $this->item->event->beforeDisplayContent; ?>
<div class="section-title">
<h1 data-element="service-title" class="mb-3"><?php echo $this->escape($this->item->title); ?></h1>
<p data-element="service-description"><?php echo JHTML::_('string.truncate', $this->item->text, true, false, false) ; ?></p>
</div>
</div>
<div class="col-12 col-lg">
<?php if ($params->get('show_tags', 1) && !empty($this->item->tags->itemTags)) : ?>
<div class="argomenti-servizio mt-4">
<h2 class="h6">Argomenti</h2>
<div class="badges purplelight">
<?php $this->item->tagLayout = new FileLayout('joomla.content.tags'); ?>
<?php echo $this->item->tagLayout->render($this->item->tags->itemTags); ?>
</div>
</div>
<?php endif; ?>
</div>
</div>
</div>
</div>
</section>
<div class="border-row">
<div class="container">
<div class="row">
<div class="col-12 col-lg-3 p-0 pt-lg-2 mb-3">
<aside class="greendark aside-main aside-sticky mt-5">
<div class="actions-wrapper actions-main">
<a class="toggle-actions" href="#" title="Vedi azioni" data-bs-toggle="modal" data-bs-target="#modalaction">
<svg class="icon icon-xs">
<use xlink:href="<?= $baseImagePath ?>sprites.svg#it-more-items"></use>
</svg>
<span>Stampa / Condividi</span>
</a>
<div class="modal modal-actions fade no-print" tabindex="-1" role="dialog" id="modalaction" aria-labelledby="modalCenterTitle">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<button class="btn-close" type="button" data-bs-dismiss="modal" aria-label="Chiudi finestra modale">
<svg class="icon">
<use href="<?= $baseImagePath ?>sprites.svg#it-close"></use>
</svg>
</button>
</div>
<div class="modal-body">
<div class="link-list-wrapper">
<ul class="link-list ps-0 ms-0">
<li>
<a href="javascript:window.print();" class="list-item left-icon" title="Stampa il contenuto" data-focus-mouse="false">
<svg class="icon"><use href="<?= $baseImagePath ?>sprites.svg#it-print"></use></svg>
<span>Stampa</span>
</a>
</li>
<li>
<a href="mailto:?subject=<?php echo $this->escape($this->item->title); ?>&amp;body=<?php echo $urlcompleto ?>" class="list-item left-icon" title="Invia il contenuto">
<svg class="icon"><use href="<?= $baseImagePath ?>sprites.svg#it-mail"></use></svg>
<span>Invia</span>
</a>
</li>
<li>
<a class="list-item collapsed link-toggle" title="Condividi" href="#social-share" data-bs-toggle="collapse" aria-expanded="false" aria-controls="social-share" role="button" id="share-control">
<svg class="icon"><use href="<?= $baseImagePath ?>sprites.svg#it-share"></use></svg>
<span>Condividi</span>
<svg class="icon icon-right"><use href="<?= $baseImagePath ?>sprites.svg#it-expand"></use></svg>
</a>
<ul class="ps-0 link-sublist collapse" id="social-share" role="region" aria-labelledby="share-control">
<li>
<a class="list-item" href="https://www.facebook.com/sharer/sharer.php?u=<?php echo $urlcompleto ?>" title="Condividi su: Facebook" target="_blank">
<svg class="icon"><use href="<?= $baseImagePath ?>sprites.svg#it-facebook"></use></svg>
<span>Facebook</span>
</a>
</li>
<li>
<a class="list-item" href="http://twitter.com/share?text=<?php echo $this->escape($this->item->title); ?>&amp;url=<?php echo $urlcompleto ?>" title="Condividi su: Twitter" target="_blank">
<svg class="icon"><use href="<?= $baseImagePath ?>sprites.svg#it-twitter"></use></svg>
<span>Twitter</span>
</a>
</li>
<li>
<a class="list-item" href="https://www.linkedin.com/shareArticle?mini=true&amp;url=<?php echo $urlcompleto ?>&amp;title=<?php echo $this->escape($this->item->title); ?>&amp;source=<?php echo $nomesito?>" title="Condividi su: Linkedin" target="_blank">
<svg class="icon"><use href="<?= $baseImagePath ?>sprites.svg#it-linkedin"></use></svg>
<span>Linkedin</span>
</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
<div class="modal-footer">
<button class="py-1 px-3 btn btn-primary btn-sm" data-bs-dismiss="modal" type="button">Ok</button>
</div>
</div>
</div>
</div>
</div>
</aside>
</div>
<div class="col-12 col-lg-9 border-aside ps-lg-5 pt-0 py-lg-5">
<article class="article-wrapper redbrown <?php echo $this->pageclass_sfx; ?>" >
<?php
if (!empty($this->item->pagination) && !$this->item->paginationposition && $this->item->paginationrelative) {
echo $this->item->pagination;
}
?>
<?php $useDefList = $params->get('show_modify_date') || $params->get('show_publish_date') || $params->get('show_create_date')
|| $params->get('show_hits') || $params->get('show_category') || $params->get('show_parent_category') || $params->get('show_author') || $assocParam; ?>
<?php if ($canEdit) : ?>
<?php echo LayoutHelper::render('joomla.content.icons', ['params' => $params, 'item' => $this->item]); ?>
<?php endif; ?>
<?php // Content is generated by content plugin event "onContentAfterTitle"?>
<?php echo $this->item->event->afterDisplayTitle; ?>
<?php if ((int) $params->get('urls_position', 0) === 0) : ?>
<?php echo $this->loadTemplate('links'); ?>
<?php endif; ?>
<?php if ($params->get('access-view')) : ?>
<?php
if (!empty($this->item->pagination) && !$this->item->paginationposition && !$this->item->paginationrelative) :
echo $this->item->pagination;
endif;
?>
<?php if (isset($this->item->toc)) :
echo $this->item->toc;
endif; ?>
<?php if ($info == 1 || $info == 2) : ?>
<?php if ($useDefList) : ?>
<?php echo LayoutHelper::render('joomla.content.info_block', ['item' => $this->item, 'params' => $params, 'position' => 'below']); ?>
<?php endif; ?>
<?php endif; ?>
<?php
if (!empty($this->item->pagination) && $this->item->paginationposition && !$this->item->paginationrelative) :
echo $this->item->pagination;
?>
<?php endif; ?>
<?php if ((int) $params->get('urls_position', 0) === 1) : ?>
<?php echo $this->loadTemplate('links'); ?>
<?php endif; ?>
<?php // Optional teaser intro text for guests?>
<?php elseif ($params->get('show_noauth') == true && $user->get('guest')) : ?>
<?php echo LayoutHelper::render('joomla.content.intro_image', $this->item); ?>
<?php echo HTMLHelper::_('content.prepare', $this->item->introtext); ?>
<?php // Optional link to let them register to see the whole article.?>
<?php if ($params->get('show_readmore') && $this->item->fulltext != null) : ?>
<?php $menu = Factory::getApplication()->getMenu(); ?>
<?php $active = $menu->getActive(); ?>
<?php $itemId = $active->id; ?>
<?php $link = new Uri(Route::_('index.php?option=com_users&view=login&Itemid=' . $itemId, false)); ?>
<?php $link->setVar('return', base64_encode(RouteHelper::getArticleRoute($this->item->slug, $this->item->catid, $this->item->language))); ?>
<?php echo LayoutHelper::render('joomla.content.readmore', ['item' => $this->item, 'params' => $params, 'link' => $link]); ?>
<?php endif; ?>
<?php endif; ?>
<?php
if (!empty($this->item->pagination) && $this->item->paginationposition && $this->item->paginationrelative) :
echo $this->item->pagination;
?>
<?php endif; ?>
<?php // Content is generated by content plugin event "onContentAfterDisplay"?>
<?php echo $this->item->event->afterDisplayContent; ?>
<div class="meta-articolo" data-element="metadata"><small><strong>Pubblicato:</strong> <?php echo $pubblicazione ?> - <strong>Revisione:</strong> <?php echo $revisione ?></small></div>
</article>
</div>
</div>
</div>
</div>
</div>

View File

@ -0,0 +1,93 @@
<?php
/**
* @package Joomla.Site
* @subpackage com_content
*
* @copyright (C) 2011 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
use Joomla\CMS\HTML\HTMLHelper;
// Create shortcut
$urls = json_decode($this->item->urls);
// Create shortcuts to some parameters.
$params = $this->item->params;
if ($urls && (!empty($urls->urla) || !empty($urls->urlb) || !empty($urls->urlc))) :
?>
<div class="com-content-article__links content-links">
<ul class="com-content-article__links content-list">
<?php
$urlarray = [
[$urls->urla, $urls->urlatext, $urls->targeta, 'a'],
[$urls->urlb, $urls->urlbtext, $urls->targetb, 'b'],
[$urls->urlc, $urls->urlctext, $urls->targetc, 'c']
];
foreach ($urlarray as $url) :
$link = $url[0];
$label = $url[1];
$target = $url[2];
$id = $url[3];
if (! $link) :
continue;
endif;
// If no label is present, take the link
$label = $label ?: $link;
// If no target is present, use the default
$target = $target ?: $params->get('target' . $id);
?>
<li class="com-content-article__link content-links-<?php echo $id; ?>">
<?php
// Compute the correct link
switch ($target) {
case 1:
// Open in a new window
echo '<a href="' . htmlspecialchars($link, ENT_COMPAT, 'UTF-8') . '" target="_blank" rel="nofollow noopener noreferrer">' .
htmlspecialchars($label, ENT_COMPAT, 'UTF-8') . '</a>';
break;
case 2:
// Open in a popup window
$attribs = 'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=600,height=600';
echo "<a href=\"" . htmlspecialchars($link, ENT_COMPAT, 'UTF-8') . "\" onclick=\"window.open(this.href, 'targetWindow', '" . $attribs . "'); return false;\" rel=\"noopener noreferrer\">" .
htmlspecialchars($label, ENT_COMPAT, 'UTF-8') . '</a>';
break;
case 3:
echo '<a href="' . htmlspecialchars($link, ENT_COMPAT, 'UTF-8') . '" rel="noopener noreferrer" data-bs-toggle="modal" data-bs-target="#linkModal">' .
htmlspecialchars($label, ENT_COMPAT, 'UTF-8') . ' </a>';
echo HTMLHelper::_(
'bootstrap.renderModal',
'linkModal',
[
'url' => $link,
'title' => $label,
'height' => '100%',
'width' => '100%',
'modalWidth' => '500',
'bodyHeight' => '500',
'footer' => '<button type="button" class="btn btn-secondary" data-bs-dismiss="modal" aria-hidden="true">'
. \Joomla\CMS\Language\Text::_('JLIB_HTML_BEHAVIOR_CLOSE') . '</button>'
]
);
break;
default:
// Open in parent window
echo '<a href="' . htmlspecialchars($link, ENT_COMPAT, 'UTF-8') . '" rel="nofollow">' .
htmlspecialchars($label, ENT_COMPAT, 'UTF-8') . ' </a>';
break;
}
?>
</li>
<?php endforeach; ?>
</ul>
</div>
<?php endif; ?>

View File

@ -0,0 +1,154 @@
<?php
/**
* @package Joomla.Site
* @subpackage com_content
*
* @copyright (C) 2006 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
use Joomla\CMS\Factory;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Associations;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Layout\FileLayout;
use Joomla\CMS\Layout\LayoutHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Uri\Uri;
use Joomla\Component\Content\Administrator\Extension\ContentComponent;
use Joomla\Component\Content\Site\Helper\RouteHelper;
// Create shortcuts to some parameters.
$params = $this->item->params;
$canEdit = $params->get('access-edit');
$user = Factory::getUser();
$info = $params->get('info_block_position', 0);
$htag = $this->params->get('show_page_heading') ? 'h2' : 'h1';
// Check if associations are implemented. If they are, define the parameter.
$assocParam = (Associations::isEnabled() && $params->get('show_associations'));
$currentDate = Factory::getDate()->format('Y-m-d H:i:s');
$isNotPublishedYet = $this->item->publish_up > $currentDate;
$isExpired = !is_null($this->item->publish_down) && $this->item->publish_down < $currentDate;
?>
<div class="border-row">
<div class="container">
<div class="row">
<div class="col-12 col-lg-3 pe-0 pt-0 pt-lg-2 order-2 order-lg-1 mb-3">
<aside class="aside-main aside-sticky">
<?php echo JHtml::_('content.prepare', '{loadposition psl}'); ?>
</aside>
</div>
<div class="col-12 col-lg-9 border-aside ps-lg-5 pt-0 pt-lg-5 order-1 order-lg-2">
<div class="com-content-article item-page<?php echo $this->pageclass_sfx; ?>" itemscope itemtype="https://schema.org/Article">
<meta itemprop="inLanguage" content="<?php echo ($this->item->language === '*') ? Factory::getApplication()->get('language') : $this->item->language; ?>">
<?php
if (!empty($this->item->pagination) && !$this->item->paginationposition && $this->item->paginationrelative) {
echo $this->item->pagination;
}
?>
<?php $useDefList = $params->get('show_modify_date') || $params->get('show_publish_date') || $params->get('show_create_date')
|| $params->get('show_hits') || $params->get('show_category') || $params->get('show_parent_category') || $params->get('show_author') || $assocParam; ?>
<?php if ($params->get('show_title')) : ?>
<div class="page-header">
<h1 itemprop="headline">
<?php echo $this->escape($this->item->title); ?>
</h1>
<?php if ($this->item->state == ContentComponent::CONDITION_UNPUBLISHED) : ?>
<span class="badge bg-warning text-light"><?php echo Text::_('JUNPUBLISHED'); ?></span>
<?php endif; ?>
<?php if ($isNotPublishedYet) : ?>
<span class="badge bg-warning text-light"><?php echo Text::_('JNOTPUBLISHEDYET'); ?></span>
<?php endif; ?>
<?php if ($isExpired) : ?>
<span class="badge bg-warning text-light"><?php echo Text::_('JEXPIRED'); ?></span>
<?php endif; ?>
</div>
<?php endif; ?>
<?php if ($canEdit) : ?>
<?php echo LayoutHelper::render('joomla.content.icons', ['params' => $params, 'item' => $this->item]); ?>
<?php endif; ?>
<?php // Content is generated by content plugin event "onContentAfterTitle"?>
<?php echo $this->item->event->afterDisplayTitle; ?>
<?php if ($useDefList && ($info == 0 || $info == 2)) : ?>
<?php echo LayoutHelper::render('joomla.content.info_block', ['item' => $this->item, 'params' => $params, 'position' => 'above']); ?>
<?php endif; ?>
<?php if ($info == 0 && $params->get('show_tags', 1) && !empty($this->item->tags->itemTags)) : ?>
<?php $this->item->tagLayout = new FileLayout('joomla.content.tags'); ?>
<?php echo $this->item->tagLayout->render($this->item->tags->itemTags); ?>
<?php endif; ?>
<?php // Content is generated by content plugin event "onContentBeforeDisplay"?>
<?php echo $this->item->event->beforeDisplayContent; ?>
<?php if ((int) $params->get('urls_position', 0) === 0) : ?>
<?php echo $this->loadTemplate('links'); ?>
<?php endif; ?>
<?php if ($params->get('access-view')) : ?>
<?php echo LayoutHelper::render('joomla.content.full_image', $this->item); ?>
<?php
if (!empty($this->item->pagination) && !$this->item->paginationposition && !$this->item->paginationrelative) :
echo $this->item->pagination;
endif;
?>
<?php if (isset($this->item->toc)) :
echo $this->item->toc;
endif; ?>
<div itemprop="articleBody" class="com-content-article__body">
<?php echo $this->item->text; ?>
</div>
<?php if ($info == 1 || $info == 2) : ?>
<?php if ($useDefList) : ?>
<?php echo LayoutHelper::render('joomla.content.info_block', ['item' => $this->item, 'params' => $params, 'position' => 'below']); ?>
<?php endif; ?>
<?php if ($params->get('show_tags', 1) && !empty($this->item->tags->itemTags)) : ?>
<?php $this->item->tagLayout = new FileLayout('joomla.content.tags'); ?>
<?php echo $this->item->tagLayout->render($this->item->tags->itemTags); ?>
<?php endif; ?>
<?php endif; ?>
<?php
if (!empty($this->item->pagination) && $this->item->paginationposition && !$this->item->paginationrelative) :
echo $this->item->pagination;
?>
<?php endif; ?>
<?php if ((int) $params->get('urls_position', 0) === 1) : ?>
<?php echo $this->loadTemplate('links'); ?>
<?php endif; ?>
<?php // Optional teaser intro text for guests?>
<?php elseif ($params->get('show_noauth') == true && $user->get('guest')) : ?>
<?php echo LayoutHelper::render('joomla.content.intro_image', $this->item); ?>
<?php echo HTMLHelper::_('content.prepare', $this->item->introtext); ?>
<?php // Optional link to let them register to see the whole article.?>
<?php if ($params->get('show_readmore') && $this->item->fulltext != null) : ?>
<?php $menu = Factory::getApplication()->getMenu(); ?>
<?php $active = $menu->getActive(); ?>
<?php $itemId = $active->id; ?>
<?php $link = new Uri(Route::_('index.php?option=com_users&view=login&Itemid=' . $itemId, false)); ?>
<?php $link->setVar('return', base64_encode(RouteHelper::getArticleRoute($this->item->slug, $this->item->catid, $this->item->language))); ?>
<?php echo LayoutHelper::render('joomla.content.readmore', ['item' => $this->item, 'params' => $params, 'link' => $link]); ?>
<?php endif; ?>
<?php endif; ?>
<?php
if (!empty($this->item->pagination) && $this->item->paginationposition && $this->item->paginationrelative) :
echo $this->item->pagination;
?>
<?php endif; ?>
<?php // Content is generated by content plugin event "onContentAfterDisplay"?>
<?php echo $this->item->event->afterDisplayContent; ?>
</div>
</div>
</div>
</div>
</div>

View File

@ -0,0 +1,93 @@
<?php
/**
* @package Joomla.Site
* @subpackage com_content
*
* @copyright (C) 2011 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
use Joomla\CMS\HTML\HTMLHelper;
// Create shortcut
$urls = json_decode($this->item->urls);
// Create shortcuts to some parameters.
$params = $this->item->params;
if ($urls && (!empty($urls->urla) || !empty($urls->urlb) || !empty($urls->urlc))) :
?>
<div class="com-content-article__links content-links">
<ul class="com-content-article__links content-list">
<?php
$urlarray = [
[$urls->urla, $urls->urlatext, $urls->targeta, 'a'],
[$urls->urlb, $urls->urlbtext, $urls->targetb, 'b'],
[$urls->urlc, $urls->urlctext, $urls->targetc, 'c']
];
foreach ($urlarray as $url) :
$link = $url[0];
$label = $url[1];
$target = $url[2];
$id = $url[3];
if (! $link) :
continue;
endif;
// If no label is present, take the link
$label = $label ?: $link;
// If no target is present, use the default
$target = $target ?: $params->get('target' . $id);
?>
<li class="com-content-article__link content-links-<?php echo $id; ?>">
<?php
// Compute the correct link
switch ($target) {
case 1:
// Open in a new window
echo '<a href="' . htmlspecialchars($link, ENT_COMPAT, 'UTF-8') . '" target="_blank" rel="nofollow noopener noreferrer">' .
htmlspecialchars($label, ENT_COMPAT, 'UTF-8') . '</a>';
break;
case 2:
// Open in a popup window
$attribs = 'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=600,height=600';
echo "<a href=\"" . htmlspecialchars($link, ENT_COMPAT, 'UTF-8') . "\" onclick=\"window.open(this.href, 'targetWindow', '" . $attribs . "'); return false;\" rel=\"noopener noreferrer\">" .
htmlspecialchars($label, ENT_COMPAT, 'UTF-8') . '</a>';
break;
case 3:
echo '<a href="' . htmlspecialchars($link, ENT_COMPAT, 'UTF-8') . '" rel="noopener noreferrer" data-bs-toggle="modal" data-bs-target="#linkModal">' .
htmlspecialchars($label, ENT_COMPAT, 'UTF-8') . ' </a>';
echo HTMLHelper::_(
'bootstrap.renderModal',
'linkModal',
[
'url' => $link,
'title' => $label,
'height' => '100%',
'width' => '100%',
'modalWidth' => '500',
'bodyHeight' => '500',
'footer' => '<button type="button" class="btn btn-secondary" data-bs-dismiss="modal" aria-hidden="true">'
. \Joomla\CMS\Language\Text::_('JLIB_HTML_BEHAVIOR_CLOSE') . '</button>'
]
);
break;
default:
// Open in parent window
echo '<a href="' . htmlspecialchars($link, ENT_COMPAT, 'UTF-8') . '" rel="nofollow">' .
htmlspecialchars($label, ENT_COMPAT, 'UTF-8') . ' </a>';
break;
}
?>
</li>
<?php endforeach; ?>
</ul>
</div>
<?php endif; ?>

View File

@ -0,0 +1,253 @@
<?php
/**
* @package Joomla.Site
* @subpackage com_content
*
* @copyright (C) 2006 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
use Joomla\CMS\Factory;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Associations;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Layout\FileLayout;
use Joomla\CMS\Layout\LayoutHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Uri\Uri;
use Joomla\Component\Content\Administrator\Extension\ContentComponent;
use Joomla\Component\Content\Site\Helper\RouteHelper;
// Create shortcuts to some parameters.
$params = $this->item->params;
$canEdit = $params->get('access-edit');
$user = Factory::getUser();
$info = $params->get('info_block_position', 0);
$htag = $this->params->get('show_page_heading') ? 'h2' : 'h1';
// Check if associations are implemented. If they are, define the parameter.
$assocParam = (Associations::isEnabled() && $params->get('show_associations'));
$currentDate = Factory::getDate()->format('d-m-Y');
$isNotPublishedYet = $this->item->publish_up > $currentDate;
$isExpired = !is_null($this->item->publish_down) && $this->item->publish_down < $currentDate;
$fullimg = json_decode($this->item->images);
$pubblicazione = $this->item->publish_up;
$pubblicazione = Factory::getDate()->format('d.m.Y');
$revisione = $this->item->modified;
$revisione = Factory::getDate()->format('d.m.Y');;
$urlcompleto = Uri::getInstance();
$config = JFactory::getConfig();
$nomesito = $config->get('sitename');
$baseImagePath = Uri::root(false) . "media/templates/site/joomla-italia-theme/images/";
?>
<!--
<?php //if ($fullimg->image_fulltext !=''): ?>
<section class="section bg-white py-5 position-relative d-block d-lg-flex align-items-center overflow-hidden section-hero">
<div class="title-img" style="background-image: url('<?php //echo $fullimg->image_fulltext; ?>');"></div>
<div class="container">
<div class="row align-items-center">
<div class="col-md-5">
<div class="hero-title">
<h1><?php //echo $this->escape($this->item->title); ?></h1>
</div>
</div>
</div>
</div>
</section>
<?php //else: ?>
<section class="section bg-white py-5">
<div class="container">
<h1><?php //echo $this->escape($this->item->title); ?></h1>
</div>
</section>
<?php //endif; ?>
-->
<div class="pagina-default">
<div class="">
<div class="container">
<div class="row px-3">
<div class="col-12 col-lg-9">
<section class="accauno-title pb-3 mb-4">
<h1><?php echo $this->escape($this->item->title); ?></h1>
</section>
<article class="article-wrapper">
<?php
if (!empty($this->item->pagination) && !$this->item->paginationposition && $this->item->paginationrelative) {
echo $this->item->pagination;
}
?>
<?php $useDefList = $params->get('show_modify_date') || $params->get('show_publish_date') || $params->get('show_create_date')
|| $params->get('show_hits') || $params->get('show_category') || $params->get('show_parent_category') || $params->get('show_author') || $assocParam; ?>
<?php if ($canEdit) : ?>
<?php echo LayoutHelper::render('joomla.content.icons', ['params' => $params, 'item' => $this->item]); ?>
<?php endif; ?>
<?php // Content is generated by content plugin event "onContentAfterTitle"?>
<?php echo $this->item->event->afterDisplayTitle; ?>
<?php if ($useDefList && ($info == 0 || $info == 2)) : ?>
<?php echo LayoutHelper::render('joomla.content.info_block', ['item' => $this->item, 'params' => $params, 'position' => 'above']); ?>
<?php endif; ?>
<?php // Content is generated by content plugin event "onContentBeforeDisplay"?>
<?php echo $this->item->event->beforeDisplayContent; ?>
<?php echo $this->item->text ?>
<?php if ((int) $params->get('urls_position', 0) === 0) : ?>
<?php echo $this->loadTemplate('links'); ?>
<?php endif; ?>
<?php if ($params->get('access-view')) : ?>
<?php
if (!empty($this->item->pagination) && !$this->item->paginationposition && !$this->item->paginationrelative) :
echo $this->item->pagination;
endif;
?>
<?php if (isset($this->item->toc)) :
echo $this->item->toc;
endif; ?>
<?php if ($info == 1 || $info == 2) : ?>
<?php if ($useDefList) : ?>
<?php echo LayoutHelper::render('joomla.content.info_block', ['item' => $this->item, 'params' => $params, 'position' => 'below']); ?>
<?php endif; ?>
<?php endif; ?>
<?php
if (!empty($this->item->pagination) && $this->item->paginationposition && !$this->item->paginationrelative) :
echo $this->item->pagination;
?>
<?php endif; ?>
<?php if ((int) $params->get('urls_position', 0) === 1) : ?>
<?php echo $this->loadTemplate('links'); ?>
<?php endif; ?>
<?php // Optional teaser intro text for guests?>
<?php elseif ($params->get('show_noauth') == true && $user->get('guest')) : ?>
<?php echo LayoutHelper::render('joomla.content.intro_image', $this->item); ?>
<?php echo HTMLHelper::_('content.prepare', $this->item->introtext); ?>
<?php // Optional link to let them register to see the whole article.?>
<?php if ($params->get('show_readmore') && $this->item->fulltext != null) : ?>
<?php $menu = Factory::getApplication()->getMenu(); ?>
<?php $active = $menu->getActive(); ?>
<?php $itemId = $active->id; ?>
<?php $link = new Uri(Route::_('index.php?option=com_users&view=login&Itemid=' . $itemId, false)); ?>
<?php $link->setVar('return', base64_encode(RouteHelper::getArticleRoute($this->item->slug, $this->item->catid, $this->item->language))); ?>
<?php echo LayoutHelper::render('joomla.content.readmore', ['item' => $this->item, 'params' => $params, 'link' => $link]); ?>
<?php endif; ?>
<?php endif; ?>
<?php
if (!empty($this->item->pagination) && $this->item->paginationposition && $this->item->paginationrelative) :
echo $this->item->pagination;
?>
<?php endif; ?>
<?php // Content is generated by content plugin event "onContentAfterDisplay"?>
<?php echo $this->item->event->afterDisplayContent; ?>
</article>
</div>
<div class="col-12 col-lg-3 p-0 pt-lg-2 mb-3">
<aside class="aside-main aside-sticky mt-5 ms-4 ms-lg-0">
<div class="actions-wrapper actions-main">
<a class="toggle-actions" href="#" title="Vedi azioni" data-bs-toggle="modal" data-bs-target="#modalaction">
<svg class="icon icon-xs">
<use xlink:href="<?= $baseImagePath ?>sprites.svg#it-more-items"></use>
</svg>
<span>Stampa / Condividi</span>
</a>
<div class="modal modal-actions fade no-print" tabindex="-1" role="dialog" id="modalaction" aria-labelledby="modalCenterTitle">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<button class="btn-close" type="button" data-bs-dismiss="modal" aria-label="Chiudi finestra modale">
<svg class="icon">
<use href="<?= $baseImagePath ?>sprites.svg#it-close"></use>
</svg>
</button>
</div>
<div class="modal-body">
<div class="link-list-wrapper">
<ul class="link-list ps-0 ms-0">
<li>
<a href="javascript:window.print();" class="list-item left-icon" title="Stampa il contenuto" data-focus-mouse="false">
<svg class="icon"><use href="<?= $baseImagePath ?>sprites.svg#it-print"></use></svg>
<span>Stampa</span>
</a>
</li>
<li>
<a href="mailto:?subject=<?php echo $this->escape($this->item->title); ?>&amp;body=<?php echo $urlcompleto ?>" class="list-item left-icon" title="Invia il contenuto">
<svg class="icon"><use href="<?= $baseImagePath ?>sprites.svg#it-mail"></use></svg>
<span>Invia</span>
</a>
</li>
<li>
<a class="list-item collapsed link-toggle" title="Condividi" href="#social-share" data-bs-toggle="collapse" aria-expanded="false" aria-controls="social-share" role="button" id="share-control">
<svg class="icon"><use href="<?= $baseImagePath ?>sprites.svg#it-share"></use></svg>
<span>Condividi</span>
<svg class="icon icon-right"><use href="<?= $baseImagePath ?>sprites.svg#it-expand"></use></svg>
</a>
<ul class="ps-0 link-sublist collapse" id="social-share" role="region" aria-labelledby="share-control">
<li>
<a class="list-item" href="https://www.facebook.com/sharer/sharer.php?u=<?php echo $urlcompleto ?>" title="Condividi su: Facebook" target="_blank">
<svg class="icon"><use href="<?= $baseImagePath ?>sprites.svg#it-facebook"></use></svg>
<span>Facebook</span>
</a>
</li>
<li>
<a class="list-item" href="http://twitter.com/share?text=<?php echo $this->escape($this->item->title); ?>&amp;url=<?php echo $urlcompleto ?>" title="Condividi su: Twitter" target="_blank">
<svg class="icon"><use href="<?= $baseImagePath ?>sprites.svg#it-twitter"></use></svg>
<span>Twitter</span>
</a>
</li>
<li>
<a class="list-item" href="https://www.linkedin.com/shareArticle?mini=true&amp;url=<?php echo $urlcompleto ?>&amp;title=<?php echo $this->escape($this->item->title); ?>&amp;source=<?php echo $nomesito?>" title="Condividi su: Linkedin" target="_blank">
<svg class="icon"><use href="<?= $baseImagePath ?>sprites.svg#it-linkedin"></use></svg>
<span>Linkedin</span>
</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
<div class="modal-footer">
<button class="py-1 px-3 btn btn-primary btn-sm" data-bs-dismiss="modal" type="button">Ok</button>
</div>
</div>
</div>
</div>
</div>
<?php if ($params->get('show_tags', 1) && !empty($this->item->tags->itemTags)) : ?>
<div class="argomenti-section px-4 mt-5">
<h2 class="h6">Argomenti</h2>
<div class="badges">
<?php $this->item->tagLayout = new FileLayout('joomla.content.tags'); ?>
<?php echo $this->item->tagLayout->render($this->item->tags->itemTags); ?>
</div>
</div>
<?php endif; ?>
<?= JHtml::_('content.prepare', '{loadposition right}'); ?>
</aside>
</div>
</div>
</div>
</div>
</div>

View File

@ -0,0 +1,93 @@
<?php
/**
* @package Joomla.Site
* @subpackage com_content
*
* @copyright (C) 2011 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
use Joomla\CMS\HTML\HTMLHelper;
// Create shortcut
$urls = json_decode($this->item->urls);
// Create shortcuts to some parameters.
$params = $this->item->params;
if ($urls && (!empty($urls->urla) || !empty($urls->urlb) || !empty($urls->urlc))) :
?>
<div class="com-content-article__links content-links">
<ul class="com-content-article__links content-list">
<?php
$urlarray = [
[$urls->urla, $urls->urlatext, $urls->targeta, 'a'],
[$urls->urlb, $urls->urlbtext, $urls->targetb, 'b'],
[$urls->urlc, $urls->urlctext, $urls->targetc, 'c']
];
foreach ($urlarray as $url) :
$link = $url[0];
$label = $url[1];
$target = $url[2];
$id = $url[3];
if (! $link) :
continue;
endif;
// If no label is present, take the link
$label = $label ?: $link;
// If no target is present, use the default
$target = $target ?: $params->get('target' . $id);
?>
<li class="com-content-article__link content-links-<?php echo $id; ?>">
<?php
// Compute the correct link
switch ($target) {
case 1:
// Open in a new window
echo '<a href="' . htmlspecialchars($link, ENT_COMPAT, 'UTF-8') . '" target="_blank" rel="nofollow noopener noreferrer">' .
htmlspecialchars($label, ENT_COMPAT, 'UTF-8') . '</a>';
break;
case 2:
// Open in a popup window
$attribs = 'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=600,height=600';
echo "<a href=\"" . htmlspecialchars($link, ENT_COMPAT, 'UTF-8') . "\" onclick=\"window.open(this.href, 'targetWindow', '" . $attribs . "'); return false;\" rel=\"noopener noreferrer\">" .
htmlspecialchars($label, ENT_COMPAT, 'UTF-8') . '</a>';
break;
case 3:
echo '<a href="' . htmlspecialchars($link, ENT_COMPAT, 'UTF-8') . '" rel="noopener noreferrer" data-bs-toggle="modal" data-bs-target="#linkModal">' .
htmlspecialchars($label, ENT_COMPAT, 'UTF-8') . ' </a>';
echo HTMLHelper::_(
'bootstrap.renderModal',
'linkModal',
[
'url' => $link,
'title' => $label,
'height' => '100%',
'width' => '100%',
'modalWidth' => '500',
'bodyHeight' => '500',
'footer' => '<button type="button" class="btn btn-secondary" data-bs-dismiss="modal" aria-hidden="true">'
. \Joomla\CMS\Language\Text::_('JLIB_HTML_BEHAVIOR_CLOSE') . '</button>'
]
);
break;
default:
// Open in parent window
echo '<a href="' . htmlspecialchars($link, ENT_COMPAT, 'UTF-8') . '" rel="nofollow">' .
htmlspecialchars($label, ENT_COMPAT, 'UTF-8') . ' </a>';
break;
}
?>
</li>
<?php endforeach; ?>
</ul>
</div>
<?php endif; ?>

View File

@ -0,0 +1,93 @@
<?php
/**
* @package Joomla.Site
* @subpackage com_content
*
* @copyright (C) 2011 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
use Joomla\CMS\HTML\HTMLHelper;
// Create shortcut
$urls = json_decode($this->item->urls);
// Create shortcuts to some parameters.
$params = $this->item->params;
if ($urls && (!empty($urls->urla) || !empty($urls->urlb) || !empty($urls->urlc))) :
?>
<div class="com-content-article__links content-links">
<ul class="com-content-article__links content-list">
<?php
$urlarray = [
[$urls->urla, $urls->urlatext, $urls->targeta, 'a'],
[$urls->urlb, $urls->urlbtext, $urls->targetb, 'b'],
[$urls->urlc, $urls->urlctext, $urls->targetc, 'c']
];
foreach ($urlarray as $url) :
$link = $url[0];
$label = $url[1];
$target = $url[2];
$id = $url[3];
if (! $link) :
continue;
endif;
// If no label is present, take the link
$label = $label ?: $link;
// If no target is present, use the default
$target = $target ?: $params->get('target' . $id);
?>
<li class="com-content-article__link content-links-<?php echo $id; ?>">
<?php
// Compute the correct link
switch ($target) {
case 1:
// Open in a new window
echo '<a href="' . htmlspecialchars($link, ENT_COMPAT, 'UTF-8') . '" target="_blank" rel="nofollow noopener noreferrer">' .
htmlspecialchars($label, ENT_COMPAT, 'UTF-8') . '</a>';
break;
case 2:
// Open in a popup window
$attribs = 'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=600,height=600';
echo "<a href=\"" . htmlspecialchars($link, ENT_COMPAT, 'UTF-8') . "\" onclick=\"window.open(this.href, 'targetWindow', '" . $attribs . "'); return false;\" rel=\"noopener noreferrer\">" .
htmlspecialchars($label, ENT_COMPAT, 'UTF-8') . '</a>';
break;
case 3:
echo '<a href="' . htmlspecialchars($link, ENT_COMPAT, 'UTF-8') . '" rel="noopener noreferrer" data-bs-toggle="modal" data-bs-target="#linkModal">' .
htmlspecialchars($label, ENT_COMPAT, 'UTF-8') . ' </a>';
echo HTMLHelper::_(
'bootstrap.renderModal',
'linkModal',
[
'url' => $link,
'title' => $label,
'height' => '100%',
'width' => '100%',
'modalWidth' => '500',
'bodyHeight' => '500',
'footer' => '<button type="button" class="btn btn-secondary" data-bs-dismiss="modal" aria-hidden="true">'
. \Joomla\CMS\Language\Text::_('JLIB_HTML_BEHAVIOR_CLOSE') . '</button>'
]
);
break;
default:
// Open in parent window
echo '<a href="' . htmlspecialchars($link, ENT_COMPAT, 'UTF-8') . '" rel="nofollow">' .
htmlspecialchars($label, ENT_COMPAT, 'UTF-8') . ' </a>';
break;
}
?>
</li>
<?php endforeach; ?>
</ul>
</div>
<?php endif; ?>

View File

@ -0,0 +1,279 @@
<?php
/**
* @package Joomla.Site
* @subpackage com_content
*
* @copyright (C) 2006 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
use Joomla\CMS\Factory;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Associations;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Layout\FileLayout;
use Joomla\CMS\Layout\LayoutHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Uri\Uri;
use Joomla\Component\Content\Administrator\Extension\ContentComponent;
use Joomla\Component\Content\Site\Helper\RouteHelper;
// Create shortcuts to some parameters.
$params = $this->item->params;
$canEdit = $params->get('access-edit');
$user = Factory::getUser();
$info = $params->get('info_block_position', 0);
$htag = $this->params->get('show_page_heading') ? 'h2' : 'h1';
// Check if associations are implemented. If they are, define the parameter.
$assocParam = (Associations::isEnabled() && $params->get('show_associations'));
$currentDate = Factory::getDate()->format('d-m-Y');
$isNotPublishedYet = $this->item->publish_up > $currentDate;
$isExpired = !is_null($this->item->publish_down) && $this->item->publish_down < $currentDate;
$fullimg = json_decode($this->item->images);
$pubblicazione = $this->item->publish_up;
$pubblicazione = Factory::getDate()->format('d.m.Y');
$revisione = $this->item->modified;
$revisione = Factory::getDate()->format('d.m.Y');
;
$urlcompleto = Uri::getInstance();
$config = JFactory::getConfig();
$nomesito = $config->get('sitename');
$baseImagePath= Uri::root(false) . "media/templates/site/joomla-italia-theme/images/";
?>
<div class="pagina-scuola redbrown">
<section class="section bg-white py-2 py-lg-3 py-xl-5">
<div class="container">
<div class="row align-items-center">
<div class="col-auto d-none d-sm-block">
<div class="section-thumb-article mx-3">
<?php if($fullimg->image_fulltext =='') { ?>
<figure><a href="<?php echo Route::_(RouteHelper::getArticleRoute($this->item->slug, $this->item->catid, $this->item->language)); ?>" itemprop="url" title="service-link"><img src="<?= $baseImagePath ?>imgsegnaposto.jpg" class="img-fluid" alt="immagine-segnaposto"/></a></figure>
<?php } else {
echo LayoutHelper::render('joomla.content.full_image', $this->item);
}
?>
</div>
</div>
<div class="ps-0 ps-lg-3 col col-lg-6 col-xl-7">
<div class="section-title">
<h1 data-element="service-title" class="mb-3"><?php echo $this->escape($this->item->title); ?></h1>
<p data-element="service-description"><?php echo JHTML::_('string.truncate', $this->item->text, true, false, false) ; ?></p>
</div>
</div>
<div class="col-12 col-lg">
<div class="actions-wrapper actions-main">
<a class="toggle-actions" href="#" title="Vedi azioni" data-bs-toggle="modal" data-bs-target="#modalaction">
<svg class="icon icon-xs">
<use xlink:href="<?= $baseImagePath ?>sprites.svg#it-more-items"></use>
</svg>
<span>Stampa / Condividi</span>
</a>
<div class="modal modal-actions fade no-print" tabindex="-1" role="dialog" id="modalaction" aria-labelledby="modalCenterTitle">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<button class="btn-close" type="button" data-bs-dismiss="modal" aria-label="Chiudi finestra modale">
<svg class="icon">
<use href="<?= $baseImagePath ?>sprites.svg#it-close"></use>
</svg>
</button>
</div>
<div class="modal-body">
<div class="link-list-wrapper">
<ul class="link-list ps-0 ms-0">
<li>
<a href="javascript:window.print();" class="list-item left-icon" title="Stampa il contenuto" data-focus-mouse="false">
<svg class="icon"><use href="<?= $baseImagePath ?>sprites.svg#it-print"></use></svg>
<span>Stampa</span>
</a>
</li>
<li>
<a href="mailto:?subject=<?php echo $this->escape($this->item->title); ?>&amp;body=<?php echo $urlcompleto ?>" class="list-item left-icon" title="Invia il contenuto">
<svg class="icon"><use href="<?= $baseImagePath ?>sprites.svg#it-mail"></use></svg>
<span>Invia</span>
</a>
</li>
<li>
<a class="list-item collapsed link-toggle" title="Condividi" href="#social-share" data-bs-toggle="collapse" aria-expanded="false" aria-controls="social-share" role="button" id="share-control">
<svg class="icon"><use href="<?= $baseImagePath ?>sprites.svg#it-share"></use></svg>
<span>Condividi</span>
<svg class="icon icon-right"><use href="<?= $baseImagePath ?>sprites.svg#it-expand"></use></svg>
</a>
<ul class="ps-0 link-sublist collapse" id="social-share" role="region" aria-labelledby="share-control">
<li>
<a class="list-item" href="https://www.facebook.com/sharer/sharer.php?u=<?php echo $urlcompleto ?>" title="Condividi su: Facebook" target="_blank">
<svg class="icon"><use href="<?= $baseImagePath ?>sprites.svg#it-facebook"></use></svg>
<span>Facebook</span>
</a>
</li>
<li>
<a class="list-item" href="http://twitter.com/share?text=<?php echo $this->escape($this->item->title); ?>&amp;url=<?php echo $urlcompleto ?>" title="Condividi su: Twitter" target="_blank">
<svg class="icon"><use href="<?= $baseImagePath ?>sprites.svg#it-twitter"></use></svg>
<span>Twitter</span>
</a>
</li>
<li>
<a class="list-item" href="https://www.linkedin.com/shareArticle?mini=true&amp;url=<?php echo $urlcompleto ?>&amp;title=<?php echo $this->escape($this->item->title); ?>&amp;source=<?php echo $nomesito?>" title="Condividi su: Linkedin" target="_blank">
<svg class="icon"><use href="<?= $baseImagePath ?>sprites.svg#it-linkedin"></use></svg>
<span>Linkedin</span>
</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
<div class="modal-footer">
<button class="py-1 px-3 btn btn-primary btn-sm" data-bs-dismiss="modal" type="button">Ok</button>
</div>
</div>
</div>
</div>
</div>
<?php if ($params->get('show_tags', 1) && !empty($this->item->tags->itemTags)) : ?>
<div class="argomenti-servizio mt-4">
<h2 class="h6">Argomenti</h2>
<div class="badges purplelight">
<?php $this->item->tagLayout = new FileLayout('joomla.content.tags'); ?>
<?php echo $this->item->tagLayout->render($this->item->tags->itemTags); ?>
</div>
</div>
<?php endif; ?>
</div>
</div>
</div>
</div>
</section>
<div class="border-row">
<div class="container">
<div class="row">
<div class="col-12 col-lg-3 p-0 pt-lg-2 mb-3">
<aside class="redbrown aside-main aside-sticky" id="page-index">
<div class="aside-title" id="page-index">
<a class="toggle-link-list" data-bs-toggle="collapse" href="#lista-paragrafi" role="button" aria-expanded="false" aria-controls="lista-paragrafi" aria-label="apri / chiudi indice della pagina">
<span>Indice della pagina</span>
<svg class="icon icon-toggle"><use href="<?= $baseImagePath ?>sprites.svg#it-expand"></use></svg>
</a>
</div>
<div id="lista-paragrafi" class="link-list-wrapper collapse show" role="region" aria-labelledby="page-index">
<ul class="link-list" data-element="page-index">
<?php
JLoader::register('FieldsHelper', JPATH_ADMINISTRATOR . '/components/com_fields/helpers/fields.php');
JModelLegacy::addIncludePath(JPATH_SITE. '/components/com_content/models', 'ContentModel');
$id = JFactory::getApplication()->input->get('id');
$model = JModelLegacy::getInstance('Article', 'ContentModel', array('ignore_request'=>true));
$appParams = JFactory::getApplication()->getParams();
$model->setState('params', $appParams);
$item = $model->getItem($id);
$jcFields = FieldsHelper::getFields('com_content.article', $item, true);
?>
<?php foreach($jcFields as $jcField) { ?>
<?php if ($jcField->value !='') { ?>
<li><a href="#art-par-<?php echo $jcField->id; ?>" aria-label="Vai al paragrafo <?php echo $jcField->title; ?>" data-focus-mouse="false"><?php echo $jcField->title; ?></a></li>
<?php } ?>
<?php } ?>
</ul>
</div>
</aside>
</div>
<div class="col-12 col-lg-9 border-aside ps-lg-5 pt-0 py-lg-5">
<article class="article-wrapper redbrown <?php echo $this->pageclass_sfx; ?>" >
<?php
if (!empty($this->item->pagination) && !$this->item->paginationposition && $this->item->paginationrelative) {
echo $this->item->pagination;
}
?>
<?php $useDefList = $params->get('show_modify_date') || $params->get('show_publish_date') || $params->get('show_create_date')
|| $params->get('show_hits') || $params->get('show_category') || $params->get('show_parent_category') || $params->get('show_author') || $assocParam; ?>
<?php if ($canEdit) : ?>
<?php echo LayoutHelper::render('joomla.content.icons', ['params' => $params, 'item' => $this->item]); ?>
<?php endif; ?>
<?php // Content is generated by content plugin event "onContentAfterTitle"?>
<?php echo $this->item->event->afterDisplayTitle; ?>
<?php // Content is generated by content plugin event "onContentBeforeDisplay"?>
<?php echo $this->item->event->beforeDisplayContent; ?>
<?php if ((int) $params->get('urls_position', 0) === 0) : ?>
<?php echo $this->loadTemplate('links'); ?>
<?php endif; ?>
<?php if ($params->get('access-view')) : ?>
<?php
if (!empty($this->item->pagination) && !$this->item->paginationposition && !$this->item->paginationrelative) :
echo $this->item->pagination;
endif;
?>
<?php if (isset($this->item->toc)) :
echo $this->item->toc;
endif; ?>
<?php if ($info == 1 || $info == 2) : ?>
<?php if ($useDefList) : ?>
<?php echo LayoutHelper::render('joomla.content.info_block', ['item' => $this->item, 'params' => $params, 'position' => 'below']); ?>
<?php endif; ?>
<?php endif; ?>
<?php
if (!empty($this->item->pagination) && $this->item->paginationposition && !$this->item->paginationrelative) :
echo $this->item->pagination;
?>
<?php endif; ?>
<?php if ((int) $params->get('urls_position', 0) === 1) : ?>
<?php echo $this->loadTemplate('links'); ?>
<?php endif; ?>
<?php // Optional teaser intro text for guests?>
<?php elseif ($params->get('show_noauth') == true && $user->get('guest')) : ?>
<?php echo LayoutHelper::render('joomla.content.intro_image', $this->item); ?>
<?php echo HTMLHelper::_('content.prepare', $this->item->introtext); ?>
<?php // Optional link to let them register to see the whole article.?>
<?php if ($params->get('show_readmore') && $this->item->fulltext != null) : ?>
<?php $menu = Factory::getApplication()->getMenu(); ?>
<?php $active = $menu->getActive(); ?>
<?php $itemId = $active->id; ?>
<?php $link = new Uri(Route::_('index.php?option=com_users&view=login&Itemid=' . $itemId, false)); ?>
<?php $link->setVar('return', base64_encode(RouteHelper::getArticleRoute($this->item->slug, $this->item->catid, $this->item->language))); ?>
<?php echo LayoutHelper::render('joomla.content.readmore', ['item' => $this->item, 'params' => $params, 'link' => $link]); ?>
<?php endif; ?>
<?php endif; ?>
<?php
if (!empty($this->item->pagination) && $this->item->paginationposition && $this->item->paginationrelative) :
echo $this->item->pagination;
?>
<?php endif; ?>
<?php // Content is generated by content plugin event "onContentAfterDisplay"?>
<?php echo $this->item->event->afterDisplayContent; ?>
<div class="meta-articolo" data-element="metadata"><small><strong>Pubblicato:</strong> <?php echo $pubblicazione ?> - <strong>Revisione:</strong> <?php echo $revisione ?></small></div>
</article>
</div>
</div>
</div>
</div>
</div>

View File

@ -0,0 +1,93 @@
<?php
/**
* @package Joomla.Site
* @subpackage com_content
*
* @copyright (C) 2011 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
use Joomla\CMS\HTML\HTMLHelper;
// Create shortcut
$urls = json_decode($this->item->urls);
// Create shortcuts to some parameters.
$params = $this->item->params;
if ($urls && (!empty($urls->urla) || !empty($urls->urlb) || !empty($urls->urlc))) :
?>
<div class="com-content-article__links content-links">
<ul class="com-content-article__links content-list">
<?php
$urlarray = [
[$urls->urla, $urls->urlatext, $urls->targeta, 'a'],
[$urls->urlb, $urls->urlbtext, $urls->targetb, 'b'],
[$urls->urlc, $urls->urlctext, $urls->targetc, 'c']
];
foreach ($urlarray as $url) :
$link = $url[0];
$label = $url[1];
$target = $url[2];
$id = $url[3];
if (! $link) :
continue;
endif;
// If no label is present, take the link
$label = $label ?: $link;
// If no target is present, use the default
$target = $target ?: $params->get('target' . $id);
?>
<li class="com-content-article__link content-links-<?php echo $id; ?>">
<?php
// Compute the correct link
switch ($target) {
case 1:
// Open in a new window
echo '<a href="' . htmlspecialchars($link, ENT_COMPAT, 'UTF-8') . '" target="_blank" rel="nofollow noopener noreferrer">' .
htmlspecialchars($label, ENT_COMPAT, 'UTF-8') . '</a>';
break;
case 2:
// Open in a popup window
$attribs = 'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=600,height=600';
echo "<a href=\"" . htmlspecialchars($link, ENT_COMPAT, 'UTF-8') . "\" onclick=\"window.open(this.href, 'targetWindow', '" . $attribs . "'); return false;\" rel=\"noopener noreferrer\">" .
htmlspecialchars($label, ENT_COMPAT, 'UTF-8') . '</a>';
break;
case 3:
echo '<a href="' . htmlspecialchars($link, ENT_COMPAT, 'UTF-8') . '" rel="noopener noreferrer" data-bs-toggle="modal" data-bs-target="#linkModal">' .
htmlspecialchars($label, ENT_COMPAT, 'UTF-8') . ' </a>';
echo HTMLHelper::_(
'bootstrap.renderModal',
'linkModal',
[
'url' => $link,
'title' => $label,
'height' => '100%',
'width' => '100%',
'modalWidth' => '500',
'bodyHeight' => '500',
'footer' => '<button type="button" class="btn btn-secondary" data-bs-dismiss="modal" aria-hidden="true">'
. \Joomla\CMS\Language\Text::_('JLIB_HTML_BEHAVIOR_CLOSE') . '</button>'
]
);
break;
default:
// Open in parent window
echo '<a href="' . htmlspecialchars($link, ENT_COMPAT, 'UTF-8') . '" rel="nofollow">' .
htmlspecialchars($label, ENT_COMPAT, 'UTF-8') . ' </a>';
break;
}
?>
</li>
<?php endforeach; ?>
</ul>
</div>
<?php endif; ?>

View File

@ -0,0 +1,278 @@
<?php
/**
* @package Joomla.Site
* @subpackage com_content
*
* @copyright (C) 2006 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
use Joomla\CMS\Factory;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Associations;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Layout\FileLayout;
use Joomla\CMS\Layout\LayoutHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Uri\Uri;
use Joomla\Component\Content\Administrator\Extension\ContentComponent;
use Joomla\Component\Content\Site\Helper\RouteHelper;
// Create shortcuts to some parameters.
$params = $this->item->params;
$canEdit = $params->get('access-edit');
$user = Factory::getUser();
$info = $params->get('info_block_position', 0);
$htag = $this->params->get('show_page_heading') ? 'h2' : 'h1';
// Check if associations are implemented. If they are, define the parameter.
$assocParam = (Associations::isEnabled() && $params->get('show_associations'));
$currentDate = Factory::getDate()->format('d-m-Y');
$isNotPublishedYet = $this->item->publish_up > $currentDate;
$isExpired = !is_null($this->item->publish_down) && $this->item->publish_down < $currentDate;
$fullimg = json_decode($this->item->images);
$pubblicazione = $this->item->publish_up;
$pubblicazione = Factory::getDate()->format('d.m.Y');
$revisione = $this->item->modified;
$revisione = Factory::getDate()->format('d.m.Y');;
$urlcompleto = Uri::getInstance();
$config = JFactory::getConfig();
$nomesito = $config->get( 'sitename' );
$baseImagePath = Uri::root(false) . "media/templates/site/joomla-italia-theme/images/";
?>
<section class="section bg-white py-5 position-relative d-block d-lg-flex align-items-center overflow-hidden section-hero">
<?php if($fullimg->image_fulltext !=''): ?>
<div class="title-img" style="background-image: url('<?php echo $fullimg->image_fulltext; ?>');"></div>
<?php else: ?>
<div class="title-img bg-greendark bg-greendarkgradient d-none d-md-block">
<svg width="100%" height="100%" viewBox="0 0 726 360" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;"><g id="Group" opacity="0.32"><path id="Rectangle" d="M627.751,245.625l-396.368,-193.321l-193.322,396.368l396.368,193.321l193.322,-396.368Z" style="fill:url(#_Linear1);"></path><path id="Rectangle1" serif:id="Rectangle" d="M583.359,-179.506l-264.865,159.147l159.147,264.865l264.865,-159.147l-159.147,-264.865Z" style="fill:url(#_Linear2);"></path><path id="Rectangle2" serif:id="Rectangle" d="M210.182,-54.565l-213.341,33.79l33.79,213.34l213.341,-33.79l-33.79,-213.34Z" style="fill:url(#_Linear3);"></path></g><defs><linearGradient id="_Linear1" x1="0" y1="0" x2="1" y2="0" gradientUnits="userSpaceOnUse" gradientTransform="matrix(203.046,589.69,-589.69,203.046,231.383,52.3035)"><stop offset="0" style="stop-color:#0f842e;stop-opacity:1"></stop><stop offset="1" style="stop-color:#00838f;stop-opacity:1"></stop></linearGradient><linearGradient id="_Linear2" x1="0" y1="0" x2="1" y2="0" gradientUnits="userSpaceOnUse" gradientTransform="matrix(344.438,-26.7144,26.7144,344.438,398.068,112.073)"><stop offset="0" style="stop-color:#0e8a5f;stop-opacity:1"></stop><stop offset="1" style="stop-color:#00838f;stop-opacity:1"></stop></linearGradient><linearGradient id="_Linear3" x1="0" y1="0" x2="1" y2="0" gradientUnits="userSpaceOnUse" gradientTransform="matrix(230.236,72.8805,-72.8805,230.236,13.7359,85.8949)"><stop offset="0" style="stop-color:#0e8a5f;stop-opacity:1"></stop><stop offset="1" style="stop-color:#00838f;stop-opacity:1"></stop></linearGradient></defs>
</svg>
</div>
<?php endif; ?>
<div class="container">
<div class="row align-items-center">
<div class="col-md-5">
<div class="hero-title">
<h1><?php echo $this->escape($this->item->title); ?></h1>
<p><?php echo JHTML::_('string.truncate', $this->item->text, true, false, false) ; ?></p>
</div>
<?php if ($params->get('show_tags', 1) && !empty($this->item->tags->itemTags)) : ?>
<div class="argomenti-section px-4 mt-5">
<h2 class="h6">Argomenti</h2>
<div class="badges greenlight">
<?php $this->item->tagLayout = new FileLayout('joomla.content.tags'); ?>
<?php echo $this->item->tagLayout->render($this->item->tags->itemTags); ?>
</div>
</div>
<?php endif; ?>
</div>
</div>
</div>
</section>
<div class="pagina-eventi greendark">
<div class="border-row">
<div class="container">
<div class="row">
<div class="col-12 col-lg-3 p-0 pt-lg-2 mb-3">
<aside class="greendark aside-main aside-sticky" id="page-index">
<div class="aside-title" id="page-index">
<a class="toggle-link-list" data-bs-toggle="collapse" href="#lista-paragrafi" role="button" aria-expanded="false" aria-controls="lista-paragrafi" aria-label="apri / chiudi indice della pagina">
<span>Indice della pagina</span>
<svg class="icon icon-toggle"><use href="<?= $baseImagePath ?>sprites.svg#it-expand"></use></svg>
</a>
</div>
<div id="lista-paragrafi" class="link-list-wrapper collapse show" role="region" aria-labelledby="page-index">
<ul class="link-list" data-element="page-index">
<?php
JLoader::register('FieldsHelper', JPATH_ADMINISTRATOR . '/components/com_fields/helpers/fields.php');
JModelLegacy::addIncludePath(JPATH_SITE. '/components/com_content/models', 'ContentModel');
$id = JFactory::getApplication()->input->get('id');
$model = JModelLegacy::getInstance('Article', 'ContentModel', array('ignore_request'=>true));
$appParams = JFactory::getApplication()->getParams();
$model->setState('params', $appParams);
$item = $model->getItem($id);
$jcFields = FieldsHelper::getFields('com_content.article', $item, true);
?>
<?php foreach($jcFields as $jcField) { ?>
<?php if ($jcField->value !=''){ ?>
<li><a href="#art-par-<?php echo $jcField->id; ?>" aria-label="Vai al paragrafo <?php echo $jcField->title; ?>" data-focus-mouse="false"><?php echo $jcField->title; ?></a></li>
<?php } ?>
<?php } ?>
</ul>
</div>
</aside>
</div>
<div class="col-12 col-lg-9 border-aside ps-lg-5 pt-0 py-lg-5">
<div class="row variable-gutters">
<div class="col-lg-12 d-flex justify-content-end">
<div class="actions-wrapper actions-main">
<a class="toggle-actions" href="#" title="Vedi azioni" data-bs-toggle="modal" data-bs-target="#modalaction">
<svg class="icon icon-xs">
<use xlink:href="<?= $baseImagePath ?>sprites.svg#it-more-items"></use>
</svg>
<span>Stampa / Condividi</span>
</a>
<div class="modal modal-actions fade no-print" tabindex="-1" role="dialog" id="modalaction" aria-labelledby="modalCenterTitle">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<button class="btn-close" type="button" data-bs-dismiss="modal" aria-label="Chiudi finestra modale">
<svg class="icon">
<use href="<?= $baseImagePath ?>sprites.svg#it-close"></use>
</svg>
</button>
</div>
<div class="modal-body">
<div class="link-list-wrapper">
<ul class="link-list ps-0 ms-0">
<li>
<a href="javascript:window.print();" class="list-item left-icon" title="Stampa il contenuto" data-focus-mouse="false">
<svg class="icon"><use href="<?= $baseImagePath ?>sprites.svg#it-print"></use></svg>
<span>Stampa</span>
</a>
</li>
<li>
<a href="mailto:?subject=<?php echo $this->escape($this->item->title); ?>&amp;body=<?php echo $urlcompleto ?>" class="list-item left-icon" title="Invia il contenuto">
<svg class="icon"><use href="<?= $baseImagePath ?>sprites.svg#it-mail"></use></svg>
<span>Invia</span>
</a>
</li>
<li>
<a class="list-item collapsed link-toggle" title="Condividi" href="#social-share" data-bs-toggle="collapse" aria-expanded="false" aria-controls="social-share" role="button" id="share-control">
<svg class="icon"><use href="<?= $baseImagePath ?>sprites.svg#it-share"></use></svg>
<span>Condividi</span>
<svg class="icon icon-right"><use href="<?= $baseImagePath ?>sprites.svg#it-expand"></use></svg>
</a>
<ul class="ps-0 link-sublist collapse" id="social-share" role="region" aria-labelledby="share-control">
<li>
<a class="list-item" href="https://www.facebook.com/sharer/sharer.php?u=<?php echo $urlcompleto ?>" title="Condividi su: Facebook" target="_blank">
<svg class="icon"><use href="<?= $baseImagePath ?>sprites.svg#it-facebook"></use></svg>
<span>Facebook</span>
</a>
</li>
<li>
<a class="list-item" href="http://twitter.com/share?text=<?php echo $this->escape($this->item->title); ?>&amp;url=<?php echo $urlcompleto ?>" title="Condividi su: Twitter" target="_blank">
<svg class="icon"><use href="<?= $baseImagePath ?>sprites.svg#it-twitter"></use></svg>
<span>Twitter</span>
</a>
</li>
<li>
<a class="list-item" href="https://www.linkedin.com/shareArticle?mini=true&amp;url=<?php echo $urlcompleto ?>&amp;title=<?php echo $this->escape($this->item->title); ?>&amp;source=<?php echo $nomesito?>" title="Condividi su: Linkedin" target="_blank">
<svg class="icon"><use href="<?= $baseImagePath ?>sprites.svg#it-linkedin"></use></svg>
<span>Linkedin</span>
</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
<div class="modal-footer">
<button class="py-1 px-3 btn btn-primary btn-sm" data-bs-dismiss="modal" type="button">Ok</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<article class="article-wrapper redbrown <?php echo $this->pageclass_sfx; ?>" >
<?php
if (!empty($this->item->pagination) && !$this->item->paginationposition && $this->item->paginationrelative) {
echo $this->item->pagination;
}
?>
<?php $useDefList = $params->get('show_modify_date') || $params->get('show_publish_date') || $params->get('show_create_date')
|| $params->get('show_hits') || $params->get('show_category') || $params->get('show_parent_category') || $params->get('show_author') || $assocParam; ?>
<?php if ($canEdit) : ?>
<?php echo LayoutHelper::render('joomla.content.icons', ['params' => $params, 'item' => $this->item]); ?>
<?php endif; ?>
<?php // Content is generated by content plugin event "onContentAfterTitle" ?>
<?php echo $this->item->event->afterDisplayTitle; ?>
<?php // Content is generated by content plugin event "onContentBeforeDisplay" ?>
<?php if ((int) $params->get('urls_position', 0) === 0) : ?>
<?php echo $this->loadTemplate('links'); ?>
<?php endif; ?>
<?php if ($params->get('access-view')) : ?>
<?php
if (!empty($this->item->pagination) && !$this->item->paginationposition && !$this->item->paginationrelative) :
echo $this->item->pagination;
endif;
?>
<?php if (isset($this->item->toc)) :
echo $this->item->toc;
endif; ?>
<?php if ($info == 1 || $info == 2) : ?>
<?php if ($useDefList) : ?>
<?php echo LayoutHelper::render('joomla.content.info_block', ['item' => $this->item, 'params' => $params, 'position' => 'below']); ?>
<?php endif; ?>
<?php endif; ?>
<?php
if (!empty($this->item->pagination) && $this->item->paginationposition && !$this->item->paginationrelative) :
echo $this->item->pagination;
?>
<?php endif; ?>
<?php if ((int) $params->get('urls_position', 0) === 1) : ?>
<?php echo $this->loadTemplate('links'); ?>
<?php endif; ?>
<?php // Optional teaser intro text for guests ?>
<?php elseif ($params->get('show_noauth') == true && $user->get('guest')) : ?>
<?php echo LayoutHelper::render('joomla.content.intro_image', $this->item); ?>
<?php echo HTMLHelper::_('content.prepare', $this->item->introtext); ?>
<?php // Optional link to let them register to see the whole article. ?>
<?php if ($params->get('show_readmore') && $this->item->fulltext != null) : ?>
<?php $menu = Factory::getApplication()->getMenu(); ?>
<?php $active = $menu->getActive(); ?>
<?php $itemId = $active->id; ?>
<?php $link = new Uri(Route::_('index.php?option=com_users&view=login&Itemid=' . $itemId, false)); ?>
<?php $link->setVar('return', base64_encode(RouteHelper::getArticleRoute($this->item->slug, $this->item->catid, $this->item->language))); ?>
<?php echo LayoutHelper::render('joomla.content.readmore', ['item' => $this->item, 'params' => $params, 'link' => $link]); ?>
<?php endif; ?>
<?php endif; ?>
<?php
if (!empty($this->item->pagination) && $this->item->paginationposition && $this->item->paginationrelative) :
echo $this->item->pagination;
?>
<?php endif; ?>
<?php // Content is generated by content plugin event "onContentAfterDisplay" ?>
<?php echo $this->item->event->afterDisplayContent; ?>
<div class="meta-articolo" data-element="metadata"><small><strong>Pubblicato:</strong> <?php echo $pubblicazione ?> - <strong>Revisione:</strong> <?php echo $revisione ?></small></div>
</article>
</div>
</div>
</div>
</div>
</div>

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,93 @@
<?php
/**
* @package Joomla.Site
* @subpackage com_content
*
* @copyright (C) 2011 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
use Joomla\CMS\HTML\HTMLHelper;
// Create shortcut
$urls = json_decode($this->item->urls);
// Create shortcuts to some parameters.
$params = $this->item->params;
if ($urls && (!empty($urls->urla) || !empty($urls->urlb) || !empty($urls->urlc))) :
?>
<div class="com-content-article__links content-links">
<ul class="com-content-article__links content-list">
<?php
$urlarray = [
[$urls->urla, $urls->urlatext, $urls->targeta, 'a'],
[$urls->urlb, $urls->urlbtext, $urls->targetb, 'b'],
[$urls->urlc, $urls->urlctext, $urls->targetc, 'c']
];
foreach ($urlarray as $url) :
$link = $url[0];
$label = $url[1];
$target = $url[2];
$id = $url[3];
if (! $link) :
continue;
endif;
// If no label is present, take the link
$label = $label ?: $link;
// If no target is present, use the default
$target = $target ?: $params->get('target' . $id);
?>
<li class="com-content-article__link content-links-<?php echo $id; ?>">
<?php
// Compute the correct link
switch ($target) {
case 1:
// Open in a new window
echo '<a href="' . htmlspecialchars($link, ENT_COMPAT, 'UTF-8') . '" target="_blank" rel="nofollow noopener noreferrer">' .
htmlspecialchars($label, ENT_COMPAT, 'UTF-8') . '</a>';
break;
case 2:
// Open in a popup window
$attribs = 'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=600,height=600';
echo "<a href=\"" . htmlspecialchars($link, ENT_COMPAT, 'UTF-8') . "\" onclick=\"window.open(this.href, 'targetWindow', '" . $attribs . "'); return false;\" rel=\"noopener noreferrer\">" .
htmlspecialchars($label, ENT_COMPAT, 'UTF-8') . '</a>';
break;
case 3:
echo '<a href="' . htmlspecialchars($link, ENT_COMPAT, 'UTF-8') . '" rel="noopener noreferrer" data-bs-toggle="modal" data-bs-target="#linkModal">' .
htmlspecialchars($label, ENT_COMPAT, 'UTF-8') . ' </a>';
echo HTMLHelper::_(
'bootstrap.renderModal',
'linkModal',
[
'url' => $link,
'title' => $label,
'height' => '100%',
'width' => '100%',
'modalWidth' => '500',
'bodyHeight' => '500',
'footer' => '<button type="button" class="btn btn-secondary" data-bs-dismiss="modal" aria-hidden="true">'
. \Joomla\CMS\Language\Text::_('JLIB_HTML_BEHAVIOR_CLOSE') . '</button>'
]
);
break;
default:
// Open in parent window
echo '<a href="' . htmlspecialchars($link, ENT_COMPAT, 'UTF-8') . '" rel="nofollow">' .
htmlspecialchars($label, ENT_COMPAT, 'UTF-8') . ' </a>';
break;
}
?>
</li>
<?php endforeach; ?>
</ul>
</div>
<?php endif; ?>

View File

@ -0,0 +1,176 @@
<?php
/**
* @package Joomla.Site
* @subpackage com_content
*
* @copyright (C) 2006 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
use Joomla\CMS\Factory;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Associations;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Layout\FileLayout;
use Joomla\CMS\Layout\LayoutHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Uri\Uri;
use Joomla\Component\Content\Administrator\Extension\ContentComponent;
use Joomla\Component\Content\Site\Helper\RouteHelper;
// Create shortcuts to some parameters.
$params = $this->item->params;
$canEdit = $params->get('access-edit');
$user = Factory::getUser();
$info = $params->get('info_block_position', 0);
$htag = $this->params->get('show_page_heading') ? 'h2' : 'h1';
// Check if associations are implemented. If they are, define the parameter.
$assocParam = (Associations::isEnabled() && $params->get('show_associations'));
$currentDate = Factory::getDate()->format('Y-m-d H:i:s');
$isNotPublishedYet = $this->item->publish_up > $currentDate;
$isExpired = !is_null($this->item->publish_down) && $this->item->publish_down < $currentDate;
/*if ($this->item->title == 'Licenza dei contenuti'){
$valid_titolo_note_legali = 'data-element="legal-notes-section"';
}*/
?>
<div class="border-row">
<div class="container">
<div class="row">
<div class="col-12 mt-5">
<div class="com-content-article item-page<?php echo $this->pageclass_sfx; ?>" itemscope itemtype="https://schema.org/Article">
<?php
if (!empty($this->item->pagination) && !$this->item->paginationposition && $this->item->paginationrelative) {
echo $this->item->pagination;
}
?>
<?php $useDefList = $params->get('show_modify_date') || $params->get('show_publish_date') || $params->get('show_create_date')
|| $params->get('show_hits') || $params->get('show_category') || $params->get('show_parent_category') || $params->get('show_author') || $assocParam; ?>
<?php if ($params->get('show_title')) : ?>
<div class="page-header">
<?php if ($this->item->title == 'Licenza dei contenuti'){ ?>
<h1 data-element="legal-notes-section"><?php echo $this->escape($this->item->title); ?></h1>
<?php } else { ?>
<h1><?php echo $this->escape($this->item->title); ?></h1>
<?php } ?>
<?php if ($this->item->state == ContentComponent::CONDITION_UNPUBLISHED) : ?>
<span class="badge bg-warning text-light"><?php echo Text::_('JUNPUBLISHED'); ?></span>
<?php endif; ?>
<?php if ($isNotPublishedYet) : ?>
<span class="badge bg-warning text-light"><?php echo Text::_('JNOTPUBLISHEDYET'); ?></span>
<?php endif; ?>
<?php if ($isExpired) : ?>
<span class="badge bg-warning text-light"><?php echo Text::_('JEXPIRED'); ?></span>
<?php endif; ?>
</div>
<?php endif; ?>
<?php if ($canEdit) : ?>
<?php echo LayoutHelper::render('joomla.content.icons', ['params' => $params, 'item' => $this->item]); ?>
<?php endif; ?>
<?php // Content is generated by content plugin event "onContentAfterTitle" ?>
<?php echo $this->item->event->afterDisplayTitle; ?>
<?php if ($useDefList && ($info == 0 || $info == 2)) : ?>
<?php echo LayoutHelper::render('joomla.content.info_block', ['item' => $this->item, 'params' => $params, 'position' => 'above']); ?>
<?php endif; ?>
<?php if ($info == 0 && $params->get('show_tags', 1) && !empty($this->item->tags->itemTags)) : ?>
<?php $this->item->tagLayout = new FileLayout('joomla.content.tags'); ?>
<?php echo $this->item->tagLayout->render($this->item->tags->itemTags); ?>
<?php endif; ?>
<?php // Content is generated by content plugin event "onContentBeforeDisplay" ?>
<?php echo $this->item->event->beforeDisplayContent; ?>
<?php if ((int) $params->get('urls_position', 0) === 0) : ?>
<?php echo $this->loadTemplate('links'); ?>
<?php endif; ?>
<?php if ($params->get('access-view')) : ?>
<?php echo LayoutHelper::render('joomla.content.full_image', $this->item); ?>
<?php
if (!empty($this->item->pagination) && !$this->item->paginationposition && !$this->item->paginationrelative) :
echo $this->item->pagination;
endif;
?>
<?php if (isset($this->item->toc)) :
echo $this->item->toc;
endif; ?>
<div itemprop="articleBody" class="com-content-article__body">
<?php
if ($this->item->title = 'Licenza dei contenuti'){
$descrizione = $this->item->text;
$dom = new DOMDocument('1.0','UTF-8');
$dom->loadHTML(mb_convert_encoding($descrizione, 'HTML-ENTITIES', "UTF-8"));
//$dom->loadHTML(mb_convert_encoding($descrizione, 'HTML-ENTITIES', "UTF-8"), LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD);
$xpath = new DOMXPath($dom);
$tags = $xpath->evaluate("//p");
foreach ($tags as $tag) {
$tag->setAttribute("data-element", "legal-notes-body");
}
$descrizione = $dom->saveHTML();
echo $descrizione;
}else{
echo $this->item->text;
}
?>
</div>
<?php if ($info == 1 || $info == 2) : ?>
<?php if ($useDefList) : ?>
<?php echo LayoutHelper::render('joomla.content.info_block', ['item' => $this->item, 'params' => $params, 'position' => 'below']); ?>
<?php endif; ?>
<?php if ($params->get('show_tags', 1) && !empty($this->item->tags->itemTags)) : ?>
<?php $this->item->tagLayout = new FileLayout('joomla.content.tags'); ?>
<?php echo $this->item->tagLayout->render($this->item->tags->itemTags); ?>
<?php endif; ?>
<?php endif; ?>
<?php
if (!empty($this->item->pagination) && $this->item->paginationposition && !$this->item->paginationrelative) :
echo $this->item->pagination;
?>
<?php endif; ?>
<?php if ((int) $params->get('urls_position', 0) === 1) : ?>
<?php echo $this->loadTemplate('links'); ?>
<?php endif; ?>
<?php // Optional teaser intro text for guests ?>
<?php elseif ($params->get('show_noauth') == true && $user->get('guest')) : ?>
<?php echo LayoutHelper::render('joomla.content.intro_image', $this->item); ?>
<?php echo HTMLHelper::_('content.prepare', $this->item->introtext); ?>
<?php // Optional link to let them register to see the whole article. ?>
<?php if ($params->get('show_readmore') && $this->item->fulltext != null) : ?>
<?php $menu = Factory::getApplication()->getMenu(); ?>
<?php $active = $menu->getActive(); ?>
<?php $itemId = $active->id; ?>
<?php $link = new Uri(Route::_('index.php?option=com_users&view=login&Itemid=' . $itemId, false)); ?>
<?php $link->setVar('return', base64_encode(RouteHelper::getArticleRoute($this->item->slug, $this->item->catid, $this->item->language))); ?>
<?php echo LayoutHelper::render('joomla.content.readmore', ['item' => $this->item, 'params' => $params, 'link' => $link]); ?>
<?php endif; ?>
<?php endif; ?>
<?php
if (!empty($this->item->pagination) && $this->item->paginationposition && $this->item->paginationrelative) :
echo $this->item->pagination;
?>
<?php endif; ?>
<?php // Content is generated by content plugin event "onContentAfterDisplay" ?>
<?php echo $this->item->event->afterDisplayContent; ?>
</div>
</div>
</div>
</div>
</div>

View File

@ -0,0 +1,249 @@
<?php
/**
* @package Joomla.Site
* @subpackage com_content
*
* @copyright (C) 2006 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
use Joomla\CMS\Factory;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Associations;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Layout\FileLayout;
use Joomla\CMS\Layout\LayoutHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Uri\Uri;
use Joomla\Component\Content\Administrator\Extension\ContentComponent;
use Joomla\Component\Content\Site\Helper\RouteHelper;
// Create shortcuts to some parameters.
$params = $this->item->params;
$canEdit = $params->get('access-edit');
$user = Factory::getUser();
$info = $params->get('info_block_position', 0);
$htag = $this->params->get('show_page_heading') ? 'h2' : 'h1';
// Check if associations are implemented. If they are, define the parameter.
$assocParam = (Associations::isEnabled() && $params->get('show_associations'));
$currentDate = Factory::getDate()->format('d-m-Y');
$isNotPublishedYet = $this->item->publish_up > $currentDate;
$isExpired = !is_null($this->item->publish_down) && $this->item->publish_down < $currentDate;
$fullimg = json_decode($this->item->images);
$pubblicazione = $this->item->publish_up;
$pubblicazione = Factory::getDate()->format('d.m.Y');
$revisione = $this->item->modified;
$revisione = Factory::getDate()->format('d.m.Y');;
$urlcompleto = Uri::getInstance();
$config = JFactory::getConfig();
$nomesito = $config->get( 'sitename' );
$baseImagePath = Uri::root(false) . "media/templates/site/joomla-italia-theme/images/";
?>
<section class="section bg-white py-5 position-relative d-block d-lg-flex align-items-center overflow-hidden section-hero">
<?php if($fullimg->image_fulltext !=''): ?>
<div class="title-img" style="background-image: url('<?php echo $fullimg->image_fulltext; ?>');"></div>
<?php else: ?>
<div class="title-img bg-greendark bg-greendarkgradient d-none d-md-block">
<svg width="100%" height="100%" viewBox="0 0 726 360" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;"><g id="Group" opacity="0.32"><path id="Rectangle" d="M627.751,245.625l-396.368,-193.321l-193.322,396.368l396.368,193.321l193.322,-396.368Z" style="fill:url(#_Linear1);"></path><path id="Rectangle1" serif:id="Rectangle" d="M583.359,-179.506l-264.865,159.147l159.147,264.865l264.865,-159.147l-159.147,-264.865Z" style="fill:url(#_Linear2);"></path><path id="Rectangle2" serif:id="Rectangle" d="M210.182,-54.565l-213.341,33.79l33.79,213.34l213.341,-33.79l-33.79,-213.34Z" style="fill:url(#_Linear3);"></path></g><defs><linearGradient id="_Linear1" x1="0" y1="0" x2="1" y2="0" gradientUnits="userSpaceOnUse" gradientTransform="matrix(203.046,589.69,-589.69,203.046,231.383,52.3035)"><stop offset="0" style="stop-color:#0f842e;stop-opacity:1"></stop><stop offset="1" style="stop-color:#00838f;stop-opacity:1"></stop></linearGradient><linearGradient id="_Linear2" x1="0" y1="0" x2="1" y2="0" gradientUnits="userSpaceOnUse" gradientTransform="matrix(344.438,-26.7144,26.7144,344.438,398.068,112.073)"><stop offset="0" style="stop-color:#0e8a5f;stop-opacity:1"></stop><stop offset="1" style="stop-color:#00838f;stop-opacity:1"></stop></linearGradient><linearGradient id="_Linear3" x1="0" y1="0" x2="1" y2="0" gradientUnits="userSpaceOnUse" gradientTransform="matrix(230.236,72.8805,-72.8805,230.236,13.7359,85.8949)"><stop offset="0" style="stop-color:#0e8a5f;stop-opacity:1"></stop><stop offset="1" style="stop-color:#00838f;stop-opacity:1"></stop></linearGradient></defs>
</svg>
</div>
<?php endif; ?>
<div class="container">
<div class="row align-items-center">
<div class="col-md-5">
<div class="hero-title">
<h1><?php echo $this->escape($this->item->title); ?></h1>
<p><?php echo JHTML::_('string.truncate', $this->item->text, true, false, false) ; ?></p>
</div>
<?php if ($params->get('show_tags', 1) && !empty($this->item->tags->itemTags)) : ?>
<div class="argomenti-section px-4 mt-5">
<h2 class="h6">Argomenti</h2>
<div class="badges greenlight">
<?php $this->item->tagLayout = new FileLayout('joomla.content.tags'); ?>
<?php echo $this->item->tagLayout->render($this->item->tags->itemTags); ?>
</div>
</div>
<?php endif; ?>
</div>
</div>
</div>
</section>
<div class="pagina-novita greendark">
<div class="border-row">
<div class="container">
<div class="row">
<div class="col-12 col-lg-3 p-0 pt-lg-2 mb-3">
<aside class="greendark aside-main aside-sticky mt-5 ms-4 ms-lg-0">
<div class="actions-wrapper actions-main">
<a class="toggle-actions" href="#" title="Vedi azioni" data-bs-toggle="modal" data-bs-target="#modalaction">
<svg class="icon icon-xs">
<use xlink:href="<?= $baseImagePath ?>sprites.svg#it-more-items"></use>
</svg>
<span>Stampa / Condividi</span>
</a>
<div class="modal modal-actions fade no-print" tabindex="-1" role="dialog" id="modalaction" aria-labelledby="modalCenterTitle">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<button class="btn-close" type="button" data-bs-dismiss="modal" aria-label="Chiudi finestra modale">
<svg class="icon">
<use href="<?= $baseImagePath ?>sprites.svg#it-close"></use>
</svg>
</button>
</div>
<div class="modal-body">
<div class="link-list-wrapper">
<ul class="link-list ps-0 ms-0">
<li>
<a href="javascript:window.print();" class="list-item left-icon" title="Stampa il contenuto" data-focus-mouse="false">
<svg class="icon"><use href="<?= $baseImagePath ?>sprites.svg#it-print"></use></svg>
<span>Stampa</span>
</a>
</li>
<li>
<a href="mailto:?subject=<?php echo $this->escape($this->item->title); ?>&amp;body=<?php echo $urlcompleto ?>" class="list-item left-icon" title="Invia il contenuto">
<svg class="icon"><use href="<?= $baseImagePath ?>sprites.svg#it-mail"></use></svg>
<span>Invia</span>
</a>
</li>
<li>
<a class="list-item collapsed link-toggle" title="Condividi" href="#social-share" data-bs-toggle="collapse" aria-expanded="false" aria-controls="social-share" role="button" id="share-control">
<svg class="icon"><use href="<?= $baseImagePath ?>sprites.svg#it-share"></use></svg>
<span>Condividi</span>
<svg class="icon icon-right"><use href="<?= $baseImagePath ?>sprites.svg#it-expand"></use></svg>
</a>
<ul class="ps-0 link-sublist collapse" id="social-share" role="region" aria-labelledby="share-control">
<li>
<a class="list-item" href="https://www.facebook.com/sharer/sharer.php?u=<?php echo $urlcompleto ?>" title="Condividi su: Facebook" target="_blank">
<svg class="icon"><use href="<?= $baseImagePath ?>sprites.svg#it-facebook"></use></svg>
<span>Facebook</span>
</a>
</li>
<li>
<a class="list-item" href="http://twitter.com/share?text=<?php echo $this->escape($this->item->title); ?>&amp;url=<?php echo $urlcompleto ?>" title="Condividi su: Twitter" target="_blank">
<svg class="icon"><use href="<?= $baseImagePath ?>sprites.svg#it-twitter"></use></svg>
<span>Twitter</span>
</a>
</li>
<li>
<a class="list-item" href="https://www.linkedin.com/shareArticle?mini=true&amp;url=<?php echo $urlcompleto ?>&amp;title=<?php echo $this->escape($this->item->title); ?>&amp;source=<?php echo $nomesito?>" title="Condividi su: Linkedin" target="_blank">
<svg class="icon"><use href="<?= $baseImagePath ?>sprites.svg#it-linkedin"></use></svg>
<span>Linkedin</span>
</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
<div class="modal-footer">
<button class="py-1 px-3 btn btn-primary btn-sm" data-bs-dismiss="modal" type="button">Ok</button>
</div>
</div>
</div>
</div>
</div>
</aside>
</div>
<div class="col-12 col-lg-9 border-aside ps-lg-5 pt-0 py-lg-5">
<article class="article-wrapper redbrown <?php echo $this->pageclass_sfx; ?>" >
<?php
if (!empty($this->item->pagination) && !$this->item->paginationposition && $this->item->paginationrelative) {
echo $this->item->pagination;
}
?>
<?php $useDefList = $params->get('show_modify_date') || $params->get('show_publish_date') || $params->get('show_create_date')
|| $params->get('show_hits') || $params->get('show_category') || $params->get('show_parent_category') || $params->get('show_author') || $assocParam; ?>
<?php if ($canEdit) : ?>
<?php echo LayoutHelper::render('joomla.content.icons', ['params' => $params, 'item' => $this->item]); ?>
<?php endif; ?>
<?php // Content is generated by content plugin event "onContentAfterTitle" ?>
<?php echo $this->item->event->afterDisplayTitle; ?>
<?php if ($useDefList && ($info == 0 || $info == 2)) : ?>
<?php echo LayoutHelper::render('joomla.content.info_block', ['item' => $this->item, 'params' => $params, 'position' => 'above']); ?>
<?php endif; ?>
<?php // Content is generated by content plugin event "onContentBeforeDisplay" ?>
<?php echo $this->item->event->beforeDisplayContent; ?>
<?php if ((int) $params->get('urls_position', 0) === 0) : ?>
<?php echo $this->loadTemplate('links'); ?>
<?php endif; ?>
<?php if ($params->get('access-view')) : ?>
<?php
if (!empty($this->item->pagination) && !$this->item->paginationposition && !$this->item->paginationrelative) :
echo $this->item->pagination;
endif;
?>
<?php if (isset($this->item->toc)) :
echo $this->item->toc;
endif; ?>
<?php if ($info == 1 || $info == 2) : ?>
<?php if ($useDefList) : ?>
<?php echo LayoutHelper::render('joomla.content.info_block', ['item' => $this->item, 'params' => $params, 'position' => 'below']); ?>
<?php endif; ?>
<?php endif; ?>
<?php
if (!empty($this->item->pagination) && $this->item->paginationposition && !$this->item->paginationrelative) :
echo $this->item->pagination;
?>
<?php endif; ?>
<?php if ((int) $params->get('urls_position', 0) === 1) : ?>
<?php echo $this->loadTemplate('links'); ?>
<?php endif; ?>
<?php // Optional teaser intro text for guests ?>
<?php elseif ($params->get('show_noauth') == true && $user->get('guest')) : ?>
<?php echo LayoutHelper::render('joomla.content.intro_image', $this->item); ?>
<?php echo HTMLHelper::_('content.prepare', $this->item->introtext); ?>
<?php // Optional link to let them register to see the whole article. ?>
<?php if ($params->get('show_readmore') && $this->item->fulltext != null) : ?>
<?php $menu = Factory::getApplication()->getMenu(); ?>
<?php $active = $menu->getActive(); ?>
<?php $itemId = $active->id; ?>
<?php $link = new Uri(Route::_('index.php?option=com_users&view=login&Itemid=' . $itemId, false)); ?>
<?php $link->setVar('return', base64_encode(RouteHelper::getArticleRoute($this->item->slug, $this->item->catid, $this->item->language))); ?>
<?php echo LayoutHelper::render('joomla.content.readmore', ['item' => $this->item, 'params' => $params, 'link' => $link]); ?>
<?php endif; ?>
<?php endif; ?>
<?php
if (!empty($this->item->pagination) && $this->item->paginationposition && $this->item->paginationrelative) :
echo $this->item->pagination;
?>
<?php endif; ?>
<?php // Content is generated by content plugin event "onContentAfterDisplay" ?>
<?php echo $this->item->event->afterDisplayContent; ?>
<div class="meta-articolo" data-element="metadata"><small><strong>Pubblicato:</strong> <?php echo $pubblicazione ?> - <strong>Revisione:</strong> <?php echo $revisione ?></small></div>
</article>
</div>
</div>
</div>
</div>
</div>

View File

@ -0,0 +1,93 @@
<?php
/**
* @package Joomla.Site
* @subpackage com_content
*
* @copyright (C) 2011 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
use Joomla\CMS\HTML\HTMLHelper;
// Create shortcut
$urls = json_decode($this->item->urls);
// Create shortcuts to some parameters.
$params = $this->item->params;
if ($urls && (!empty($urls->urla) || !empty($urls->urlb) || !empty($urls->urlc))) :
?>
<div class="com-content-article__links content-links">
<ul class="com-content-article__links content-list">
<?php
$urlarray = [
[$urls->urla, $urls->urlatext, $urls->targeta, 'a'],
[$urls->urlb, $urls->urlbtext, $urls->targetb, 'b'],
[$urls->urlc, $urls->urlctext, $urls->targetc, 'c']
];
foreach ($urlarray as $url) :
$link = $url[0];
$label = $url[1];
$target = $url[2];
$id = $url[3];
if (! $link) :
continue;
endif;
// If no label is present, take the link
$label = $label ?: $link;
// If no target is present, use the default
$target = $target ?: $params->get('target' . $id);
?>
<li class="com-content-article__link content-links-<?php echo $id; ?>">
<?php
// Compute the correct link
switch ($target) {
case 1:
// Open in a new window
echo '<a href="' . htmlspecialchars($link, ENT_COMPAT, 'UTF-8') . '" target="_blank" rel="nofollow noopener noreferrer">' .
htmlspecialchars($label, ENT_COMPAT, 'UTF-8') . '</a>';
break;
case 2:
// Open in a popup window
$attribs = 'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=600,height=600';
echo "<a href=\"" . htmlspecialchars($link, ENT_COMPAT, 'UTF-8') . "\" onclick=\"window.open(this.href, 'targetWindow', '" . $attribs . "'); return false;\" rel=\"noopener noreferrer\">" .
htmlspecialchars($label, ENT_COMPAT, 'UTF-8') . '</a>';
break;
case 3:
echo '<a href="' . htmlspecialchars($link, ENT_COMPAT, 'UTF-8') . '" rel="noopener noreferrer" data-bs-toggle="modal" data-bs-target="#linkModal">' .
htmlspecialchars($label, ENT_COMPAT, 'UTF-8') . ' </a>';
echo HTMLHelper::_(
'bootstrap.renderModal',
'linkModal',
[
'url' => $link,
'title' => $label,
'height' => '100%',
'width' => '100%',
'modalWidth' => '500',
'bodyHeight' => '500',
'footer' => '<button type="button" class="btn btn-secondary" data-bs-dismiss="modal" aria-hidden="true">'
. \Joomla\CMS\Language\Text::_('JLIB_HTML_BEHAVIOR_CLOSE') . '</button>'
]
);
break;
default:
// Open in parent window
echo '<a href="' . htmlspecialchars($link, ENT_COMPAT, 'UTF-8') . '" rel="nofollow">' .
htmlspecialchars($label, ENT_COMPAT, 'UTF-8') . ' </a>';
break;
}
?>
</li>
<?php endforeach; ?>
</ul>
</div>
<?php endif; ?>

View File

@ -0,0 +1,278 @@
<?php
/**
* @package Joomla.Site
* @subpackage com_content
*
* @copyright (C) 2006 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
use Joomla\CMS\Factory;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Associations;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Layout\FileLayout;
use Joomla\CMS\Layout\LayoutHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Uri\Uri;
use Joomla\Component\Content\Administrator\Extension\ContentComponent;
use Joomla\Component\Content\Site\Helper\RouteHelper;
// Create shortcuts to some parameters.
$params = $this->item->params;
$canEdit = $params->get('access-edit');
$user = Factory::getUser();
$info = $params->get('info_block_position', 0);
$htag = $this->params->get('show_page_heading') ? 'h2' : 'h1';
// Check if associations are implemented. If they are, define the parameter.
$assocParam = (Associations::isEnabled() && $params->get('show_associations'));
$currentDate = Factory::getDate()->format('d-m-Y');
$isNotPublishedYet = $this->item->publish_up > $currentDate;
$isExpired = !is_null($this->item->publish_down) && $this->item->publish_down < $currentDate;
$fullimg = json_decode($this->item->images);
$pubblicazione = $this->item->publish_up;
$pubblicazione = Factory::getDate()->format('d.m.Y');
$revisione = $this->item->modified;
$revisione = Factory::getDate()->format('d.m.Y');;
$urlcompleto = Uri::getInstance();
$config = JFactory::getConfig();
$nomesito = $config->get( 'sitename' );
$baseImagePath = Uri::root(false) . "media/templates/site/joomla-italia-theme/images/";
?>
<section class="section bg-white py-5 position-relative d-block d-lg-flex align-items-center overflow-hidden section-hero">
<?php if($fullimg->image_fulltext !=''): ?>
<div class="title-img" style="background-image: url('<?php echo $fullimg->image_fulltext; ?>');"></div>
<?php else: ?>
<div class="title-img bg-bluelectric d-none d-md-block">
<svg width="100%" height="100%" viewBox="0 0 726 360" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;"><g id="Group" opacity="0.32"><path id="Rectangle" d="M627.751,245.625l-396.368,-193.321l-193.322,396.368l396.368,193.321l193.322,-396.368Z" style="fill:url(#_Linear1);"></path><path id="Rectangle1" serif:id="Rectangle" d="M583.359,-179.506l-264.865,159.147l159.147,264.865l264.865,-159.147l-159.147,-264.865Z" style="fill:url(#_Linear2);"></path><path id="Rectangle2" serif:id="Rectangle" d="M210.182,-54.565l-213.341,33.79l33.79,213.34l213.341,-33.79l-33.79,-213.34Z" style="fill:url(#_Linear3);"></path></g><defs><linearGradient id="_Linear1" x1="0" y1="0" x2="1" y2="0" gradientUnits="userSpaceOnUse" gradientTransform="matrix(203.046,589.69,-589.69,203.046,231.383,52.3035)"><stop offset="0" style="stop-color:#0f842e;stop-opacity:1"></stop><stop offset="1" style="stop-color:#00838f;stop-opacity:1"></stop></linearGradient><linearGradient id="_Linear2" x1="0" y1="0" x2="1" y2="0" gradientUnits="userSpaceOnUse" gradientTransform="matrix(344.438,-26.7144,26.7144,344.438,398.068,112.073)"><stop offset="0" style="stop-color:#0e8a5f;stop-opacity:1"></stop><stop offset="1" style="stop-color:#00838f;stop-opacity:1"></stop></linearGradient><linearGradient id="_Linear3" x1="0" y1="0" x2="1" y2="0" gradientUnits="userSpaceOnUse" gradientTransform="matrix(230.236,72.8805,-72.8805,230.236,13.7359,85.8949)"><stop offset="0" style="stop-color:#0e8a5f;stop-opacity:1"></stop><stop offset="1" style="stop-color:#00838f;stop-opacity:1"></stop></linearGradient></defs>
</svg>
</div>
<?php endif; ?>
<div class="container">
<div class="row align-items-center">
<div class="col-md-5">
<div class="hero-title">
<h1><?php echo $this->escape($this->item->title); ?></h1>
<p><?php echo JHTML::_('string.truncate', $this->item->text, true, false, false) ; ?></p>
</div>
<?php if ($params->get('show_tags', 1) && !empty($this->item->tags->itemTags)) : ?>
<div class="argomenti-section px-4 mt-5">
<h2 class="h6">Argomenti</h2>
<div class="badges bluelectric">
<?php $this->item->tagLayout = new FileLayout('joomla.content.tags'); ?>
<?php echo $this->item->tagLayout->render($this->item->tags->itemTags); ?>
</div>
</div>
<?php endif; ?>
</div>
</div>
</div>
</section>
<div class="pagina-progetti bluelectric">
<div class="border-row bluelectric">
<div class="container">
<div class="row">
<div class="col-12 col-lg-3 p-0 pt-lg-2 mb-3">
<aside class="bluelectric aside-main aside-sticky" id="page-index">
<div class="aside-title" id="page-index">
<a class="toggle-link-list" data-bs-toggle="collapse" href="#lista-paragrafi" role="button" aria-expanded="false" aria-controls="lista-paragrafi" aria-label="apri / chiudi indice della pagina">
<span>Indice della pagina</span>
<svg class="icon icon-toggle"><use href="<?= $baseImagePath ?>sprites.svg#it-expand"></use></svg>
</a>
</div>
<div id="lista-paragrafi" class="link-list-wrapper collapse show" role="region" aria-labelledby="page-index">
<ul class="link-list" data-element="page-index">
<?php
JLoader::register('FieldsHelper', JPATH_ADMINISTRATOR . '/components/com_fields/helpers/fields.php');
JModelLegacy::addIncludePath(JPATH_SITE. '/components/com_content/models', 'ContentModel');
$id = JFactory::getApplication()->input->get('id');
$model = JModelLegacy::getInstance('Article', 'ContentModel', array('ignore_request'=>true));
$appParams = JFactory::getApplication()->getParams();
$model->setState('params', $appParams);
$item = $model->getItem($id);
$jcFields = FieldsHelper::getFields('com_content.article', $item, true);
?>
<?php foreach($jcFields as $jcField) { ?>
<?php if ($jcField->value !=''){ ?>
<li><a href="#art-par-<?php echo $jcField->id; ?>" aria-label="Vai al paragrafo <?php echo $jcField->title; ?>" data-focus-mouse="false"><?php echo $jcField->title; ?></a></li>
<?php } ?>
<?php } ?>
</ul>
</div>
</aside>
</div>
<div class="col-12 col-lg-9 border-aside ps-lg-5 pt-0 py-lg-5">
<div class="row variable-gutters">
<div class="col-lg-12 d-flex justify-content-end">
<div class="actions-wrapper actions-main">
<a class="toggle-actions" href="#" title="Vedi azioni" data-bs-toggle="modal" data-bs-target="#modalaction">
<svg class="icon icon-xs">
<use xlink:href="<?= $baseImagePath ?>sprites.svg#it-more-items"></use>
</svg>
<span>Stampa / Condividi</span>
</a>
<div class="modal modal-actions fade no-print" tabindex="-1" role="dialog" id="modalaction" aria-labelledby="modalCenterTitle">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<button class="btn-close" type="button" data-bs-dismiss="modal" aria-label="Chiudi finestra modale">
<svg class="icon">
<use href="<?= $baseImagePath ?>sprites.svg#it-close"></use>
</svg>
</button>
</div>
<div class="modal-body">
<div class="link-list-wrapper">
<ul class="link-list ps-0 ms-0">
<li>
<a href="javascript:window.print();" class="list-item left-icon" title="Stampa il contenuto" data-focus-mouse="false">
<svg class="icon"><use href="<?= $baseImagePath ?>sprites.svg#it-print"></use></svg>
<span>Stampa</span>
</a>
</li>
<li>
<a href="mailto:?subject=<?php echo $this->escape($this->item->title); ?>&amp;body=<?php echo $urlcompleto ?>" class="list-item left-icon" title="Invia il contenuto">
<svg class="icon"><use href="<?= $baseImagePath ?>sprites.svg#it-mail"></use></svg>
<span>Invia</span>
</a>
</li>
<li>
<a class="list-item collapsed link-toggle" title="Condividi" href="#social-share" data-bs-toggle="collapse" aria-expanded="false" aria-controls="social-share" role="button" id="share-control">
<svg class="icon"><use href="<?= $baseImagePath ?>sprites.svg#it-share"></use></svg>
<span>Condividi</span>
<svg class="icon icon-right"><use href="<?= $baseImagePath ?>sprites.svg#it-expand"></use></svg>
</a>
<ul class="ps-0 link-sublist collapse" id="social-share" role="region" aria-labelledby="share-control">
<li>
<a class="list-item" href="https://www.facebook.com/sharer/sharer.php?u=<?php echo $urlcompleto ?>" title="Condividi su: Facebook" target="_blank">
<svg class="icon"><use href="<?= $baseImagePath ?>sprites.svg#it-facebook"></use></svg>
<span>Facebook</span>
</a>
</li>
<li>
<a class="list-item" href="http://twitter.com/share?text=<?php echo $this->escape($this->item->title); ?>&amp;url=<?php echo $urlcompleto ?>" title="Condividi su: Twitter" target="_blank">
<svg class="icon"><use href="<?= $baseImagePath ?>sprites.svg#it-twitter"></use></svg>
<span>Twitter</span>
</a>
</li>
<li>
<a class="list-item" href="https://www.linkedin.com/shareArticle?mini=true&amp;url=<?php echo $urlcompleto ?>&amp;title=<?php echo $this->escape($this->item->title); ?>&amp;source=<?php echo $nomesito?>" title="Condividi su: Linkedin" target="_blank">
<svg class="icon"><use href="<?= $baseImagePath ?>sprites.svg#it-linkedin"></use></svg>
<span>Linkedin</span>
</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
<div class="modal-footer">
<button class="py-1 px-3 btn btn-primary btn-sm" data-bs-dismiss="modal" type="button">Ok</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<article class="article-wrapper redbrown <?php echo $this->pageclass_sfx; ?>" >
<?php
if (!empty($this->item->pagination) && !$this->item->paginationposition && $this->item->paginationrelative) {
echo $this->item->pagination;
}
?>
<?php $useDefList = $params->get('show_modify_date') || $params->get('show_publish_date') || $params->get('show_create_date')
|| $params->get('show_hits') || $params->get('show_category') || $params->get('show_parent_category') || $params->get('show_author') || $assocParam; ?>
<?php if ($canEdit) : ?>
<?php echo LayoutHelper::render('joomla.content.icons', ['params' => $params, 'item' => $this->item]); ?>
<?php endif; ?>
<?php // Content is generated by content plugin event "onContentAfterTitle" ?>
<?php echo $this->item->event->afterDisplayTitle; ?>
<?php // Content is generated by content plugin event "onContentBeforeDisplay" ?>
<?php echo $this->item->event->beforeDisplayContent; ?>
<?php if ((int) $params->get('urls_position', 0) === 0) : ?>
<?php echo $this->loadTemplate('links'); ?>
<?php endif; ?>
<?php if ($params->get('access-view')) : ?>
<?php
if (!empty($this->item->pagination) && !$this->item->paginationposition && !$this->item->paginationrelative) :
echo $this->item->pagination;
endif;
?>
<?php if (isset($this->item->toc)) :
echo $this->item->toc;
endif; ?>
<?php if ($info == 1 || $info == 2) : ?>
<?php if ($useDefList) : ?>
<?php echo LayoutHelper::render('joomla.content.info_block', ['item' => $this->item, 'params' => $params, 'position' => 'below']); ?>
<?php endif; ?>
<?php endif; ?>
<?php
if (!empty($this->item->pagination) && $this->item->paginationposition && !$this->item->paginationrelative) :
echo $this->item->pagination;
?>
<?php endif; ?>
<?php if ((int) $params->get('urls_position', 0) === 1) : ?>
<?php echo $this->loadTemplate('links'); ?>
<?php endif; ?>
<?php // Optional teaser intro text for guests ?>
<?php elseif ($params->get('show_noauth') == true && $user->get('guest')) : ?>
<?php echo LayoutHelper::render('joomla.content.intro_image', $this->item); ?>
<?php echo HTMLHelper::_('content.prepare', $this->item->introtext); ?>
<?php // Optional link to let them register to see the whole article. ?>
<?php if ($params->get('show_readmore') && $this->item->fulltext != null) : ?>
<?php $menu = Factory::getApplication()->getMenu(); ?>
<?php $active = $menu->getActive(); ?>
<?php $itemId = $active->id; ?>
<?php $link = new Uri(Route::_('index.php?option=com_users&view=login&Itemid=' . $itemId, false)); ?>
<?php $link->setVar('return', base64_encode(RouteHelper::getArticleRoute($this->item->slug, $this->item->catid, $this->item->language))); ?>
<?php echo LayoutHelper::render('joomla.content.readmore', ['item' => $this->item, 'params' => $params, 'link' => $link]); ?>
<?php endif; ?>
<?php endif; ?>
<?php
if (!empty($this->item->pagination) && $this->item->paginationposition && $this->item->paginationrelative) :
echo $this->item->pagination;
?>
<?php endif; ?>
<?php // Content is generated by content plugin event "onContentAfterDisplay" ?>
<?php echo $this->item->event->afterDisplayContent; ?>
<div class="meta-articolo" data-element="metadata"><small><strong>Pubblicato:</strong> <?php echo $pubblicazione ?> - <strong>Revisione:</strong> <?php echo $revisione ?></small></div>
</article>
</div>
</div>
</div>
</div>
</div>

View File

@ -0,0 +1,279 @@
<?php
/**
* @package Joomla.Site
* @subpackage com_content
*
* @copyright (C) 2006 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
use Joomla\CMS\Factory;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Associations;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Layout\FileLayout;
use Joomla\CMS\Layout\LayoutHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Uri\Uri;
use Joomla\Component\Content\Administrator\Extension\ContentComponent;
use Joomla\Component\Content\Site\Helper\RouteHelper;
// Create shortcuts to some parameters.
$params = $this->item->params;
$canEdit = $params->get('access-edit');
$user = Factory::getUser();
$info = $params->get('info_block_position', 0);
$htag = $this->params->get('show_page_heading') ? 'h2' : 'h1';
// Check if associations are implemented. If they are, define the parameter.
$assocParam = (Associations::isEnabled() && $params->get('show_associations'));
$currentDate = Factory::getDate()->format('d-m-Y');
$isNotPublishedYet = $this->item->publish_up > $currentDate;
$isExpired = !is_null($this->item->publish_down) && $this->item->publish_down < $currentDate;
$fullimg = json_decode($this->item->images);
$pubblicazione = $this->item->publish_up;
$pubblicazione = Factory::getDate()->format('d.m.Y');
$revisione = $this->item->modified;
$revisione = Factory::getDate()->format('d.m.Y');
;
$urlcompleto = Uri::getInstance();
$config = JFactory::getConfig();
$nomesito = $config->get('sitename');
$baseImagePath= Uri::root(false) . "media/templates/site/joomla-italia-theme/images/";
?>
<div class="pagina-schede bluelectric">
<section class="section bg-white py-2 py-lg-3 py-xl-5">
<div class="container">
<div class="row align-items-center">
<div class="col-auto d-none d-sm-block">
<div class="section-thumb-article mx-3">
<?php if($fullimg->image_fulltext =='') { ?>
<figure><a href="<?php echo Route::_(RouteHelper::getArticleRoute($this->item->slug, $this->item->catid, $this->item->language)); ?>" itemprop="url" title="service-link"><img src="<?= $baseImagePath ?>imgsegnaposto.jpg" class="img-fluid" alt="immagine-segnaposto"/></a></figure>
<?php } else {
echo LayoutHelper::render('joomla.content.full_image', $this->item);
}
?>
</div>
</div>
<div class="ps-0 ps-lg-3 col col-lg-6 col-xl-7">
<div class="section-title">
<h1 data-element="service-title" class="mb-3"><?php echo $this->escape($this->item->title); ?></h1>
<p data-element="service-description"><?php echo JHTML::_('string.truncate', $this->item->text, true, false, false) ; ?></p>
</div>
</div>
<div class="col-12 col-lg">
<div class="actions-wrapper actions-main">
<a class="toggle-actions" href="#" title="Vedi azioni" data-bs-toggle="modal" data-bs-target="#modalaction">
<svg class="icon icon-xs">
<use xlink:href="<?= $baseImagePath ?>sprites.svg#it-more-items"></use>
</svg>
<span>Stampa / Condividi</span>
</a>
<div class="modal modal-actions fade no-print" tabindex="-1" role="dialog" id="modalaction" aria-labelledby="modalCenterTitle">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<button class="btn-close" type="button" data-bs-dismiss="modal" aria-label="Chiudi finestra modale">
<svg class="icon">
<use href="<?= $baseImagePath ?>sprites.svg#it-close"></use>
</svg>
</button>
</div>
<div class="modal-body">
<div class="link-list-wrapper">
<ul class="link-list ps-0 ms-0">
<li>
<a href="javascript:window.print();" class="list-item left-icon" title="Stampa il contenuto" data-focus-mouse="false">
<svg class="icon"><use href="<?= $baseImagePath ?>sprites.svg#it-print"></use></svg>
<span>Stampa</span>
</a>
</li>
<li>
<a href="mailto:?subject=<?php echo $this->escape($this->item->title); ?>&amp;body=<?php echo $urlcompleto ?>" class="list-item left-icon" title="Invia il contenuto">
<svg class="icon"><use href="<?= $baseImagePath ?>sprites.svg#it-mail"></use></svg>
<span>Invia</span>
</a>
</li>
<li>
<a class="list-item collapsed link-toggle" title="Condividi" href="#social-share" data-bs-toggle="collapse" aria-expanded="false" aria-controls="social-share" role="button" id="share-control">
<svg class="icon"><use href="<?= $baseImagePath ?>sprites.svg#it-share"></use></svg>
<span>Condividi</span>
<svg class="icon icon-right"><use href="<?= $baseImagePath ?>sprites.svg#it-expand"></use></svg>
</a>
<ul class="ps-0 link-sublist collapse" id="social-share" role="region" aria-labelledby="share-control">
<li>
<a class="list-item" href="https://www.facebook.com/sharer/sharer.php?u=<?php echo $urlcompleto ?>" title="Condividi su: Facebook" target="_blank">
<svg class="icon"><use href="<?= $baseImagePath ?>sprites.svg#it-facebook"></use></svg>
<span>Facebook</span>
</a>
</li>
<li>
<a class="list-item" href="http://twitter.com/share?text=<?php echo $this->escape($this->item->title); ?>&amp;url=<?php echo $urlcompleto ?>" title="Condividi su: Twitter" target="_blank">
<svg class="icon"><use href="<?= $baseImagePath ?>sprites.svg#it-twitter"></use></svg>
<span>Twitter</span>
</a>
</li>
<li>
<a class="list-item" href="https://www.linkedin.com/shareArticle?mini=true&amp;url=<?php echo $urlcompleto ?>&amp;title=<?php echo $this->escape($this->item->title); ?>&amp;source=<?php echo $nomesito?>" title="Condividi su: Linkedin" target="_blank">
<svg class="icon"><use href="<?= $baseImagePath ?>sprites.svg#it-linkedin"></use></svg>
<span>Linkedin</span>
</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
<div class="modal-footer">
<button class="py-1 px-3 btn btn-primary btn-sm" data-bs-dismiss="modal" type="button">Ok</button>
</div>
</div>
</div>
</div>
</div>
<?php if ($params->get('show_tags', 1) && !empty($this->item->tags->itemTags)) : ?>
<div class="argomenti-servizio mt-4">
<h2 class="h6">Argomenti</h2>
<div class="badges bluelectric">
<?php $this->item->tagLayout = new FileLayout('joomla.content.tags'); ?>
<?php echo $this->item->tagLayout->render($this->item->tags->itemTags); ?>
</div>
</div>
<?php endif; ?>
</div>
</div>
</div>
</div>
</section>
<div class="border-row bluelectric">
<div class="container">
<div class="row">
<div class="col-12 col-lg-3 p-0 pt-lg-2 mb-3">
<aside class="bluelectric aside-main aside-sticky" id="page-index">
<div class="aside-title" id="page-index">
<a class="toggle-link-list" data-bs-toggle="collapse" href="#lista-paragrafi" role="button" aria-expanded="false" aria-controls="lista-paragrafi" aria-label="apri / chiudi indice della pagina">
<span>Indice della pagina</span>
<svg class="icon icon-toggle"><use href="<?= $baseImagePath ?>sprites.svg#it-expand"></use></svg>
</a>
</div>
<div id="lista-paragrafi" class="link-list-wrapper collapse show" role="region" aria-labelledby="page-index">
<ul class="link-list" data-element="page-index">
<?php
JLoader::register('FieldsHelper', JPATH_ADMINISTRATOR . '/components/com_fields/helpers/fields.php');
JModelLegacy::addIncludePath(JPATH_SITE. '/components/com_content/models', 'ContentModel');
$id = JFactory::getApplication()->input->get('id');
$model = JModelLegacy::getInstance('Article', 'ContentModel', array('ignore_request'=>true));
$appParams = JFactory::getApplication()->getParams();
$model->setState('params', $appParams);
$item = $model->getItem($id);
$jcFields = FieldsHelper::getFields('com_content.article', $item, true);
?>
<?php foreach($jcFields as $jcField) { ?>
<?php if ($jcField->value !='') { ?>
<li><a href="#art-par-<?php echo $jcField->id; ?>" aria-label="Vai al paragrafo <?php echo $jcField->title; ?>" data-focus-mouse="false"><?php echo $jcField->title; ?></a></li>
<?php } ?>
<?php } ?>
</ul>
</div>
</aside>
</div>
<div class="col-12 col-lg-9 border-aside ps-lg-5 pt-0 py-lg-5">
<article class="article-wrapper redbrown <?php echo $this->pageclass_sfx; ?>" >
<?php
if (!empty($this->item->pagination) && !$this->item->paginationposition && $this->item->paginationrelative) {
echo $this->item->pagination;
}
?>
<?php $useDefList = $params->get('show_modify_date') || $params->get('show_publish_date') || $params->get('show_create_date')
|| $params->get('show_hits') || $params->get('show_category') || $params->get('show_parent_category') || $params->get('show_author') || $assocParam; ?>
<?php if ($canEdit) : ?>
<?php echo LayoutHelper::render('joomla.content.icons', ['params' => $params, 'item' => $this->item]); ?>
<?php endif; ?>
<?php // Content is generated by content plugin event "onContentAfterTitle"?>
<?php echo $this->item->event->afterDisplayTitle; ?>
<?php // Content is generated by content plugin event "onContentBeforeDisplay"?>
<?php echo $this->item->event->beforeDisplayContent; ?>
<?php if ((int) $params->get('urls_position', 0) === 0) : ?>
<?php echo $this->loadTemplate('links'); ?>
<?php endif; ?>
<?php if ($params->get('access-view')) : ?>
<?php
if (!empty($this->item->pagination) && !$this->item->paginationposition && !$this->item->paginationrelative) :
echo $this->item->pagination;
endif;
?>
<?php if (isset($this->item->toc)) :
echo $this->item->toc;
endif; ?>
<?php if ($info == 1 || $info == 2) : ?>
<?php if ($useDefList) : ?>
<?php echo LayoutHelper::render('joomla.content.info_block', ['item' => $this->item, 'params' => $params, 'position' => 'below']); ?>
<?php endif; ?>
<?php endif; ?>
<?php
if (!empty($this->item->pagination) && $this->item->paginationposition && !$this->item->paginationrelative) :
echo $this->item->pagination;
?>
<?php endif; ?>
<?php if ((int) $params->get('urls_position', 0) === 1) : ?>
<?php echo $this->loadTemplate('links'); ?>
<?php endif; ?>
<?php // Optional teaser intro text for guests?>
<?php elseif ($params->get('show_noauth') == true && $user->get('guest')) : ?>
<?php echo LayoutHelper::render('joomla.content.intro_image', $this->item); ?>
<?php echo HTMLHelper::_('content.prepare', $this->item->introtext); ?>
<?php // Optional link to let them register to see the whole article.?>
<?php if ($params->get('show_readmore') && $this->item->fulltext != null) : ?>
<?php $menu = Factory::getApplication()->getMenu(); ?>
<?php $active = $menu->getActive(); ?>
<?php $itemId = $active->id; ?>
<?php $link = new Uri(Route::_('index.php?option=com_users&view=login&Itemid=' . $itemId, false)); ?>
<?php $link->setVar('return', base64_encode(RouteHelper::getArticleRoute($this->item->slug, $this->item->catid, $this->item->language))); ?>
<?php echo LayoutHelper::render('joomla.content.readmore', ['item' => $this->item, 'params' => $params, 'link' => $link]); ?>
<?php endif; ?>
<?php endif; ?>
<?php
if (!empty($this->item->pagination) && $this->item->paginationposition && $this->item->paginationrelative) :
echo $this->item->pagination;
?>
<?php endif; ?>
<?php // Content is generated by content plugin event "onContentAfterDisplay"?>
<?php echo $this->item->event->afterDisplayContent; ?>
<div class="meta-articolo" data-element="metadata"><small><strong>Pubblicato:</strong> <?php echo $pubblicazione ?> - <strong>Revisione:</strong> <?php echo $revisione ?></small></div>
</article>
</div>
</div>
</div>
</div>
</div>

View File

@ -0,0 +1,268 @@
<?php
/**
* @package Joomla.Site
* @subpackage com_content
*
* @copyright (C) 2006 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
use Joomla\CMS\Factory;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Associations;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Layout\FileLayout;
use Joomla\CMS\Layout\LayoutHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Uri\Uri;
use Joomla\Component\Content\Administrator\Extension\ContentComponent;
use Joomla\Component\Content\Site\Helper\RouteHelper;
// Create shortcuts to some parameters.
$params = $this->item->params;
$canEdit = $params->get('access-edit');
$user = Factory::getUser();
$info = $params->get('info_block_position', 0);
$htag = $this->params->get('show_page_heading') ? 'h2' : 'h1';
// Check if associations are implemented. If they are, define the parameter.
$assocParam = (Associations::isEnabled() && $params->get('show_associations'));
$currentDate = Factory::getDate()->format('d-m-Y');
$isNotPublishedYet = $this->item->publish_up > $currentDate;
$isExpired = !is_null($this->item->publish_down) && $this->item->publish_down < $currentDate;
$fullimg = json_decode($this->item->images);
$pubblicazione = $this->item->publish_up;
$pubblicazione = Factory::getDate()->format('d.m.Y');
$revisione = $this->item->modified;
$revisione = Factory::getDate()->format('d.m.Y');
;
$urlcompleto = Uri::getInstance();
$config = JFactory::getConfig();
$nomesito = $config->get('sitename');
$baseImagePath= Uri::root(false) . "media/templates/site/joomla-italia-theme/images/";
?>
<div class="pagina-servizio purplelight">
<section class="section bg-white py-2 py-lg-3 py-xl-5">
<div class="container">
<div class="row align-items-center">
<div class="col-auto d-none d-sm-block">
<div class="section-thumb-article mx-3">
<?php if($fullimg->image_fulltext =='') { ?>
<figure><a href="<?php echo Route::_(RouteHelper::getArticleRoute($this->item->slug, $this->item->catid, $this->item->language)); ?>" itemprop="url" title="service-link"><img src="<?= $baseImagePath ?>imgsegnaposto.jpg" class="img-fluid" alt="immagine-segnaposto"/></a></figure>
<?php } else {
echo LayoutHelper::render('joomla.content.full_image', $this->item);
}
?>
</div>
</div>
<div class="ps-0 ps-lg-3 col col-lg-6 col-xl-7">
<div class="section-title">
<h1 data-element="service-title" class="mb-3"><?php echo $this->escape($this->item->title); ?></h1>
<p data-element="service-description"><?php echo JHTML::_('string.truncate', $this->item->text, true, false, false) ; ?></p>
</div>
</div>
<div class="col-12 col-lg">
<div class="actions-wrapper actions-main">
<a class="toggle-actions" href="#" title="Vedi azioni" data-bs-toggle="modal" data-bs-target="#modalaction">
<svg class="icon icon-xs">
<use xlink:href="<?= $baseImagePath ?>sprites.svg#it-more-items"></use>
</svg>
<span>Stampa / Condividi</span>
</a>
<div class="modal modal-actions fade no-print" tabindex="-1" role="dialog" id="modalaction" aria-labelledby="modalCenterTitle">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<button class="btn-close" type="button" data-bs-dismiss="modal" aria-label="Chiudi finestra modale">
<svg class="icon">
<use href="<?= $baseImagePath ?>sprites.svg#it-close"></use>
</svg>
</button>
</div>
<div class="modal-body">
<div class="link-list-wrapper">
<ul class="link-list ps-0 ms-0">
<li>
<a href="javascript:window.print();" class="list-item left-icon" title="Stampa il contenuto" data-focus-mouse="false">
<svg class="icon"><use href="<?= $baseImagePath ?>sprites.svg#it-print"></use></svg>
<span>Stampa</span>
</a>
</li>
<li>
<a href="mailto:?subject=<?php echo $this->escape($this->item->title); ?>&amp;body=<?php echo $urlcompleto ?>" class="list-item left-icon" title="Invia il contenuto">
<svg class="icon"><use href="<?= $baseImagePath ?>sprites.svg#it-mail"></use></svg>
<span>Invia</span>
</a>
</li>
<li>
<a class="list-item collapsed link-toggle" title="Condividi" href="#social-share" data-bs-toggle="collapse" aria-expanded="false" aria-controls="social-share" role="button" id="share-control">
<svg class="icon"><use href="<?= $baseImagePath ?>sprites.svg#it-share"></use></svg>
<span>Condividi</span>
<svg class="icon icon-right"><use href="<?= $baseImagePath ?>sprites.svg#it-expand"></use></svg>
</a>
<ul class="ps-0 link-sublist collapse" id="social-share" role="region" aria-labelledby="share-control">
<li>
<a class="list-item" href="https://www.facebook.com/sharer/sharer.php?u=<?php echo $urlcompleto ?>" title="Condividi su: Facebook" target="_blank">
<svg class="icon"><use href="<?= $baseImagePath ?>sprites.svg#it-facebook"></use></svg>
<span>Facebook</span>
</a>
</li>
<li>
<a class="list-item" href="http://twitter.com/share?text=<?php echo $this->escape($this->item->title); ?>&amp;url=<?php echo $urlcompleto ?>" title="Condividi su: Twitter" target="_blank">
<svg class="icon"><use href="<?= $baseImagePath ?>sprites.svg#it-twitter"></use></svg>
<span>Twitter</span>
</a>
</li>
<li>
<a class="list-item" href="https://www.linkedin.com/shareArticle?mini=true&amp;url=<?php echo $urlcompleto ?>&amp;title=<?php echo $this->escape($this->item->title); ?>&amp;source=<?php echo $nomesito?>" title="Condividi su: Linkedin" target="_blank">
<svg class="icon"><use href="<?= $baseImagePath ?>sprites.svg#it-linkedin"></use></svg>
<span>Linkedin</span>
</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
<div class="modal-footer">
<button class="py-1 px-3 btn btn-primary btn-sm" data-bs-dismiss="modal" type="button">Ok</button>
</div>
</div>
</div>
</div>
</div>
<?php if ($params->get('show_tags', 1) && !empty($this->item->tags->itemTags)) : ?>
<div class="argomenti-servizio mt-4">
<h2 class="h6">Argomenti</h2>
<div class="badges purplelight">
<?php $this->item->tagLayout = new FileLayout('joomla.content.tags'); ?>
<?php echo $this->item->tagLayout->render($this->item->tags->itemTags); ?>
</div>
</div>
<?php endif; ?>
</div>
</div>
</div>
</div>
</section>
<div class="border-row">
<div class="container">
<div class="row">
<div class="col-12 col-lg-3 p-0 pt-lg-2 mb-3">
<aside class="purplelight aside-main aside-sticky" id="page-index">
<div class="aside-title" id="page-index">
<a class="toggle-link-list" data-bs-toggle="collapse" href="#lista-paragrafi" role="button" aria-expanded="false" aria-controls="lista-paragrafi" aria-label="apri / chiudi indice della pagina">
<span>Indice della pagina</span>
<svg class="icon icon-toggle"><use href="<?= $baseImagePath ?>sprites.svg#it-expand"></use></svg>
</a>
</div>
<div id="lista-paragrafi" class="link-list-wrapper collapse show" role="region" aria-labelledby="page-index">
<ul class="link-list" data-element="page-index">
<li><a href="#art-par-01" aria-label="Vai al paragrafo Cos'è">Cos'è</a></li>
<li><a href="#art-par-02" aria-label="Vai al paragrafo Come si accede al servizio" data-focus-mouse="false">Come si accede al servizio</a></li>
<li><a href="#art-par-03" aria-label="Vai al paragrafo Cosa serve" data-focus-mouse="false">Cosa serve</a></li>
<li><a href="#art-par-04" aria-label="Vai al paragrafo Tempi e scadenze" data-focus-mouse="false">Tempi e scadenze</a></li>
<li><a href="#art-par-05" aria-label="Vai al paragrafo Contatti">Contatti</a></li>
<li><a href="#art-par-06" aria-label="Vai al paragrafo Ulteriori informazioni">Ulteriori informazioni</a></li>
</ul>
</div>
</aside>
</div>
<div class="col-12 col-lg-9 border-aside ps-lg-5 pt-0 py-lg-5">
<article class="article-wrapper purplelight <?php echo $this->pageclass_sfx; ?>" >
<?php
if (!empty($this->item->pagination) && !$this->item->paginationposition && $this->item->paginationrelative) {
echo $this->item->pagination;
}
?>
<?php $useDefList = $params->get('show_modify_date') || $params->get('show_publish_date') || $params->get('show_create_date')
|| $params->get('show_hits') || $params->get('show_category') || $params->get('show_parent_category') || $params->get('show_author') || $assocParam; ?>
<?php if ($canEdit) : ?>
<?php echo LayoutHelper::render('joomla.content.icons', ['params' => $params, 'item' => $this->item]); ?>
<?php endif; ?>
<?php // Content is generated by content plugin event "onContentAfterTitle"?>
<?php echo $this->item->event->afterDisplayTitle; ?>
<?php // Content is generated by content plugin event "onContentBeforeDisplay"?>
<?php echo $this->item->event->beforeDisplayContent; ?>
<?php if ((int) $params->get('urls_position', 0) === 0) : ?>
<?php echo $this->loadTemplate('links'); ?>
<?php endif; ?>
<?php if ($params->get('access-view')) : ?>
<?php
if (!empty($this->item->pagination) && !$this->item->paginationposition && !$this->item->paginationrelative) :
echo $this->item->pagination;
endif;
?>
<?php if (isset($this->item->toc)) :
echo $this->item->toc;
endif; ?>
<?php if ($info == 1 || $info == 2) : ?>
<?php if ($useDefList) : ?>
<?php echo LayoutHelper::render('joomla.content.info_block', ['item' => $this->item, 'params' => $params, 'position' => 'below']); ?>
<?php endif; ?>
<?php endif; ?>
<?php
if (!empty($this->item->pagination) && $this->item->paginationposition && !$this->item->paginationrelative) :
echo $this->item->pagination;
?>
<?php endif; ?>
<?php if ((int) $params->get('urls_position', 0) === 1) : ?>
<?php echo $this->loadTemplate('links'); ?>
<?php endif; ?>
<?php // Optional teaser intro text for guests?>
<?php elseif ($params->get('show_noauth') == true && $user->get('guest')) : ?>
<?php echo LayoutHelper::render('joomla.content.intro_image', $this->item); ?>
<?php echo HTMLHelper::_('content.prepare', $this->item->introtext); ?>
<?php // Optional link to let them register to see the whole article.?>
<?php if ($params->get('show_readmore') && $this->item->fulltext != null) : ?>
<?php $menu = Factory::getApplication()->getMenu(); ?>
<?php $active = $menu->getActive(); ?>
<?php $itemId = $active->id; ?>
<?php $link = new Uri(Route::_('index.php?option=com_users&view=login&Itemid=' . $itemId, false)); ?>
<?php $link->setVar('return', base64_encode(RouteHelper::getArticleRoute($this->item->slug, $this->item->catid, $this->item->language))); ?>
<?php echo LayoutHelper::render('joomla.content.readmore', ['item' => $this->item, 'params' => $params, 'link' => $link]); ?>
<?php endif; ?>
<?php endif; ?>
<?php
if (!empty($this->item->pagination) && $this->item->paginationposition && $this->item->paginationrelative) :
echo $this->item->pagination;
?>
<?php endif; ?>
<?php // Content is generated by content plugin event "onContentAfterDisplay"?>
<?php echo $this->item->event->afterDisplayContent; ?>
<div class="meta-articolo" data-element="metadata"><small><strong>Pubblicato:</strong> <?php echo $pubblicazione ?> - <strong>Revisione:</strong> <?php echo $revisione ?></small></div>
</article>
</div>
</div>
</div>
</div>
</div>

View File

@ -0,0 +1,93 @@
<?php
/**
* @package Joomla.Site
* @subpackage com_content
*
* @copyright (C) 2011 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
use Joomla\CMS\HTML\HTMLHelper;
// Create shortcut
$urls = json_decode($this->item->urls);
// Create shortcuts to some parameters.
$params = $this->item->params;
if ($urls && (!empty($urls->urla) || !empty($urls->urlb) || !empty($urls->urlc))) :
?>
<div class="com-content-article__links content-links">
<ul class="com-content-article__links content-list">
<?php
$urlarray = [
[$urls->urla, $urls->urlatext, $urls->targeta, 'a'],
[$urls->urlb, $urls->urlbtext, $urls->targetb, 'b'],
[$urls->urlc, $urls->urlctext, $urls->targetc, 'c']
];
foreach ($urlarray as $url) :
$link = $url[0];
$label = $url[1];
$target = $url[2];
$id = $url[3];
if (! $link) :
continue;
endif;
// If no label is present, take the link
$label = $label ?: $link;
// If no target is present, use the default
$target = $target ?: $params->get('target' . $id);
?>
<li class="com-content-article__link content-links-<?php echo $id; ?>">
<?php
// Compute the correct link
switch ($target) {
case 1:
// Open in a new window
echo '<a href="' . htmlspecialchars($link, ENT_COMPAT, 'UTF-8') . '" target="_blank" rel="nofollow noopener noreferrer">' .
htmlspecialchars($label, ENT_COMPAT, 'UTF-8') . '</a>';
break;
case 2:
// Open in a popup window
$attribs = 'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=600,height=600';
echo "<a href=\"" . htmlspecialchars($link, ENT_COMPAT, 'UTF-8') . "\" onclick=\"window.open(this.href, 'targetWindow', '" . $attribs . "'); return false;\" rel=\"noopener noreferrer\">" .
htmlspecialchars($label, ENT_COMPAT, 'UTF-8') . '</a>';
break;
case 3:
echo '<a href="' . htmlspecialchars($link, ENT_COMPAT, 'UTF-8') . '" rel="noopener noreferrer" data-bs-toggle="modal" data-bs-target="#linkModal">' .
htmlspecialchars($label, ENT_COMPAT, 'UTF-8') . ' </a>';
echo HTMLHelper::_(
'bootstrap.renderModal',
'linkModal',
[
'url' => $link,
'title' => $label,
'height' => '100%',
'width' => '100%',
'modalWidth' => '500',
'bodyHeight' => '500',
'footer' => '<button type="button" class="btn btn-secondary" data-bs-dismiss="modal" aria-hidden="true">'
. \Joomla\CMS\Language\Text::_('JLIB_HTML_BEHAVIOR_CLOSE') . '</button>'
]
);
break;
default:
// Open in parent window
echo '<a href="' . htmlspecialchars($link, ENT_COMPAT, 'UTF-8') . '" rel="nofollow">' .
htmlspecialchars($label, ENT_COMPAT, 'UTF-8') . ' </a>';
break;
}
?>
</li>
<?php endforeach; ?>
</ul>
</div>
<?php endif; ?>

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,93 @@
<?php
/**
* @package Joomla.Site
* @subpackage com_content
*
* @copyright (C) 2011 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
use Joomla\CMS\HTML\HTMLHelper;
// Create shortcut
$urls = json_decode($this->item->urls);
// Create shortcuts to some parameters.
$params = $this->item->params;
if ($urls && (!empty($urls->urla) || !empty($urls->urlb) || !empty($urls->urlc))) :
?>
<div class="com-content-article__links content-links">
<ul class="com-content-article__links content-list">
<?php
$urlarray = [
[$urls->urla, $urls->urlatext, $urls->targeta, 'a'],
[$urls->urlb, $urls->urlbtext, $urls->targetb, 'b'],
[$urls->urlc, $urls->urlctext, $urls->targetc, 'c']
];
foreach ($urlarray as $url) :
$link = $url[0];
$label = $url[1];
$target = $url[2];
$id = $url[3];
if (! $link) :
continue;
endif;
// If no label is present, take the link
$label = $label ?: $link;
// If no target is present, use the default
$target = $target ?: $params->get('target' . $id);
?>
<li class="com-content-article__link content-links-<?php echo $id; ?>">
<?php
// Compute the correct link
switch ($target) {
case 1:
// Open in a new window
echo '<a href="' . htmlspecialchars($link, ENT_COMPAT, 'UTF-8') . '" target="_blank" rel="nofollow noopener noreferrer">' .
htmlspecialchars($label, ENT_COMPAT, 'UTF-8') . '</a>';
break;
case 2:
// Open in a popup window
$attribs = 'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=600,height=600';
echo "<a href=\"" . htmlspecialchars($link, ENT_COMPAT, 'UTF-8') . "\" onclick=\"window.open(this.href, 'targetWindow', '" . $attribs . "'); return false;\" rel=\"noopener noreferrer\">" .
htmlspecialchars($label, ENT_COMPAT, 'UTF-8') . '</a>';
break;
case 3:
echo '<a href="' . htmlspecialchars($link, ENT_COMPAT, 'UTF-8') . '" rel="noopener noreferrer" data-bs-toggle="modal" data-bs-target="#linkModal">' .
htmlspecialchars($label, ENT_COMPAT, 'UTF-8') . ' </a>';
echo HTMLHelper::_(
'bootstrap.renderModal',
'linkModal',
[
'url' => $link,
'title' => $label,
'height' => '100%',
'width' => '100%',
'modalWidth' => '500',
'bodyHeight' => '500',
'footer' => '<button type="button" class="btn btn-secondary" data-bs-dismiss="modal" aria-hidden="true">'
. \Joomla\CMS\Language\Text::_('JLIB_HTML_BEHAVIOR_CLOSE') . '</button>'
]
);
break;
default:
// Open in parent window
echo '<a href="' . htmlspecialchars($link, ENT_COMPAT, 'UTF-8') . '" rel="nofollow">' .
htmlspecialchars($label, ENT_COMPAT, 'UTF-8') . ' </a>';
break;
}
?>
</li>
<?php endforeach; ?>
</ul>
</div>
<?php endif; ?>