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.
75 righe
2.9 KiB
75 righe
2.9 KiB
<? |
|
$configPath = substr(__DIR__,0,strpos(__DIR__,"/public_html"))."/config.php"; |
|
include_once($configPath); |
|
if (isset($_SESSION["utente"]) && $_SESSION["utente"]->ruolo == "SAD") { |
|
$moduli = modulo::getModuli(); |
|
$count = count($moduli); |
|
$completed = 0; |
|
$migrated = 0; |
|
$migration = 0; |
|
?> |
|
|
|
<h1 class="float-left"> |
|
Avanzamento Sviluppo |
|
</h1> |
|
<div class="float-right text-right"> |
|
<button type="button" onclick="$('.module-status').show()">Tutti</button> |
|
<button type="button" onclick="$('.module-status').hide(); $('.pending-develop').show()">Da sviluppare</button> |
|
<button type="button" onclick="$('.module-status').hide(); $('.pending-migration').show()">Da migrare</button> |
|
</div> |
|
<div class="clearfix"></div> |
|
<div class="row"> |
|
<? |
|
foreach($moduli AS $modulo) { |
|
if ($modulo["completed"] == "S") { $completed++; } |
|
$selectionClass = "pending-develop"; |
|
$class = "bg-danger text-dark"; |
|
$classM = "bg-disabled text-dark"; |
|
$labelM = "n.a."; |
|
if ($modulo["completed"] == "S") { |
|
$class = "bg-success text-white"; |
|
$selectionClass = "complete-develop"; |
|
} |
|
if ($modulo["completed"] == "W") { $class = "bg-warning text-white progress-bar-striped"; } |
|
if (isset($modulo["migration"])) { |
|
$migration++; |
|
$labelM = "Da migrare"; |
|
$classM = "bg-warning text-white progress-bar-striped"; |
|
if ($modulo["migration"]) { |
|
$selectionClass .= " complete-migration "; |
|
$migrated++; |
|
$labelM = "Migrato"; |
|
$classM = "bg-success text-white"; |
|
} else { |
|
$selectionClass .= " pending-migration "; |
|
} |
|
} |
|
?> |
|
<div class="col-12 col-lg-3 my-2 module-status <?= $selectionClass ?>"> |
|
<div class="card"> |
|
<div class="card-body p-1 text-center <?= $class ?>"> |
|
<span class="fa fa-<?= $modulo["icon"] ?>"></span> |
|
<?= $modulo["titolo"] ?> |
|
</div> |
|
<div class="card-footer p-0 text-center <?= $classM ?>"> |
|
<small><?= $labelM ?></small> |
|
</div> |
|
</div> |
|
</div> |
|
<? |
|
} |
|
?> |
|
</div> |
|
<div class="progress"> |
|
<div class="progress-bar progress-bar-striped bg-success" role="progressbar" style="width: <?= ceil(($completed / $count) * 100) ?>%" aria-valuenow="<?= ceil(($completed / $count) * 100) ?>" aria-valuemin="0" aria-valuemax="100"> |
|
Sviluppo <?= ceil(($completed / $count) * 100) ?>% |
|
</div> |
|
</div> |
|
<div class="progress"> |
|
<div class="progress-bar progress-bar-striped bg-info" role="progressbar" style="width: <?= ceil(($migrated / $migration) * 100) ?>%" aria-valuenow="<?= ceil(($migrated / $migration) * 100) ?>" aria-valuemin="0" aria-valuemax="100"> |
|
Migrazione <?= ceil(($migrated / $migration) * 100) ?>% |
|
</div> |
|
</div> |
|
<? |
|
} |
|
?>
|