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;
}
/* Nome Uscita */
/* Nome (interno) */
#tabellaMescole th:nth-child(2),
#tabellaMescole td:nth-child(2) {
width: 360px;
max-width: 360px;
width: 240px;
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;
text-decoration: none;
font-weight: 600;
}
#tabellaMescole td:nth-child(2) a:hover {
#tabellaMescole td:nth-child(3) a:hover {
text-decoration: underline;
color: #0d6efd;
}
/* Q.tà totale */
#tabellaMescole th:nth-child(3),
#tabellaMescole td:nth-child(3) {
width: 140px;
max-width: 140px;
#tabellaMescole th:nth-child(4),
#tabellaMescole td:nth-child(4) {
width: 130px;
max-width: 130px;
}
/* Linee */
#tabellaMescole th:nth-child(4),
#tabellaMescole td:nth-child(4) {
width: 260px;
max-width: 260px;
#tabellaMescole th:nth-child(5),
#tabellaMescole td:nth-child(5) {
width: 220px;
max-width: 220px;
}
/* Certificati */
#tabellaMescole th:nth-child(5),
#tabellaMescole td:nth-child(5) {
width: 130px;
max-width: 130px;
#tabellaMescole th:nth-child(6),
#tabellaMescole td:nth-child(6) {
width: 120px;
max-width: 120px;
}
/* Stato */
#tabellaMescole th:nth-child(6),
#tabellaMescole td:nth-child(6) {
width: 130px;
max-width: 130px;
#tabellaMescole th:nth-child(7),
#tabellaMescole td:nth-child(7) {
width: 120px;
max-width: 120px;
}
/* Azioni */
#tabellaMescole th:nth-child(7),
#tabellaMescole td:nth-child(7) {
#tabellaMescole th:nth-child(8),
#tabellaMescole td:nth-child(8) {
width: 190px;
max-width: 190px;
white-space: normal;
@@ -358,6 +365,7 @@
}
</style>
</style>
</style>
</head>
<body>
@@ -396,6 +404,7 @@
<thead>
<tr>
<th>ID</th>
<th>Nome</th>
<th>Nome Uscita</th>
<th>Q. Totale</th>
<th>Linee Associate</th>
@@ -428,6 +437,7 @@
$sql = "
SELECT
m.id,
m.nome,
m.nomeuscita,
m.is_active,
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>
</tr>";
} else {
while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
@@ -474,7 +485,10 @@
$toggleText = $isActive ? "Disattiva" : "Attiva";
$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);
$certBadge = $nCert > 0
@@ -483,6 +497,7 @@
echo "<tr data-mescola-id='{$row['id']}'>
<td>{$row['id']}</td>
<td class='text-start' title=\"" . htmlspecialchars($row['nome'] ?? '', ENT_QUOTES) . "\">{$nomeSafe}</td>
<td>
<a href='scheda_mescola.php?id={$row['id']}' title='Apri scheda mescola'>
{$nomeUscitaSafe}
@@ -724,28 +739,27 @@
<div class="dz-queue" id="fQueue"></div>
<hr class="my-3">>
</div>
<hr class="my-3">
<div class="table-responsive">
<table class="table table-striped align-middle text-center" id="fTable">
<thead class="table-light">
<tr>
<th>Categoria</th>
<th>Titolo</th>
<th>Nome File</th>
<th>Caricato il</th>
<th>Azioni</th>
</tr>
</thead>
<tbody></tbody>
</table>
<div class="table-responsive">
<table class="table table-striped align-middle text-center" id="fTable">
<thead class="table-light">
<tr>
<th>Categoria</th>
<th>Titolo</th>
<th>Nome File</th>
<th>Caricato il</th>
<th>Azioni</th>
</tr>
</thead>
<tbody></tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
<?php include('jsinclude.php'); ?>
@@ -762,6 +776,11 @@
order: [
[0, 'desc']
],
columnDefs: [{
targets: [7],
orderable: false,
searchable: false
}],
pageLength: 25,
language: {
url: 'https://cdn.datatables.net/plug-ins/1.13.6/i18n/it-IT.json'