This commit is contained in:
KONE SOREL 2026-03-06 17:11:34 +00:00
parent 96ec420ac8
commit abffcf887d

View File

@ -1,84 +1,54 @@
<?php <?php $superUser = $_SESSION['superUser'] ?? 0; ?>
$nbreTotal = count($pays);
if($nbreTotal < 10){
$nbreTotal = '0'.$nbreTotal;
}else{
$nbreTotal = format_N($nbreTotal);
}
if (est_anglophone()){
if($existeselection){
$libbouton = "Uncheck all";
}else{
$libbouton = "Check all";
}
}else{
if($existeselection){
$libbouton = "Décocher tous";
}else{
$libbouton = "Cocher tous";
}
}
?>
<?php $superUser = $_SESSION['superUser']; ?> <div class="card border-0 shadow-sm overflow-hidden" style="border-radius: var(--radius-md);">
<div class="card-header bg-white py-3 border-bottom-0 d-flex justify-content-between align-items-center">
<h6 class="mb-0 fw-bold text-uppercase text-primary small">
<i class="fas fa-globe-africa me-2"></i><?= _("Liste des Pays de référence") ?>
</h6>
<span class="badge bg-primary-ghost text-primary px-3 py-2 rounded-pill fw-bold" id="badge-total">
0 <?= _("Lignes") ?>
</span>
</div>
<table style="margin: auto" class="table-responsive"> <div class="card-body p-0">
<tbody> <div class="table-responsive">
<td><input class="form-control" style="text-align: center; font-size:10pt;" type="text" id="nbreTotal" name="nbreTotal" value="<?= _("Lignes Total").": ". $nbreTotal; ?>" readonly> </td> <table id="tableLister" class="table table-hover align-middle mb-0 datatable-inter" style="width:100%">
</tbody> <thead class="bg-light text-muted small text-uppercase">
</table> <tr>
<input type="hidden" id="total" value="<?= $nbreTotal; ?>"> <th class="ps-4 border-0"><?= _("Centre") ?></th>
<table id="tableLister" class="table table-striped table-bordered table-hover table-condensed table-responsive compact"> <th class="border-0 text-center"><?= _("Code") ?></th>
<thead> <th class="border-0"><?= _("Libellé") ?></th>
<tr> <th class="border-0 text-center pe-4"><?= _("Actions") ?></th>
<th class="text-center"><?= _("Centre gestion") ?></th> </tr>
<th class="text-center">Code</th> </thead>
<th class="text-center"><?= _("Libellé") ?></th> <tbody>
<!-- <?php foreach ($pays as $v):
<th class="text-center"> $idData = $this->nettoyer($v['id']);
<button type="button" style="font-size:10pt; font-weight: bold; width:100%; background-color:#4caf50; color: white;" class="form-control btn" onclick="javascript:cocherDecocherTout($('#fichier_lister').val());" > <?= $libbouton; ?> </button> ?>
</th> <tr>
--> <td class="ps-4 fw-medium text-dark"><?= $this->nettoyer($v['codeSociete']) ?></td>
<th class="text-center"><?= _("Modifier") ?></th> <td class="text-center">
<!-- <span class="badge bg-light text-dark fw-bold border"><?= $this->nettoyer($v['codePays']) ?></span>
<th class="text-center">Supprimer</th> </td>
--> <td class="text-dark fw-bold"><?= $this->nettoyer($v['libelle']) ?></td>
</tr> <td class="text-center pe-4">
</thead> <button type="button"
<tbody> class="btn btn-outline-primary btn-sm px-3 rounded-pill fw-bold shadow-xs"
<?php foreach ($pays as $v): onclick="formModifTableRef(<?= $idData ?>);">
$idData = $this->nettoyer($v['id']); <i class="fas fa-edit me-1"></i> <?= _("Modifier") ?>
?> </button>
<tr valign="top"> </td>
<td class="text-center" width="15%"><?= $this->nettoyer($v['codeSociete']) ?></td> </tr>
<td class="text-center" width="10%"><?= $this->nettoyer($v['codePays']) ?></td> <?php endforeach; ?>
<td class="text-left" width="70%"><?= $this->nettoyer($v['libelle']) ?></td> </tbody>
<!-- </table>
<td class="text-center" width="10%"> </div>
<?php </div>
if($this->nettoyer($v['choix'] == '0')){ </div>
$check ='';
} <style>
else{ .bg-primary-ghost { background-color: rgba(33, 46, 83, 0.08) !important; }
$check = 'checked'; #tableLister thead th { padding-top: 15px; padding-bottom: 15px; }
} #tableLister tbody td { border-color: #f1f4f6; }
?> .shadow-xs { box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
<INPUT TYPE="checkbox" class="custom-control-input" style="width: 2rem;height: 2rem;" id="choix" NAME="choix" value="<?=(($this->nettoyer($v['choix'])==0)? 0 : 1);?>" onclick="if (this.checked) this.value=1; else this.value=0;cocherDecocherUn($('#fichier_lister').val(),<?= $idData; ?>);" <?= $check;?>> </style>
</td>
-->
<td class="text-center" width="10%">
<button style="width:100%" class ="form-control btn btn-primary" type="button" id="btn-editer" name="Modifier"
onclick="JAVASCRIPT:formModifTableRef(<?= $idData; ?>);" ><?= _("Modifier") ?></button>
</td>
<!--
<td class="text-center" width="10%">
<button style="width:100%" class = "form-control btn btn-danger" type="button" id="btn-supprimer" name="Supprimer"
onclick="JAVASCRIPT:supprimeLigneListe(<?= $idData; ?>,'<?= $superUser; ?>')">Supprimer</button>
</td>
-->
</tr>
<?php endforeach; ?>
</tbody>
</table>