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.
142 righe
6.1 KiB
142 righe
6.1 KiB
<? |
|
if (isset($this)) { |
|
$totali = $this->getTotaliPartecipanti($this->info["codice"]); |
|
$exportToken = generateStrongPassword(9,false,'lud'); |
|
$statusElenco = "btn-warning"; |
|
$iconElenco = "fa-eye-slash"; |
|
$labelElenco = "Partecipanti non visibili in area pubblica"; |
|
if ($this->showPartecipanti()) { |
|
$statusElenco = "btn-info"; |
|
$iconElenco = "fa-eye"; |
|
$labelElenco = "Partecipanti visibili in area pubblica"; |
|
} |
|
|
|
if (!empty($totali["generale"]) || $this->internalUsers) { ?> |
|
<div class="card mb-2"> |
|
<div class="card-body"> |
|
<? if (!empty($totali["generale"])) { ?> |
|
<div class="float-left btn-group-toggle px-2" data-toggle="buttons"> |
|
<? |
|
$first = true; |
|
foreach($totali AS $label => $count) { |
|
if (!empty($count)) { |
|
?> |
|
<label id="stato-<?= $label ?>-button" class="btn btn-default <?= $first ? "active" : "" ?>"> |
|
<input type="radio" class="readOnlyAvailable" name="status" <?= $first ? "checked" : "" ?> value="<?= $label ?>" onChange='table.draw();' autocomplete="off"> |
|
<span class='label-html'> |
|
<?= __($label) ?> |
|
<? |
|
if ($count > 0) { |
|
?> |
|
<span class="badge badge-primary"><?= $count ?></span> |
|
<? |
|
} |
|
?> |
|
</span> |
|
</label> |
|
<? |
|
$first = false; |
|
} |
|
} |
|
?> |
|
</div> |
|
<? } ?> |
|
<div class="float-right px-2"> |
|
<? if ($this->canShowPartecipanti() && $_SESSION["utente"]->permission($this->modulo,$this->info["codice"],"pubblica")) { ?> |
|
<?php $directory = static::getDirectory() ?> |
|
<a class="btn btn-sm <?= $statusElenco ?>" type="button" href="/backend/<?= $directory ?>/pubblica/index.php?codice=<?= $this->info["codice"] ?>"> |
|
<span class="fa <?= $iconElenco ?>"></span> <?= __($labelElenco) ?> |
|
</a> |
|
<? } ?> |
|
<? if ($this->internalUsers) { ?> |
|
<button class="btn btn-sm btn-success" type="button" onclick="showModalWithURL('addUserModal.php?codice=<?= $this->info["codice"]; ?>')"><span class="fa fa-plus"></span> <?= __("Aggiungi utente") ?></button> |
|
<? } ?> |
|
</div> |
|
<?php if (!empty($totali["integrazioni"])) : ?> |
|
<?php |
|
$filtriIntegrazioni = [ |
|
"no-richieste" => "Nessuna integrazione richiesta", |
|
"richieste" => "Richiesta integrazione", |
|
"no-risposte" => "Non risposto ad integrazione", |
|
"risposte" => "Risposto ad integrazione", |
|
]; |
|
?> |
|
<div class="float-right px-2" style="width:300px"> |
|
<select name="stato_integrazioni" class="custom-select" id="stato_integrazioni" onchange="table.draw()"> |
|
<option value=""><?= __("Tutti") ?></option> |
|
<?php foreach($filtriIntegrazioni AS $valueIntegrazione => $labelIntegrazione) : ?> |
|
<option value="<?= $valueIntegrazione ?>"><?= $labelIntegrazione ?></option> |
|
<?php endforeach ?> |
|
</select> |
|
</div> |
|
<?php endif ?> |
|
</div> |
|
</div> |
|
<? } ?> |
|
<? if (!empty($totali["generale"])) { ?> |
|
<div class="card"> |
|
<div class="card-body"> |
|
<table class="table table-striped table-hover" id="tab-data"> |
|
<thead> |
|
<tr> |
|
<th><?= __("Codice Fiscale") ?></th> |
|
<th><?= __("Denominazione") ?></th> |
|
<th><?= __("Data richiesta") ?></th> |
|
<th><?= __("Data abilitazione") ?></th> |
|
<th><?= __("Data scadenza") ?></th> |
|
<th><?= __("GG") ?></th> |
|
<th><?= __("Ultimo aggiornamento") ?></th> |
|
<th></th> |
|
</tr> |
|
</thead> |
|
<tbody> |
|
</tbody> |
|
</table> |
|
</div> |
|
<div class="card-footer mx-0 px-0"> |
|
<div class="d-flex flex-row-reverse m-0 p-0"> |
|
<div class="col-12 col-lg-4 col-xl-3"> |
|
<a href="export.php?exportToken=<?= $exportToken ?>&codice=<?= $this->info["codice"] ?>&format=csv" target="_blank" class="btn btn-block btn-info"><span class="fa fa-table"></span> <?= __("Esporta CSV") ?></a> |
|
</div> |
|
<div class="col-12 col-lg-4 col-xl-3"> |
|
<a href="export.php?exportToken=<?= $exportToken ?>&codice=<?= $this->info["codice"] ?>&format=pdf" target="_blank" class="btn btn-block btn-danger"><span class="fa fa-file-pdf"></span> <?= __("Esporta PDF") ?></a> |
|
</div> |
|
</div> |
|
</div> |
|
</div> |
|
<script> |
|
var table = $("#tab-data").DataTable({ |
|
"processing": true, |
|
"serverSide": true, |
|
"language": { |
|
"url": "/dictionary/datatables/<?= $_SESSION["language"] ?>.lang" |
|
}, |
|
"ajax": { |
|
"url": "table.php", |
|
"data": function (d) { |
|
d.stato = $('input[name=status]:checked').val(); |
|
d.stato_integrazioni = $('#stato_integrazioni').val(); |
|
d.exportToken = "<?= $exportToken ?>"; |
|
d.codice = '<?= $this->info["codice"] ?>'; |
|
} |
|
}, |
|
"order": [[2,'desc']], |
|
"lengthMenu": [[25, 50, -1], [25, 50, '<?= __("tutti") ?>']], |
|
"columns": [ |
|
{ "class":"text-center" }, |
|
null, |
|
{ "class":"text-center" }, |
|
{ "class":"text-center" }, |
|
{ "class":"text-center" }, |
|
{ "class":"text-center" }, |
|
{ "class":"text-center" }, |
|
{ "orderable": false, "class":"text-center" } |
|
] |
|
}); |
|
</script> |
|
<? |
|
} else { |
|
alertManager::printWarningBox("Nessun partecipante"); |
|
} |
|
} |
|
?>
|