newdesigngestionnaire/Vue/Collegetype/index.php
2026-03-16 20:58:03 +00:00

86 lines
4.6 KiB
PHP
Executable File

<div class="page-content animate__animated animate__fadeIn">
<div class="header-section mb-4">
<div class="d-flex align-items-center justify-content-between bg-white p-3 shadow-sm border-start border-primary border-4" style="border-radius: var(--radius-md);">
<div class="d-flex align-items-center">
<div class="icon-shape bg-primary-ghost text-primary rounded-circle me-3" style="width: 48px; height: 48px; display: flex; align-items: center; justify-content: center;">
<i class="fas fa-users-cog fs-4"></i>
</div>
<div>
<h4 class="mb-0 fw-bold text-uppercase"><?= _("Collèges Types") ?></h4>
<p class="text-muted small mb-0"><?= _("Gestion des catégories de collèges pour les contrats") ?></p>
</div>
</div>
<button class="btn btn-primary rounded-pill px-4 fw-bold shadow-sm btn-sm" onclick="nouveaucollegetype();">
<i class="fas fa-plus me-1"></i> <?= _("Nouveau Collège") ?>
</button>
</div>
</div>
<div class="card border-0 shadow-sm">
<div class="card-body p-0">
<div class="table-responsive">
<table class="table table-hover align-middle mb-0 datatable-colleges" style="width:100%; font-size: 9.5pt;">
<thead class="bg-light">
<tr>
<th class="py-3 ps-3 text-center" width="15%">Code</th>
<th class="py-3"><?= _("Libellé") ?></th>
<th class="py-3 text-center" width="15%"><?= _("Actions") ?></th>
</tr>
</thead>
<tbody>
<?php foreach ($donnees as $v):
$idTable = $this->nettoyer($v['id']);
$libelle = est_anglophone() ? $this->nettoyer($v['libelleEng']) : $this->nettoyer($v['libelle']);
?>
<tr>
<td class="ps-3 text-center fw-bold text-primary">
<span class="badge bg-primary-ghost text-primary px-3"><?= $this->nettoyer($v['codeCollegeType']) ?></span>
</td>
<td class="fw-bold text-dark"><?= $libelle ?></td>
<td class="text-center">
<div class="btn-group shadow-xs rounded-pill bg-white border p-1">
<button class="btn btn-link btn-sm text-warning p-1 mx-1 action-icon"
title="<?= _("Modifier") ?>"
onClick="modifier_college_type(<?= $idTable ?>);">
<i class="fas fa-edit"></i>
</button>
<button class="btn btn-link btn-sm text-danger-light p-1 mx-1 action-icon d-none"
title="<?= _("Supprimer") ?>"
onClick="supprimer_college_type(<?= $idTable ?>);">
<i class="fas fa-trash"></i>
</button>
</div>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
<div id="div_nouveaucollegetype" class="modal fade animate__animated animate__fadeInDown">
</div>
<style>
.bg-primary-ghost { background-color: rgba(33, 46, 83, 0.08) !important; }
.btn-link { text-decoration: none; border: none; background: transparent; transition: all 0.2s ease-in-out; }
.action-icon:hover { transform: scale(1.25); }
/* Style spécifique pour le bouton d'édition dans le tableau */
.text-warning { color: #f39c12 !important; }
.datatable-colleges thead th { vertical-align: middle; border-bottom: 2px solid #eee; }
.table-hover tbody tr:hover { background-color: rgba(33, 46, 83, 0.02); }
</style>
<script>
// Initialisation automatique de la SmartTable
var checkDTColleges = setInterval(function() {
if (typeof initSmartTable === 'function') {
initSmartTable('.datatable-colleges', 'Liste_Colleges_Types', false);
clearInterval(checkDTColleges);
}
}, 100);
</script>