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.
134 righe
5.5 KiB
134 righe
5.5 KiB
<? |
|
$configPath = substr(__DIR__,0,strpos(__DIR__,"/public_html"))."/config.php"; |
|
include_once($configPath); |
|
if (isset($_SESSION["utente"]) && !empty($_SESSION["utente"]->oe)) { |
|
$modulo = modulo::getInfo($radice); |
|
$enti = $_SESSION["ente"]->entiBeneficiari(); |
|
$breadcrumb = []; |
|
$breadcrumb[""] = __("Area personale"); |
|
|
|
include_once($root."/layout/top.php"); |
|
?> |
|
<div class="container-fluid"> |
|
<h1><?= __("Qualifiche") ?></h1> |
|
|
|
<? |
|
$list = publicAlboFornitori::getList(); |
|
if (!empty($list)) { |
|
$stati = ["bozza"=>["titolo"=>"Bozza","color"=>"#AAA"],"valutazione"=>["titolo"=>"In valutazione","color"=>"#FA0"],"ammesso"=>["titolo"=>"Ammesso","color"=>"#0C0"],"archivio"=>["titolo"=>"Archivio","color"=>"#F33"]]; |
|
?> |
|
<div class="clearfix"> |
|
<div class="float-left btn-group-toggle mb-2" data-toggle="buttons"> |
|
<? |
|
$first = true; |
|
$total = 0; |
|
$i = 0; |
|
foreach($stati AS $stat => $stato) { |
|
$i++; |
|
$count = count(publicAlboFornitori::getList(["b_bandi_albo.stato"=>$stat],[],0,-1)); |
|
?> |
|
<label style="border-bottom: 5px solid <?= $stato["color"] ?>" id="stato-<?= $stat ?>-button" class="btn btn-default"> |
|
<input type="radio" name="status" <?= (($count > 0 || ($i == count($stati))) && $first) ? "checked" : "" ?> value="<?= $stat ?>" onChange='table.draw();' autocomplete="off"> |
|
<span class='label-html'> |
|
<?= __($stato["titolo"]) ?> |
|
<? |
|
if ($count > 0) { |
|
$first = false; |
|
?> |
|
<span class="badge badge-primary"><?= $count ?></span> |
|
<? |
|
} |
|
?> |
|
</span> |
|
</label> |
|
<? |
|
} |
|
$count = count($list); |
|
?> |
|
</div> |
|
<div class="float-right"> |
|
<a href="/archivio_albo/index.php" class="btn btn-info"><?= __("Visualizza tutti") ?></a> |
|
</div> |
|
</div> |
|
<div class="card"> |
|
<div class="card-header"> |
|
<div class="form-group"> |
|
<label for="tipologia"><?= __("Tipologia") ?></label> |
|
<select name="status" id="filtroTipologia" onChange="table.draw();" class="form-control"> |
|
<option value=""><?= __("Tutti") ?></option> |
|
<? |
|
foreach(AlboFornitori::getTipologie() AS $stat => $stato) { |
|
?> |
|
<option value="<?= $stat ?>"> |
|
<?= __($stato) ?> |
|
</option> |
|
<? |
|
} |
|
?> |
|
</select> |
|
</div> |
|
</div> |
|
<div class="card-body"> |
|
<div class="table-responsive"> |
|
<table class="table table-striped table-hover" id="tab-data" width="100%"> |
|
<thead> |
|
<tr> |
|
<th width="10"></th> |
|
<th width="10"></th> |
|
<th width="10"><?= __("ID") ?></th> |
|
<th><?= __("Oggetto") ?></th> |
|
<th width="100"><?= __("Pubblicazione") ?></th> |
|
<th width="100"><?= __("Tipologia") ?></th> |
|
<? if (count($enti) > 1) { ?><th><?= __("Beneficiario") ?><? } ?> |
|
<th width="10"></th> |
|
</tr> |
|
</thead> |
|
<tbody> |
|
</tbody> |
|
</table> |
|
</div> |
|
</div> |
|
</div> |
|
<script> |
|
var table = $("#tab-data").DataTable({ |
|
"processing": true, |
|
"serverSide": true, |
|
"language": { |
|
"url": "/dictionary/datatables/<?= $_SESSION["language"] ?>.lang" |
|
}, |
|
"ajax": { |
|
"url": "/albo_fornitori/table.php", |
|
"data": function (d) { |
|
d.stato = $('input[name=status]:checked').val(); |
|
d.tipologia = $('#filtroTipologia').val(); |
|
} |
|
}, |
|
"order": [[2,'desc']], |
|
"lengthMenu": [[10, 25, 50, -1], [10, 25, 50, '<?= __("tutti") ?>']], |
|
"columns": [ |
|
{ "orderable": false }, |
|
{ "orderable": false, "class": "text-center" }, |
|
{"class": "text-center"}, |
|
null, |
|
{"class": "text-center"}, |
|
{"class": "text-center"}, |
|
<? if (count($enti) > 1) { ?>{ "orderable": false },<? } ?>{ "orderable": false } |
|
] |
|
}); |
|
</script> |
|
<? |
|
} else { |
|
?> |
|
<div class="row"> |
|
<div class="offset-lg-3 col-lg-6 col-12"> |
|
<?= alertManager::printWarningBox(__("Nessun risultato")); ?> |
|
</div> |
|
</div> |
|
<? |
|
} |
|
?> |
|
</div> |
|
<? |
|
include_once($root."/layout/bottom.php"); |
|
} |
|
?>
|