This commit is contained in:
KONE SOREL 2026-03-31 12:31:13 +00:00
parent afe85094c9
commit b2a61e2594

View File

@ -4,30 +4,42 @@
$nomClient = $this->nettoyer($client['nom']); $nomClient = $this->nettoyer($client['nom']);
?> ?>
<input class="sr-only" type="text" id="idClient" value="<?= $idClient ?>"> <input type="hidden" id="idClient" value="<?= $idClient ?>">
<div id="div_liste"> <div id="div_liste" class="container-fluid" style="padding-top: 15px;">
<h1 class="text-primary"><?= _("Utilisateurs Portail RH") ?>: <?= $nomClient ?></h1>
<div style="margin-bottom:5px;"> <h1 class="text-primary" style="margin-bottom: 20px;">
<div> <span class="glyphicon glyphicon-user" style="margin-right: 10px;"></span>
<span class="badge bg-white"> <?= _("Utilisateurs Portail RH") ?>
<?= count($users) ?> <?= _("comptes") ?> </h1>
</span>
</div>
</div>
<div > <div class="panel panel-default" style="border-radius: 0; box-shadow: 0 2px 4px rgba(0,0,0,0.1);">
<div>
<table class="table table-striped table-bordered table-hover table-condensed table-responsive" style="font-size:9pt;"> <div class="panel-heading" style="background-color: #fff; padding: 15px;">
<div class="row">
<div class="col-xs-8">
<h4 class="panel-title" style="font-weight: bold; font-size: 18px;">
<span style="color: #777; font-weight: normal;"><?= $nomClient ?></span>
</h4>
</div>
<div class="col-xs-4 text-right">
<span class="label label-primary" style="padding: 5px 12px; border-radius: 10px; font-size: 12px;">
<?= count($users) ?> <?= _("comptes") ?>
</span>
</div>
</div>
</div>
<div class="table-responsive">
<table class="table table-hover table-striped" style="vertical-align: middle; margin-bottom: 0;">
<thead> <thead>
<tr> <tr style="background-color: #f9f9f9; color: #777; font-size: 11px; text-transform: uppercase;">
<th width="12%" class="text-center"><?= _("Identifiant") ?></th> <th style="padding-left: 20px;" width="12%"><?= _("Identifiant") ?></th>
<th width="20%" class="text-center"><?= _("Nom Complet") ?></th> <th width="20%"><?= _("Nom Complet") ?></th>
<th class="text-center" width="8%"><?= _("Langue") ?></th> <th class="text-center" width="8%"><?= _("Langue") ?></th>
<th class="text-center" width="15%"><?= _("Profil / Rôle") ?></th> <th class="text-center" width="15%"><?= _("Profil / Rôle") ?></th>
<th class="text-center" width="15%"><?= _("Statut") ?></th> <th class="text-center" width="15%"><?= _("Statut") ?></th>
<th colspan= "2" class="text-center"><?= _("Actions") ?></th> <th class="text-center" style="padding-right: 20px;" width="12%"><?= _("Actions") ?></th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -37,64 +49,87 @@
$actif = (int)$user_client['actif']; $actif = (int)$user_client['actif'];
$reInit = (int)$user_client['reInit']; $reInit = (int)$user_client['reInit'];
$codeLangue = $user_client['codeLangue']; $codeLangue = $user_client['codeLangue'];
// Gestion multilingue du profil
$libelleProfil = est_anglophone() ? $user_client['profilEng'] : $user_client['profil']; $libelleProfil = est_anglophone() ? $user_client['profilEng'] : $user_client['profil'];
?> ?>
<tr> <tr>
<td class="ps-4"> <td style="padding-left: 20px; vertical-align: middle;">
<code class="text-primary fw-bold bg-primary bg-opacity-10 px-2 py-1 rounded"> <strong style="color: #337ab7; background: #eef4f9; padding: 2px 6px; border-radius: 3px; font-family: monospace;">
<?= $this->nettoyer($codeUtilisateur) ?> <?= $this->nettoyer($codeUtilisateur) ?>
</code> </strong>
</td> </td>
<td> <td style="vertical-align: middle;">
<div class="fw-bold text-dark"><?= $this->nettoyer($user_client['utilisateur']) ?></div> <div style="font-weight: bold; color: #333;"><?= $this->nettoyer($user_client['utilisateur']) ?></div>
</td> </td>
<td class="text-center"> <td class="text-center" style="vertical-align: middle;">
<span class="badge border text-dark bg-white shadow-xs fw-bold"> <span class="label label-default" style="border: 1px solid #ccc; color: #333; background: #fff;">
<?= strtoupper($codeLangue) ?> <?= strtoupper($codeLangue) ?>
</span> </span>
</td> </td>
<td class="text-center"> <td class="text-center" style="vertical-align: middle;">
<span class="badge bg-info-subtle text-info border border-info-subtle px-2 py-1"> <span class="label label-info" style="font-weight: normal;">
<i class="fas fa-user-shield me-1 small"></i><?= $this->nettoyer($libelleProfil) ?> <span class="glyphicon glyphicon-eye-open" style="font-size: 10px; margin-right: 4px;"></span>
<?= $this->nettoyer($libelleProfil) ?>
</span> </span>
</td> </td>
<td class="text-center"> <td class="text-center" style="vertical-align: middle;">
<?php if($actif === 1): ?> <?php if($actif === 1): ?>
<button class="btn btn-success" <button class="btn btn-xs btn-success"
style="border-radius: 15px; padding: 2px 10px; font-weight: bold;"
onClick="desactiver_user_rh_client('<?= $codeUtilisateur ?>');"> onClick="desactiver_user_rh_client('<?= $codeUtilisateur ?>');">
<?= _("Actif") ?> <span class="glyphicon glyphicon-ok-sign"></span> <?= _("Actif") ?>
</button> </button>
<?php else: ?> <?php else: ?>
<button class="btn btn-danger" <button class="btn btn-xs btn-danger"
style="border-radius: 15px; padding: 2px 10px; font-weight: bold;"
onClick="activer_user_rh_client('<?= $codeUtilisateur ?>');"> onClick="activer_user_rh_client('<?= $codeUtilisateur ?>');">
<?= _("Bloqué") ?> <span class="glyphicon glyphicon-ban-circle"></span> <?= _("Bloqué") ?>
</button> </button>
<?php endif; ?> <?php endif; ?>
</td> </td>
<td class="text-center"> <td class="text-center" style="padding-right: 20px; vertical-align: middle;">
<button class="btn btn-warning" <div class="btn-group">
onClick="afficher_users_client_id(<?= $idUtilisateur ?>);"> <button class="btn btn-default btn-sm"
<?= _("Modifier") ?> title="<?= _("Modifier") ?>"
</button> onClick="afficher_users_client_id(<?= $idUtilisateur ?>);">
</td> <span class="glyphicon glyphicon-pencil"></span>
</button>
<td class="text-center"> <button class="btn btn-default btn-sm"
<button class="btn btn-info" style="<?= ($reInit == 1) ? 'color:red' : '' ?>" style="<?= ($reInit === 1) ? 'color: #a94442; font-weight: bold;' : '' ?>"
onClick="reinitpaswd_user_rh('<?= $codeUtilisateur ?>');"> title="<?= _("-initialiser mot de passe") ?>"
<?= _("Ré-initialiser") ?> onClick="reinitpaswd_user_rh('<?= $codeUtilisateur ?>');">
</button> <span class="glyphicon glyphicon-lock"></span>
</button>
</div>
</td> </td>
</tr> </tr>
<?php endforeach; ?> <?php endforeach; ?>
</tbody> </tbody>
</table> </table>
</div> </div>
<div class="panel-footer" style="background-color: #fff; color: #777; font-size: 12px;">
<span class="glyphicon glyphicon-info-sign"></span>
<?= _("Les comptes bloqués ne peuvent plus se connecter au portail.") ?>
</div>
</div> </div>
</div> </div>
<style>
/* Correction pour l'alignement vertical Bootstrap 3 */
.table > tbody > tr > td {
vertical-align: middle !important;
}
/* Animation simple car animate.css n'était pas standard à l'époque */
.animate-fade {
animation: fadeIn 0.4s ease-in;
}
@keyframes fadeIn {
from { opacity: 0; } to { opacity: 1; }
}
</style>