118 lines
6.7 KiB
PHP
Executable File
118 lines
6.7 KiB
PHP
Executable File
|
|
<div class="page-content">
|
|
<div class="header-section mb-4">
|
|
<div class="d-flex flex-column flex-md-row align-items-md-center justify-content-between bg-white p-3 shadow-sm border-start border-info border-4" style="border-radius: var(--radius-md);">
|
|
<div class="d-flex align-items-center">
|
|
<div class="icon-shape bg-info-ghost text-info rounded-circle me-3" style="width: 48px; height: 48px; display: flex; align-items: center; justify-content: center;">
|
|
<i class="fas fa-users fs-4"></i>
|
|
</div>
|
|
<div>
|
|
<h4 id="titre-page" class="mb-0 fw-bold text-uppercase"><?= _("Gestion des liens de Parenté") ?></h4>
|
|
<p class="text-muted small mb-0"><?= _("Paramétrez les statuts familiaux qui peuvent être couverts selon les règles des contrats") ?></p>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="position-relative mt-3 mt-md-0" style="min-width: 300px;">
|
|
<i class="fas fa-search position-absolute top-50 start-0 translate-middle-y ms-3 text-muted"></i>
|
|
<input type="text" id="globalSearch" class="form-control ps-5 border-2 rounded-pill shadow-none" style="font-size: 0.85rem;" placeholder="<?= _('Rechercher un lien...') ?>">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="card border-0 shadow-sm overflow-hidden" style="border-radius: var(--radius-md);">
|
|
<div class="card-body p-0">
|
|
<div class="table-responsive">
|
|
<table class="table table-hover align-middle mb-0">
|
|
<thead class="bg-light text-muted small text-uppercase">
|
|
<tr>
|
|
<th width="15%" class="ps-4 border-0 text-center"><?= _("Code") ?></th>
|
|
<th class="border-0"><?= _("Désignation") ?></th>
|
|
<th width="20%" class="border-0 text-center"><?= _("Statut Actif") ?></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php foreach ($liensparente as $v):
|
|
$idLien = $this->nettoyer($v['id']);
|
|
$codeLienParente = $this->nettoyer($v['codeLienParente']);
|
|
$enVigueur = $this->nettoyer($v['enVigueur']);
|
|
$btnVisible = ($codeLienParente=="A" || $codeLienParente=="C" || $codeLienParente=="E") ? "1" : "0";
|
|
|
|
$libelle = est_anglophone() ? $this->nettoyer($v['libelleEng']) : $this->nettoyer($v['libelle']);
|
|
$actifTxt = est_anglophone() ? ($enVigueur == "1" ? "Yes" : "No") : ($enVigueur == "1" ? "Oui" : "Non");
|
|
?>
|
|
<tr class="searchable-row">
|
|
<td class="text-center">
|
|
<span class="badge bg-primary-ghost text-primary fw-bold px-3 py-2" style="min-width: 45px;">
|
|
<?= $codeLienParente ?>
|
|
</span>
|
|
</td>
|
|
<td class="fw-bold text-dark"><?= $libelle ?></td>
|
|
<td class="text-center">
|
|
<?php if($enVigueur == "1"): ?>
|
|
<?php if($btnVisible == "1"): ?>
|
|
<span class="badge bg-success-ghost text-success rounded-pill px-3 py-2 fw-bold text-uppercase">
|
|
<i class="fas fa-check-circle me-1"></i><?= $actifTxt ?>
|
|
</span>
|
|
<?php else: ?>
|
|
<button class="btn btn-sm btn-primary rounded-pill px-4 fw-bold shadow-sm"
|
|
onclick="javascript:modifier_lien_parente(<?= $idLien ?>)">
|
|
<i class="fas fa-sync-alt me-1"></i><?= $actifTxt ?>
|
|
</button>
|
|
<?php endif; ?>
|
|
<?php else: ?>
|
|
<button class="btn btn-sm btn-danger rounded-pill px-4 fw-bold shadow-sm text-uppercase"
|
|
onclick="javascript:modifier_lien_parente(<?= $idLien ?>)">
|
|
<i class="fas fa-times-circle me-1"></i><?= $actifTxt ?>
|
|
</button>
|
|
<?php endif; ?>
|
|
</td>
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<!-- Pied de carte -->
|
|
<div class="card-footer bg-light border-top border-2 px-4 py-3 d-flex align-items-center justify-content-between" style="border-color: #f1f4f6 !important;">
|
|
<div class="d-flex align-items-center text-muted small">
|
|
<div class="icon-shape bg-info-ghost text-info rounded-circle me-3" style="width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;">
|
|
<i class="fas fa-shield-alt"></i>
|
|
</div>
|
|
<div>
|
|
<span class="fw-bold text-dark d-block"><?= _("Sécurité du système") ?></span>
|
|
<?= _("Les codes (A, C, E) sont protégés pour garantir l'intégrité des calculs de cotisations. Les autres liens sont paramétrables selon vos besoins.") ?>
|
|
</div>
|
|
</div>
|
|
<div id="footer-count" class="badge bg-white text-primary border px-3 py-2 rounded-pill shadow-xs"></div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="modal fade" id="div_maj_lien" tabindex="-1" aria-hidden="true">
|
|
</div>
|
|
</div>
|
|
|
|
<script>
|
|
window.addEventListener('load', function() {
|
|
if (typeof jQuery !== 'undefined') {
|
|
// La fonction détecte seule #globalSearch et lie la recherche !
|
|
initSmartTable('.table', 'Gestion des Liens de Parenté', false);
|
|
}
|
|
});
|
|
</script>
|
|
|
|
<style>
|
|
|
|
.table td {
|
|
padding-top: 0.85rem;
|
|
padding-bottom: 0.85rem;
|
|
border-bottom: 1px solid #f1f4f6;
|
|
}
|
|
|
|
.bg-info-ghost { background: rgba(0, 184, 212, 0.08) !important; color: #00b8d4 !important; }
|
|
.bg-primary-ghost { background: rgba(33, 46, 83, 0.08) !important; color: #212e53 !important; }
|
|
.bg-success-ghost { background: rgba(39, 174, 96, 0.12) !important; color: #27ae60 !important; }
|
|
|
|
/* Animation des boutons */
|
|
.btn-sm { transition: all 0.2s ease; }
|
|
.btn-sm:hover { transform: translateY(-1px); box-shadow: 0 4px 8px rgba(0,0,0,0.1) !important; }
|
|
</style>
|