added nome to mescole

This commit is contained in:
2026-07-24 14:18:05 +02:00
parent 151e3bbe95
commit 0427c73e8a
+59 -40
View File
@@ -99,55 +99,62 @@
max-width: 70px; max-width: 70px;
} }
/* Nome Uscita */ /* Nome (interno) */
#tabellaMescole th:nth-child(2), #tabellaMescole th:nth-child(2),
#tabellaMescole td:nth-child(2) { #tabellaMescole td:nth-child(2) {
width: 360px; width: 240px;
max-width: 360px; max-width: 240px;
} }
#tabellaMescole td:nth-child(2) a { /* Nome Uscita */
#tabellaMescole th:nth-child(3),
#tabellaMescole td:nth-child(3) {
width: 300px;
max-width: 300px;
}
#tabellaMescole td:nth-child(3) a {
color: #1f2d3d; color: #1f2d3d;
text-decoration: none; text-decoration: none;
font-weight: 600; font-weight: 600;
} }
#tabellaMescole td:nth-child(2) a:hover { #tabellaMescole td:nth-child(3) a:hover {
text-decoration: underline; text-decoration: underline;
color: #0d6efd; color: #0d6efd;
} }
/* Q.tà totale */ /* Q.tà totale */
#tabellaMescole th:nth-child(3), #tabellaMescole th:nth-child(4),
#tabellaMescole td:nth-child(3) { #tabellaMescole td:nth-child(4) {
width: 140px; width: 130px;
max-width: 140px; max-width: 130px;
} }
/* Linee */ /* Linee */
#tabellaMescole th:nth-child(4), #tabellaMescole th:nth-child(5),
#tabellaMescole td:nth-child(4) { #tabellaMescole td:nth-child(5) {
width: 260px; width: 220px;
max-width: 260px; max-width: 220px;
} }
/* Certificati */ /* Certificati */
#tabellaMescole th:nth-child(5), #tabellaMescole th:nth-child(6),
#tabellaMescole td:nth-child(5) { #tabellaMescole td:nth-child(6) {
width: 130px; width: 120px;
max-width: 130px; max-width: 120px;
} }
/* Stato */ /* Stato */
#tabellaMescole th:nth-child(6), #tabellaMescole th:nth-child(7),
#tabellaMescole td:nth-child(6) { #tabellaMescole td:nth-child(7) {
width: 130px; width: 120px;
max-width: 130px; max-width: 120px;
} }
/* Azioni */ /* Azioni */
#tabellaMescole th:nth-child(7), #tabellaMescole th:nth-child(8),
#tabellaMescole td:nth-child(7) { #tabellaMescole td:nth-child(8) {
width: 190px; width: 190px;
max-width: 190px; max-width: 190px;
white-space: normal; white-space: normal;
@@ -358,6 +365,7 @@
} }
</style> </style>
</style> </style>
</style>
</head> </head>
<body> <body>
@@ -396,6 +404,7 @@
<thead> <thead>
<tr> <tr>
<th>ID</th> <th>ID</th>
<th>Nome</th>
<th>Nome Uscita</th> <th>Nome Uscita</th>
<th>Q.tà Totale</th> <th>Q.tà Totale</th>
<th>Linee Associate</th> <th>Linee Associate</th>
@@ -428,6 +437,7 @@
$sql = " $sql = "
SELECT SELECT
m.id, m.id,
m.nome,
m.nomeuscita, m.nomeuscita,
m.is_active, m.is_active,
IFNULL(q.qty_totale, 0) AS qty_totale, IFNULL(q.qty_totale, 0) AS qty_totale,
@@ -460,6 +470,7 @@
<td class='text-muted'>-</td> <td class='text-muted'>-</td>
<td class='text-muted'>-</td> <td class='text-muted'>-</td>
<td class='text-muted'>-</td> <td class='text-muted'>-</td>
<td class='text-muted'>-</td>
</tr>"; </tr>";
} else { } else {
while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) { while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
@@ -474,7 +485,10 @@
$toggleText = $isActive ? "Disattiva" : "Attiva"; $toggleText = $isActive ? "Disattiva" : "Attiva";
$toggleClass = $isActive ? "btn-outline-warning" : "btn-outline-success"; $toggleClass = $isActive ? "btn-outline-warning" : "btn-outline-success";
$nomeUscitaSafe = htmlspecialchars($row['nomeuscita']); $nomeUscitaSafe = htmlspecialchars($row['nomeuscita'] ?? '');
$nomeSafe = trim((string)($row['nome'] ?? '')) !== ''
? htmlspecialchars($row['nome'])
: "<span class='text-muted'>—</span>";
$nCert = (int)($row['n_certificati'] ?? 0); $nCert = (int)($row['n_certificati'] ?? 0);
$certBadge = $nCert > 0 $certBadge = $nCert > 0
@@ -483,6 +497,7 @@
echo "<tr data-mescola-id='{$row['id']}'> echo "<tr data-mescola-id='{$row['id']}'>
<td>{$row['id']}</td> <td>{$row['id']}</td>
<td class='text-start' title=\"" . htmlspecialchars($row['nome'] ?? '', ENT_QUOTES) . "\">{$nomeSafe}</td>
<td> <td>
<a href='scheda_mescola.php?id={$row['id']}' title='Apri scheda mescola'> <a href='scheda_mescola.php?id={$row['id']}' title='Apri scheda mescola'>
{$nomeUscitaSafe} {$nomeUscitaSafe}
@@ -724,28 +739,27 @@
<div class="dz-queue" id="fQueue"></div> <div class="dz-queue" id="fQueue"></div>
<hr class="my-3">> <hr class="my-3">
</div>
<div class="table-responsive"> <div class="table-responsive">
<table class="table table-striped align-middle text-center" id="fTable"> <table class="table table-striped align-middle text-center" id="fTable">
<thead class="table-light"> <thead class="table-light">
<tr> <tr>
<th>Categoria</th> <th>Categoria</th>
<th>Titolo</th> <th>Titolo</th>
<th>Nome File</th> <th>Nome File</th>
<th>Caricato il</th> <th>Caricato il</th>
<th>Azioni</th> <th>Azioni</th>
</tr> </tr>
</thead> </thead>
<tbody></tbody> <tbody></tbody>
</table> </table>
</div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div>
<?php include('jsinclude.php'); ?> <?php include('jsinclude.php'); ?>
@@ -762,6 +776,11 @@
order: [ order: [
[0, 'desc'] [0, 'desc']
], ],
columnDefs: [{
targets: [7],
orderable: false,
searchable: false
}],
pageLength: 25, pageLength: 25,
language: { language: {
url: 'https://cdn.datatables.net/plug-ins/1.13.6/i18n/it-IT.json' url: 'https://cdn.datatables.net/plug-ins/1.13.6/i18n/it-IT.json'