Aggiunta campi per Allegato e titolo

This commit is contained in:
2025-09-10 17:51:59 +02:00
parent a4475ee6a5
commit a05b127a0e
5 changed files with 59 additions and 4 deletions

View File

@ -58,7 +58,8 @@ if ($canAdmin) {
<div class="col-md-9 col-12">
<h1 class="h2 mb-1"><?= $this->escape($item->title); ?></h1>
</div>
<?php //Condividi ?>
<?php //Condividi
?>
<div class="col-md-3 col-12 text-md-end mt-2 mt-md-0">
<a class="toggle-actions small text-decoration-none text-uppercase fw-bold d-flex justify-content-end align-items-center" style="color: #003274" href="#" title="Vedi azioni" data-bs-toggle="modal" data-bs-target="#modalaction" data-focus-mouse="false">
<span class="me-1">Condividi</span>
@ -143,7 +144,7 @@ if ($canAdmin) {
</div>
</div>
</div>
<?php if ($item->firma_obbligatoria && $this->getModel()->userCanFirmare($item->id, $this->getModel()->currentUser->id) && !empty($buttons)) : ?>
<div class="mt-4">
<div class="d-flex flex-wrap gap-2" data-sign-group="circolare-<?php echo (int)$item->id; ?>">
@ -187,10 +188,52 @@ if ($canAdmin) {
</div>
<?php endif; ?>
<div class="article-body mt-3">
<?php echo $item->description ; ?>
<?php echo $item->description; ?>
</div>
<h6>Allegati</h6>
<?php
$href = htmlspecialchars((string)($item->attachment ?? ''), ENT_QUOTES, 'UTF-8');
$label = htmlspecialchars((string)($item->allegato_titolo ?: 'Allegato'), ENT_QUOTES, 'UTF-8');
$title = 'Scarica ' . $label;
?>
<div class="row g-3 mb-2">
<div class="col-12 col-lg-6">
<div class="card card-documento card-bg card-icon rounded shadow-sm h-100">
<div class="card-body d-flex align-items-center">
<svg class="icon" aria-hidden="true" focusable="false" style="fill:#d1344c;">
<use xlink:href="/media/templates/site/tpl_istituzionale/images/sprites.svg#it-file-pdf"></use>
</svg>
<div class="card-icon-content">
<p class="mb-0">
<a
class="text-decoration-none"
href="<?php echo $href; ?>"
download
title="<?php echo htmlspecialchars($title, ENT_QUOTES, 'UTF-8'); ?>"
data-focus-mouse="false"
>
<strong><?php echo $label; ?></strong>
<span class="visually-hidden"> (file PDF)</span>
</a>
</p>
</div>
</div>
</div>
</div>
</div>
</div>
<style>
.card.card-icon .icon {
width: 34px;
height: 34px;
flex-shrink: 0;
margin: 0 8px 0 0;
}
</style>
<?php if ($canAdmin): ?>
<div class="card mt-4">