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.
152 righe
6.0 KiB
152 righe
6.0 KiB
<?php |
|
$configPath = substr(__DIR__, 0, strpos(__DIR__, "public_html/")) . "config.php"; |
|
include $configPath; |
|
|
|
|
|
$modulo = modulo::getInfo($radice); |
|
|
|
if (empty($_SESSION["utente"]) || ! $_SESSION["utente"]->permission($radice)) { |
|
header('Location: /'); |
|
die(); |
|
} |
|
|
|
include_once ($beRoot."/layout/top.php"); |
|
?> |
|
<div class="container-fluid pt-5"> |
|
<div class="row"> |
|
<div class="col-12"> |
|
<p class="d-block display-4"> |
|
<i class="fa fa-fire-alt mr-4"></i><?= __("Novità") ?> |
|
</p> |
|
</div> |
|
</div> |
|
</div> |
|
<? |
|
$count = $changelog_parser->countAll(); |
|
if (!empty($count)): |
|
?> |
|
<div id="commands" class="mb-5"> |
|
<div class="commands container-fluid"> |
|
<div class="text-right"> |
|
<a href="/backend/<?= $radice ?>/edit.php?codice=0" class="btn btn-success" title="<?= __('Aggiungi nuovo') ?>"><span class="fa fa-plus-circle"></span> <?= __('Aggiungi nuovo') ?></a> |
|
<a class="btn btn-primary m-2" data-toggle="collapse" href="#search-container" role="button"><span class="fas fa-search"></span> <?=__('Ricerca')?></a> |
|
</div> |
|
</div> |
|
</div> |
|
<div id="search-container" class="collapse"> |
|
<div class="card p-2"> |
|
<div class="row px-0"> |
|
<div class="form-group col-6"> |
|
<label for="ricerca"><?=__('Ricerca')?>:</label> |
|
<input class="search form-control" type="text" name="ricerca" id="ricerca"> |
|
</div> |
|
|
|
<div class="col-6"> |
|
<label for="gerarchia"><?=__('Gerarchia')?>:</label> |
|
<select class="search custom-select" name="gerarchia" id="gerarchia"> |
|
<option value="all"><?= __('Tutti') ?></option> |
|
<? foreach ($changelog_parser->hierarchies as $key => $value) : ?> |
|
<option value="<?= $key ?>"><?= __($value) ?></option> |
|
<? endforeach; ?> |
|
</select> |
|
</div> |
|
|
|
<div class="form-group col-6"> |
|
<label for="inizio"><?=__('Data inizio')?>:</label> |
|
<input class="search form-control datetimepick" type="text" name="inizio" id="inizio"> |
|
</div> |
|
|
|
<div class="col-6"> |
|
<label for="fine"><?=__('Data fine')?>:</label> |
|
<input class="search form-control datetimepick" type="text" name="fine" id="fine"> |
|
</div> |
|
|
|
<div class="col-6"> |
|
<label for="modulo"><?=__('Modulo')?>:</label> |
|
<select class="search custom-select" name="modulo" id="modulo"> |
|
<option value="all"><?= __('Tutti') ?></option> |
|
<? foreach ($changelog_parser->modules as $key => $value) : ?> |
|
<option value="<?= $key ?>"><?= __($value) ?></option> |
|
<? endforeach; ?> |
|
</select> |
|
</div> |
|
|
|
<div class="form-group col-6"> |
|
<label for="tipologia"><?=__('Tipologia')?>:</label> |
|
<select class="search custom-select" name="type" id="type"> |
|
<option value="ALL"><?= __('Tutti') ?></option> |
|
<? foreach ($changelog_parser->severities as $key => $value) : ?> |
|
<option value="<?= $key ?>"><?= __($value["label"]) ?></option> |
|
<? endforeach; ?> |
|
</select> |
|
</div> |
|
</div> |
|
</div> |
|
</div> |
|
<div class="card card-body p-1 mt-5"> |
|
<div class="table-responsive"> |
|
<table class="table table-striped table-hover" id="tab-data" width="100%"> |
|
<thead> |
|
<tr> |
|
<th>#</th> |
|
<th><?=__('Contenuto')?></th> |
|
<th><?=__('Tipologia')?></th> |
|
<th><?=__('Timestamp')?></th> |
|
<th></th> |
|
</tr> |
|
</thead> |
|
<tbody> |
|
</tbody> |
|
</table> |
|
</div> |
|
</div> |
|
<script type="text/javascript"> |
|
|
|
var table = $("#tab-data").DataTable({ |
|
processing: true, |
|
serverSide: true, |
|
searching: false, |
|
language: { |
|
url: "/dictionary/datatables/<?=$_SESSION["language"]?>.lang" |
|
}, |
|
ajax: { |
|
url: "table.php", |
|
data: function (d) { |
|
d.inizio = $("#inizio").val(); |
|
d.fine = $("#fine").val(); |
|
d.module = $("#modulo").val(); |
|
d.search = $("#ricerca").val(); |
|
d.role = $("#gerarchia").val(); |
|
d.type = $("#type").val(); |
|
} |
|
}, |
|
order: [[0,"desc"]], |
|
lengthMenu: [[10, 25, 50, -1], [10, 25, 50, '<?=__('tutti')?>']], |
|
columns: [ |
|
{orderable:true}, |
|
{orderable:true}, |
|
{orderable:true}, |
|
{orderable:true}, |
|
{orderable:false} |
|
] |
|
}) |
|
|
|
$(".search").on('change', function(){ |
|
table.draw(); |
|
}) |
|
</script> |
|
<? |
|
else: |
|
?> |
|
<div class="row"> |
|
<div class="offset-lg-3 col-lg-6 col-12"> |
|
<? alertManager::printWarningBox(__("Nessun risultato")); ?> |
|
</div> |
|
</div> |
|
<? |
|
endif; |
|
include_once($beRoot."/layout/bottom.php"); |
|
?> |
|
</div> |
|
<? |
|
?>
|