home listd ocument
This commit is contained in:
parent
6a7a346a76
commit
bd350d3e2f
@ -101,6 +101,8 @@ while ($row = $queryPages->fetch_assoc()) {
|
|||||||
<script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.11.7/dist/umd/popper.min.js"></script>
|
<script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.11.7/dist/umd/popper.min.js"></script>
|
||||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha3/dist/js/bootstrap.min.js"></script>
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha3/dist/js/bootstrap.min.js"></script>
|
||||||
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
|
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
|
||||||
|
<!-- Select2 CSS -->
|
||||||
|
<link href="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.13/css/select2.min.css" rel="stylesheet">
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
/* Personalizza la riga della sezione */
|
/* Personalizza la riga della sezione */
|
||||||
@ -277,21 +279,20 @@ while ($row = $queryPages->fetch_assoc()) {
|
|||||||
|
|
||||||
<div class="row mb-4">
|
<div class="row mb-4">
|
||||||
<div class="col-12 text-center">
|
<div class="col-12 text-center">
|
||||||
<div class="btn-group" role="group" aria-label="Pagine">
|
<label for="pageSelectDropdown" class="fw-bold d-block mb-2">Seleziona Categoria:</label>
|
||||||
<?php foreach ($pages as $page) {
|
<select id="pageSelectDropdown" class="form-control w-50 mx-auto">
|
||||||
if ($page['slug'] !== 'person') { ?>
|
<?php foreach ($pages as $page) { ?>
|
||||||
<button
|
<option value="?docpage=<?php echo htmlspecialchars($page['slug']); ?>&idhome=<?php echo htmlspecialchars($idhome); ?>"
|
||||||
class="btn btn-outline-primary filter-btn <?php echo $docpage === $page['slug'] ? 'active' : ''; ?>"
|
<?php echo ($docpage === $page['slug']) ? 'selected' : ''; ?>>
|
||||||
onclick="window.location.href='?docpage=<?php echo htmlspecialchars($page['slug']); ?>&idhome=<?php echo htmlspecialchars($idhome); ?>';">
|
<?php echo ucfirst(htmlspecialchars($page['namepages'])); ?>
|
||||||
<?php echo ucfirst(htmlspecialchars($page['namepages'])); ?>
|
</option>
|
||||||
</button>
|
<?php } ?>
|
||||||
<?php }
|
</select>
|
||||||
} ?>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Sezioni per documenti -->
|
<!-- Sezioni per documenti -->
|
||||||
<div class="accordion" id="documentSections">
|
<div class="accordion" id="documentSections">
|
||||||
<?php foreach ($documents as $sectionName => $sectionDocuments) { ?>
|
<?php foreach ($documents as $sectionName => $sectionDocuments) { ?>
|
||||||
@ -622,6 +623,27 @@ while ($row = $queryPages->fetch_assoc()) {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
<!-- Select2 JS -->
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.13/js/select2.min.js"></script>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
$(document).ready(function() {
|
||||||
|
// Inizializza Select2 con uno stile migliore
|
||||||
|
$("#pageSelectDropdown").select2({
|
||||||
|
placeholder: "Seleziona una categoria...",
|
||||||
|
allowClear: true,
|
||||||
|
theme: "classic",
|
||||||
|
width: 'resolve' // Adatta il dropdown
|
||||||
|
});
|
||||||
|
|
||||||
|
// Cambia pagina automaticamente al cambio di selezione
|
||||||
|
$("#pageSelectDropdown").on("change", function() {
|
||||||
|
window.location.href = $(this).val();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
Loading…
x
Reference in New Issue
Block a user