This commit is contained in:
KONE SOREL 2026-03-07 14:19:45 +00:00
parent 880817eb38
commit 9bfec63225

View File

@ -1,88 +1,51 @@
<?php <?php
$nbreTotal = count($secteuractivite); $nbreTotal = count($secteuractivite);
$displayTotal = ($nbreTotal < 10) ? '0'.$nbreTotal : format_N($nbreTotal);
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 border-start border-4 border-success mb-4">
<div class="card-header bg-white py-3 d-flex justify-content-between align-items-center">
<h5 class="card-title mb-0 text-success fw-bold">
<i class="fas fa-list-ul me-2"></i><?= _("Liste des Secteurs d'Activité") ?>
</h5>
<span class="badge rounded-pill bg-success px-3 shadow-sm" style="font-size: 0.9rem;">
<?= _("Total") ?> : <span id="total_lignes"><?= $displayTotal; ?></span>
</span>
</div>
<table style="margin: auto" class="table-responsive"> <div class="card-body">
<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 border-light">
</tbody> <thead class="bg-light-25 text-muted small fw-bold">
</table> <tr>
<input type="hidden" id="total" value="<?= $nbreTotal; ?>"> <th class="text-center border-0" width="15%"><?= _("Centre gestion") ?></th>
<table id="tableLister" class="table table-striped table-bordered table-hover table-condensed table-responsive compact"> <th class="text-center border-0" width="10%"><?= _("Code") ?></th>
<thead> <th class="text-start border-0" width="60%"><?= _("Libellé") ?></th>
<tr> <th class="text-center border-0" width="15%"><?= _("Action") ?></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 ($secteuractivite 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> $libelle = est_anglophone() ? $this->nettoyer($v['LibelleEng']) : $this->nettoyer($v['libelle']);
</th> ?>
--> <tr>
<th class="text-center"><?= _("Modifier") ?></th> <td class="text-center fw-bold text-muted small"><?= $this->nettoyer($v['codeSociete']); ?></td>
<!-- <td class="text-center"><span class="badge bg-light text-dark border"><?= $this->nettoyer($v['codeSecteur']); ?></span></td>
<th class="text-center">Supprimer</th> <td class="text-start"><?= $libelle; ?></td>
--> <td class="text-center">
</tr> <button class="btn btn-outline-primary btn-sm px-3 fw-bold rounded-pill"
</thead> type="button"
<tbody> onclick="formModifTableRef(<?= $idData; ?>);">
<?php foreach ($secteuractivite as $v): <i class="fas fa-edit me-1"></i> <?= _("Modifier") ?>
$idData = $this->nettoyer($v['id']); </button>
$libelle = $this->nettoyer($v['libelle']); </td>
if (est_anglophone()){ </tr>
$libelle = $this->nettoyer($v['LibelleEng']); <?php endforeach; ?>
} </tbody>
?> </table>
<tr valign="top"> </div>
<td class="text-center" width="15%"><?= $this->nettoyer($v['codeSociete']);; ?> </div>
<td class="text-center" width="10%"><?= $this->nettoyer($v['codeSecteur']); ?></td> </div>
<td class="text-left" width="60%"><?= $libelle; ?></td>
<!-- <input type="hidden" id="total" value="<?= $nbreTotal; ?>">
<td class="text-center" width="10%">
<?php
if($this->nettoyer($v['choix'] == '0')){
$check ='';
}
else{
$check = 'checked';
}
?>
<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;?>>
</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>