Non puoi selezionare più di 25 argomenti
Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
85 righe
3.3 KiB
85 righe
3.3 KiB
<? |
|
if (!empty($sopralluoghi) && !empty($radice)) { |
|
?> |
|
<div class="card card-body"> |
|
<div class="table-responsive"> |
|
<table class="table table-striped" id="list-sopralluoghi"> |
|
<thead> |
|
<tr> |
|
<th width="5"></th> |
|
<th width="100"></th> |
|
<th width="15%"><?= __("Appuntamento") ?></th> |
|
<th><?= __("Richiesta") ?></th> |
|
<? if (empty($hideName)) { ?> |
|
<th width="20%"><?= __("Mittente") ?></th> |
|
<? } ?> |
|
<th width="15%"><?= __("Timestamp richiesta") ?></th> |
|
<th width="10"></th> |
|
</tr> |
|
</thead> |
|
<tbody > |
|
<? |
|
foreach($sopralluoghi AS $sopralluogo) { |
|
$stato = "bg-warning"; |
|
$stato_label = __('In attesa'); |
|
if ($sopralluogo["attivo"]=="S") { |
|
$stato = "bg-info"; |
|
$stato_label = __('Programmato'); |
|
} else if ($sopralluogo["attivo"]=="N") { |
|
$stato = "bg-danger"; |
|
$stato_label = __('Rifiutato'); |
|
} else if ($sopralluogo["attivo"]=="C") { |
|
$stato = "bg-success"; |
|
$stato_label = __('Eseguito'); |
|
} |
|
?> |
|
<tr> |
|
<td> |
|
<div id="flag_<?= $sopralluogo["codice"] ?>" class="status_flag <?= $stato ?>"><span class="sr-only"><?= $stato_label ?></span></div> |
|
</td> |
|
<td> |
|
<?= $stato_label ?> |
|
</td> |
|
<td> |
|
<?= mysql2datetime($sopralluogo["appuntamento"]) ?> |
|
</td> |
|
<td style="position:relative"> |
|
<?= substr($sopralluogo["richiesta"],0,255) ?> |
|
<?= (strlen($sopralluogo["richiesta"]) > 255) ? "..." : ""; ?> |
|
</td> |
|
<? if (empty($hideName)) { ?> |
|
<td><a href='#' onClick='showCompany(<?= $sopralluogo["codice_richiedente"] ?>)'><?= $sopralluogo["ragione_sociale"] ?></a></td> |
|
<? } ?> |
|
<td><span class="hide collapse"><?= $sopralluogo["timestamp_richiesta"] ?></span><?= mysql2datetime($sopralluogo["timestamp_richiesta"]) ?></td> |
|
<td width="10"><a href='edit.php?codice=<?= $sopralluogo["codice"] ?><?= $editQueryString ?? '' ?>' title='<?= __("modifica") ?>' class='btn btn-info btn-sm'><span class='fa fa-pencil-alt'></span></a></td> |
|
</tr> |
|
<? |
|
} |
|
?> |
|
</tbody> |
|
</table> |
|
<script> |
|
$("#list-sopralluoghi").DataTable({ |
|
"language": { |
|
"url": "/dictionary/datatables/<?= $_SESSION["language"] ?>.lang" |
|
}, |
|
"lengthMenu": [[10, 25, 50, 100], [10, 25, 50, 100]], |
|
"order": [[0,'ASC']], |
|
"columns": [ |
|
{ "orderable": true, "class": 'fit-width' }, |
|
{ "orderable": true, "class": 'fit-width' }, |
|
{ "orderable": true, "class": 'fit-width' }, |
|
{ "orderable": true, "class": 'fit-width' }, |
|
<? if (empty($hideName)) { ?> |
|
{ "orderable": true, "class": 'fit-width' }, |
|
<? } ?> |
|
{ "orderable": true, "class": 'fit-width' }, |
|
{ "orderable": false, "class": 'fit-width' } |
|
] |
|
}); |
|
</script> |
|
</div> |
|
</div> |
|
<? |
|
} |
|
?>
|