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.
104 righe
3.4 KiB
104 righe
3.4 KiB
<? |
|
if (isset($this) && is_a($this,"avvisiProcedura")) { |
|
global $config; |
|
global $root; |
|
$avvisi = $this->getAvvisi("N"); |
|
?> |
|
<div id="commands" class="mb-5"> |
|
<div class="commands container-fluid"> |
|
<div class="row"> |
|
<div class="col-12 text-right"> |
|
<button onClick="showModalWithURL('/backend/common/avvisi/edit.php?codice=0&modulo=<?= $this->modulo ?>&codice_elemento=<?= $this->elemento ?>&sub=<?= $this->sub ?>')" class="btn btn-success" title="<?= __('Aggiungi nuovo') ?>"><span class="fa fa-plus-circle"></span> <?= __('Aggiungi nuovo') ?></button> |
|
</div> |
|
</div> |
|
</div> |
|
</div> |
|
<? |
|
if (!empty($avvisi)) { |
|
?> |
|
<div class="card"> |
|
<div class="card-body"> |
|
<table class="table table-striped table-hover" width="100%" id="table-avvisiProcedura"> |
|
<thead> |
|
<tr> |
|
<th width="10"></th> |
|
<th width="100"></th> |
|
<th><?= __("Titolo") ?></th> |
|
<th width="130"><?= __("Data di pubblicazione") ?></th> |
|
<th width="10"></th> |
|
<th width="10"></th> |
|
<!-- <th width="10"></th> --> |
|
</tr> |
|
</thead> |
|
<tbody > |
|
|
|
</tbody> |
|
</table> |
|
<script> |
|
var tableAvvisi = $("#table-avvisiProcedura").DataTable({ |
|
"processing": true, |
|
"serverSide": true, |
|
"language": { |
|
"url": "/dictionary/datatables/<?= $_SESSION["language"] ?>.lang" |
|
}, |
|
"ajax": { |
|
"url": "/backend/common/avvisi/table-list.php", |
|
"data": function (d) { |
|
d.modulo = "<?= $this->modulo ?>", |
|
d.codice_elemento = "<?= $this->elemento ?>", |
|
d.sub = "<?= $this->sub ?>" |
|
} |
|
}, |
|
"order": [[3,"ASC"]], |
|
"lengthMenu": [[10, 25, 50, -1], [10, 25, 50, '<?= __("tutti") ?>']], |
|
"columns": [ |
|
{ "orderable": false }, |
|
{ "orderable": false }, |
|
null, |
|
null, |
|
{ "orderable": false }, |
|
{ "orderable": false }, |
|
// { "orderable": false } |
|
] |
|
}); |
|
</script> |
|
</div> |
|
</div> |
|
|
|
<? |
|
} else { |
|
alertManager::printWarningBox(__("Nessun risultato")); |
|
} |
|
?> |
|
<script> |
|
function confirmSubmitAvviso(status) { |
|
$("#stato-avviso").val(status); |
|
if (status != "N") { |
|
if (status == "S") { |
|
msg = "<?= __("Procedendo l'avviso sarà pubblicato alla data e ora stabilita") ?>"; |
|
} else if (status == "I") { |
|
msg = "<?= __("Procedendo l'avviso sarà immediatamente trasmesso ai destinatari e pubblicato alla data e ora stabilita") ?>"; |
|
} |
|
Swal({ |
|
title: js_dict["sei-sicuro"], |
|
text: msg, |
|
type: "warning", |
|
showCancelButton: true, |
|
confirmButtonColor: '#3085d6', |
|
cancelButtonColor: '#d33', |
|
confirmButtonText: js_dict.conferma, |
|
cancelButtonText: js_dict.annulla, |
|
closeOnConfirm: true |
|
}).then((result) => { |
|
if (result.value) { |
|
$("#submit-avviso-form").submit(); |
|
} |
|
}); |
|
} else { |
|
$("#submit-avviso-form").submit(); |
|
} |
|
} |
|
</script> |
|
<? |
|
} |
|
?>
|