Files
glastree/storage/framework/views/86d51c2a03999cce84648f83bef23fb2.php
T
2026-05-26 08:14:29 +02:00

344 lines
16 KiB
PHP
Executable File

<?php $__env->startSection('title', $evento->nome_evento); ?>
<?php $__env->startSection('page_title', 'Dettaglio Evento'); ?>
<?php $__env->startSection('breadcrumbs'); ?>
<li class="breadcrumb-item"><a href="/eventi">Eventi</a></li>
<li class="breadcrumb-item active"><?php echo e($evento->nome_evento); ?></li>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('content'); ?>
<div class="row">
<div class="col-md-8">
<div class="card card-primary">
<div class="card-header">
<h3 class="card-title">
<i class="fas fa-calendar mr-2"></i>
<?php echo e($evento->nome_evento); ?>
</h3>
</div>
<div class="card-body">
<?php if($evento->descrizione_evento): ?>
<p class="lead"><?php echo e($evento->descrizione_evento); ?></p>
<?php endif; ?>
<?php if($evento->descrizione): ?>
<div class="mt-3">
<h5>Descrizione Completa</h5>
<p><?php echo nl2br(e($evento->descrizione)); ?></p>
</div>
<?php endif; ?>
<?php if($evento->is_incontro_gruppo): ?>
<div class="alert alert-success mt-3">
<i class="fas fa-info-circle mr-1"></i>
<strong>Evento di incontro gruppo</strong>
</div>
<?php endif; ?>
</div>
</div>
<div class="card mt-3">
<div class="card-header"><h3 class="card-title"><i class="fas fa-clock mr-2"></i>Data e Orario</h3></div>
<div class="card-body">
<table class="table table-sm table-borderless mb-0">
<tr>
<td style="width: 150px;"><strong>Tipo:</strong></td>
<td>
<?php if($evento->tipo_recorrenza && $evento->tipo_recorrenza !== 'singolo'): ?>
<span class="badge badge-info"><?php echo e($evento->periodicita_label); ?></span>
<?php else: ?>
<span class="badge badge-secondary">Singolo</span>
<?php endif; ?>
</td>
</tr>
<?php if($evento->tipo_recorrenza === 'settimanale'): ?>
<tr>
<td><strong>Giorno:</strong></td>
<td><?php echo e($evento->giorno_settimana_label); ?></td>
</tr>
<?php elseif($evento->tipo_recorrenza === 'mensile'): ?>
<tr>
<td><strong>Occorrenza:</strong></td>
<td><?php echo e($evento->occorrenza_mensile_label); ?></td>
</tr>
<tr>
<td><strong>Mesi:</strong></td>
<td><?php echo e($evento->mesi_recorrenza_label); ?></td>
</tr>
<?php elseif($evento->tipo_recorrenza === 'annuale'): ?>
<tr>
<td><strong>Mese:</strong></td>
<td><?php echo e($evento->mese_annuale_label); ?></td>
</tr>
<?php elseif($evento->tipo_recorrenza === 'altro'): ?>
<tr>
<td><strong>Giorno:</strong></td>
<td><?php echo e($evento->giorno_settimana_label); ?></td>
</tr>
<?php else: ?>
<tr>
<td><strong>Data:</strong></td>
<td><?php echo e($evento->data_specifica?->format('d/m/Y') ?: '-'); ?></td>
</tr>
<?php endif; ?>
<?php if($evento->ora_inizio): ?>
<tr>
<td><strong>Ora Inizio:</strong></td>
<td><?php echo e($evento->ora_inizio->format('H:i')); ?></td>
</tr>
<?php endif; ?>
<?php if($evento->durata_minuti): ?>
<tr>
<td><strong>Durata:</strong></td>
<td><?php echo e($evento->durata_minuti); ?> minuti</td>
</tr>
<?php endif; ?>
</table>
</div>
</div>
<?php if($evento->luogo_indirizzo || $evento->luogo_url_maps): ?>
<div class="card mt-3">
<div class="card-header"><h3 class="card-title"><i class="fas fa-map-marker-alt mr-2"></i>Luogo</h3></div>
<div class="card-body">
<?php if($evento->luogo_indirizzo): ?>
<p class="mb-2"><i class="fas fa-location-dot text-danger mr-1"></i> <strong><?php echo e($evento->luogo_indirizzo); ?></strong></p>
<?php endif; ?>
<?php if($evento->luogo_url_maps): ?>
<div class="mb-2">
<a href="<?php echo e($evento->luogo_url_maps); ?>" target="_blank" class="btn btn-sm btn-outline-primary">
<i class="fas fa-external-link-alt mr-1"></i> Apri in Google Maps
</a>
</div>
<iframe
src="https://www.google.com/maps?q=<?php echo e(urlencode($evento->luogo_indirizzo ?: $evento->luogo_url_maps)); ?>&output=embed"
width="100%" height="200" style="border:0; border-radius: 8px;" allowfullscreen loading="lazy">
</iframe>
<?php endif; ?>
</div>
</div>
<?php endif; ?>
</div>
<div class="col-md-4">
<div class="card">
<div class="card-header"><h3 class="card-title"><i class="fas fa-folder mr-2"></i>Gruppi</h3></div>
<div class="card-body p-0">
<?php if($evento->gruppi->count() > 0): ?>
<table class="table table-sm mb-0">
<tbody>
<?php $__currentLoopData = $evento->gruppi; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $gruppo): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<tr>
<td>
<a href="/gruppi/<?php echo e($gruppo->id); ?>">
<i class="fas fa-folder text-warning mr-1"></i>
<?php echo e($gruppo->nome); ?>
</a>
</td>
</tr>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</tbody>
</table>
<?php else: ?>
<div class="text-center text-muted py-3 mb-0">
<span>Nessun gruppo associato</span>
</div>
<?php endif; ?>
</div>
</div>
<div class="card mt-3">
<div class="card-header"><h3 class="card-title"><i class="fas fa-user-tie mr-2"></i>Responsabili</h3></div>
<div class="card-body p-0">
<?php if($evento->responsabili->count() > 0): ?>
<table class="table table-sm mb-0">
<thead>
<tr>
<th>Nome</th>
<th>Contatto</th>
</tr>
</thead>
<tbody>
<?php $__currentLoopData = $evento->responsabili; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $resp): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<tr>
<td>
<a href="/individui/<?php echo e($resp->id); ?>">
<i class="fas fa-user text-info mr-1"></i>
<?php echo e($resp->cognome); ?> <?php echo e($resp->nome); ?>
</a>
</td>
<td>
<?php if($resp->telefono_primario): ?>
<small class="text-success"><?php echo e($resp->telefono_primario); ?></small>
<?php else: ?>
<span class="text-muted">-</span>
<?php endif; ?>
</td>
</tr>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</tbody>
</table>
<?php else: ?>
<div class="text-center text-muted py-3 mb-0">
<span>Nessun responsabile</span>
</div>
<?php endif; ?>
</div>
</div>
<?php if($evento->note): ?>
<div class="card mt-3">
<div class="card-header"><h3 class="card-title"><i class="fas fa-sticky-note mr-2"></i>Note</h3></div>
<div class="card-body">
<p class="mb-0"><?php echo nl2br(e($evento->note)); ?></p>
</div>
</div>
<?php endif; ?>
</div>
</div>
</div>
</div>
<div class="card mt-3">
<div class="card-header">
<h3 class="card-title"><i class="fas fa-file mr-2"></i>Documenti</h3>
<button type="button" class="btn btn-xs btn-success float-right" onclick="showDocumentoForm()">
<i class="fas fa-plus mr-1"></i> Carica
</button>
</div>
<div class="card-body p-0">
<div id="documento-add-form" style="display:none;" class="p-3 bg-light border-bottom">
<form action="/eventi/<?php echo e($evento->id); ?>/documenti" method="POST" enctype="multipart/form-data" class="mb-0">
<?php echo csrf_field(); ?>
<div class="row">
<div class="col-md-4">
<input type="text" name="nome_file" class="form-control form-control-sm" placeholder="Nome documento" required>
</div>
<div class="col-md-3">
<select name="tipologia" class="form-control form-control-sm" required>
<option value="">Tipologia...</option>
<option value="documento">Documento</option>
<option value="programma">Programma</option>
<option value="locandina">Locandina</option>
<option value="altro">Altro</option>
</select>
</div>
<div class="col-md-4">
<input type="file" name="file" class="form-control form-control-sm" required>
</div>
<div class="col-md-1">
<button type="submit" class="btn btn-xs btn-success"><i class="fas fa-upload mr-1"></i>Carica</button>
<button type="button" class="btn btn-xs btn-secondary" onclick="hideDocumentoForm()"><i class="fas fa-times"></i></button>
</div>
</div>
</form>
</div>
<?php if($evento->documenti && $evento->documenti->count() > 0): ?>
<table class="table table-bordered table-hover table-striped mb-0">
<thead class="thead-light">
<tr>
<th>Nome</th>
<th style="width: 120px;">Tipologia</th>
<th style="width: 80px;">Dimensione</th>
<th style="width: 130px;">Data Upload</th>
<th style="width: 80px;">Azioni</th>
</tr>
</thead>
<tbody>
<?php $__currentLoopData = $evento->documenti; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $documento): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<tr>
<td>
<i class="fas fa-file text-secondary mr-1"></i>
<?php echo e($documento->nome_file); ?>
</td>
<td><?php echo e(ucfirst($documento->tipologia)); ?></td>
<td><?php echo e(number_format($documento->dimensione / 1024, 1)); ?> KB</td>
<td><?php echo e($documento->created_at->format('d/m/Y')); ?></td>
<td>
<?php if($documento->file_path): ?>
<button type="button" class="btn btn-xs btn-primary" onclick="previewDocumento(<?php echo e($documento->id); ?>)" title="Anteprima">
<i class="fas fa-eye"></i>
</button>
<?php endif; ?>
<form action="/eventi/<?php echo e($evento->id); ?>/documenti/<?php echo e($documento->id); ?>" method="POST" class="d-inline">
<?php echo csrf_field(); ?> <?php echo method_field('DELETE'); ?>
<button type="submit" class="btn btn-xs btn-danger" onclick="return confirm('Eliminare questo documento?')" title="Elimina">
<i class="fas fa-trash"></i>
</button>
</form>
</td>
</tr>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</tbody>
</table>
<?php else: ?>
<div class="text-center text-muted py-4">
<i class="fas fa-file fa-2x mb-2"></i>
<p class="mb-0">Nessun documento</p>
</div>
<?php endif; ?>
</div>
</div>
<div class="mt-3">
<a href="/eventi/<?php echo e($evento->id); ?>/edit" class="btn btn-warning">
<i class="fas fa-edit mr-1"></i> Modifica
</a>
<form action="/eventi/<?php echo e($evento->id); ?>" method="POST" class="d-inline">
<?php echo csrf_field(); ?> <?php echo method_field('DELETE'); ?>
<button type="submit" class="btn btn-danger" onclick="return confirm('Confermi l\'eliminazione di <?php echo e($evento->nome_evento); ?>?')">
<i class="fas fa-trash mr-1"></i> Elimina
</button>
</form>
<a href="/eventi" class="btn btn-secondary">
<i class="fas fa-arrow-left mr-1"></i> Torna all'elenco
</a>
</div>
<?php $__env->stopSection(); ?>
<div class="modal fade" id="previewModal" tabindex="-1" role="dialog">
<div class="modal-dialog modal-lg" role="document" style="max-width: 90vw;">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title"><i class="fas fa-file mr-2"></i><span id="previewModalTitle">Anteprima</span></h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Chiudi">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body text-center p-0" style="min-height: 400px;">
<iframe id="previewFrame" src="" style="width: 100%; height: 70vh; border: none;"></iframe>
</div>
<div class="modal-footer">
<a id="previewDownloadBtn" href="#" class="btn btn-primary" download>
<i class="fas fa-download mr-1"></i> Scarica
</a>
<button type="button" class="btn btn-secondary" data-dismiss="modal">Chiudi</button>
</div>
</div>
</div>
</div>
<?php $__env->startSection('scripts'); ?>
<script>
function showDocumentoForm() {
document.getElementById('documento-add-form').style.display = 'block';
}
function hideDocumentoForm() {
document.getElementById('documento-add-form').style.display = 'none';
}
function previewDocumento(id) {
document.getElementById('previewFrame').src = '/documenti/' + id + '/preview';
document.getElementById('previewDownloadBtn').href = '/documenti/' + id + '/download';
$('#previewModal').modal('show');
}
</script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.adminlte', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /var/www/html/glastree/resources/views/eventi/show.blade.php ENDPATH**/ ?>