dr
This commit is contained in:
parent
8bf339c9c9
commit
1607b19acf
|
|
@ -8,24 +8,29 @@
|
|||
|
||||
<div id="div_liste" class="container-fluid py-3 animate__animated animate__fadeIn">
|
||||
<div class="card shadow-sm border-0">
|
||||
|
||||
<div class="card-header bg-primary text-white py-3 d-flex justify-content-between align-items-center">
|
||||
<h5 class="mb-0 fw-bold">
|
||||
<i class="fas fa-users-cog me-2"></i>
|
||||
<?= _("Utilisateurs Portail RH") ?> : <span class="fw-normal"><?= $nomClient ?></span>
|
||||
<?= _("Utilisateurs Portail RH") ?> : <span class="fw-normal text-white-50"><?= $nomClient ?></span>
|
||||
</h5>
|
||||
<span class="badge bg-white text-primary rounded-pill"><?= count($users) ?> <?= _("comptes") ?></span>
|
||||
<div class="d-flex align-items-center gap-3">
|
||||
<span class="badge bg-white text-primary rounded-pill px-3 shadow-sm">
|
||||
<?= count($users) ?> <?= _("comptes") ?>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover align-middle mb-0">
|
||||
<thead class="table-light">
|
||||
<tr class="small text-uppercase text-muted">
|
||||
<th class="ps-4" width="12%"><?= _("Login") ?></th>
|
||||
<th width="18%"><?= _("Utilisateur") ?></th>
|
||||
<th class="text-center" width="5%"><?= _("Langue") ?></th>
|
||||
<th class="text-center"><?= _("Profil") ?></th>
|
||||
<th class="text-center"><?= _("Compte") ?></th>
|
||||
<th class="text-center pe-4"><?= _("Actions") ?></th>
|
||||
<tr class="small text-uppercase text-muted border-bottom">
|
||||
<th class="ps-4" width="12%"><?= _("Identifiant") ?></th>
|
||||
<th width="20%"><?= _("Nom Complet") ?></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%"><?= _("Statut") ?></th>
|
||||
<th class="text-center pe-4" width="12%"><?= _("Actions") ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
|
@ -33,58 +38,57 @@
|
|||
$idUtilisateur = $user_client['idUtilisateur'];
|
||||
$codeUtilisateur = $user_client['codeUtilisateur'];
|
||||
$actif = (int)$user_client['actif'];
|
||||
$actVisible = (int)$user_client['actVisible'];
|
||||
$AffectionVisible = (int)$user_client['AffectionVisible'];
|
||||
$reInit = (int)$user_client['reInit'];
|
||||
$codeLangue = $user_client['codeLangue'];
|
||||
|
||||
$profil = $user_client['profil'];
|
||||
if (est_anglophone()){
|
||||
$profil = $user_client['profilEng'];
|
||||
}
|
||||
|
||||
// Gestion multilingue du profil
|
||||
$libelleProfil = est_anglophone() ? $user_client['profilEng'] : $user_client['profil'];
|
||||
?>
|
||||
<tr>
|
||||
<td class="ps-4">
|
||||
<span class="badge bg-secondary-subtle text-dark border font-monospace px-2 py-1">
|
||||
<code class="text-primary fw-bold bg-primary bg-opacity-10 px-2 py-1 rounded">
|
||||
<?= $this->nettoyer($codeUtilisateur) ?>
|
||||
</span>
|
||||
</code>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<div class="fw-bold"><?= $this->nettoyer($user_client['utilisateur']) ?></div>
|
||||
<div class="fw-bold text-dark"><?= $this->nettoyer($user_client['utilisateur']) ?></div>
|
||||
</td>
|
||||
|
||||
<td class="text-center">
|
||||
<span class="small fw-bold border p-1 rounded bg-white shadow-xs"><?= strtoupper($codeLangue) ?></span>
|
||||
<span class="badge border text-dark bg-white shadow-xs fw-bold">
|
||||
<?= strtoupper($codeLangue) ?>
|
||||
</span>
|
||||
</td>
|
||||
|
||||
<td class="text-center">
|
||||
<span class="badge bg-secondary-subtle text-dark border font-monospace px-2 py-1">
|
||||
<?= $profil ?>
|
||||
<span class="badge bg-info-subtle text-info border border-info-subtle px-2 py-1">
|
||||
<i class="fas fa-user-shield me-1 small"></i><?= $this->nettoyer($libelleProfil) ?>
|
||||
</span>
|
||||
</td>
|
||||
|
||||
<td class="text-center">
|
||||
<?php if($actif === 1): ?>
|
||||
<span class="badge bg-success-subtle text-success border border-success-subtle px-3 py-2 clickable"
|
||||
onClick="desactiver_user_client('<?= $codeUtilisateur ?>');">
|
||||
<button class="btn btn-sm btn-outline-success rounded-pill px-3 fw-bold"
|
||||
onClick="desactiver_user_client('<?= $codeUtilisateur ?>');">
|
||||
<i class="fas fa-check-circle me-1"></i> <?= _("Actif") ?>
|
||||
</span>
|
||||
</button>
|
||||
<?php else: ?>
|
||||
<span class="badge bg-danger-subtle text-danger border border-danger-subtle px-3 py-2 clickable"
|
||||
onClick="activer_user_client('<?= $codeUtilisateur ?>');">
|
||||
<i class="fas fa-times-circle me-1"></i> <?= _("Bloqué") ?>
|
||||
</span>
|
||||
<button class="btn btn-sm btn-outline-danger rounded-pill px-3 fw-bold"
|
||||
onClick="activer_user_client('<?= $codeUtilisateur ?>');">
|
||||
<i class="fas fa-ban me-1"></i> <?= _("Bloqué") ?>
|
||||
</button>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
|
||||
<td class="text-center pe-4">
|
||||
<div class="btn-group shadow-sm border rounded">
|
||||
<button class="btn btn-sm btn-white text-info" title="<?= _("Modifier") ?>"
|
||||
<div class="btn-group shadow-sm">
|
||||
<button class="btn btn-outline-secondary btn-sm"
|
||||
title="<?= _("Modifier") ?>"
|
||||
onClick="afficher_users_client_id(<?= $idUtilisateur ?>);">
|
||||
<i class="fas fa-edit"></i>
|
||||
</button>
|
||||
<button class="btn btn-sm btn-white <?= ($reInit === 1) ? 'text-danger fw-bold' : 'text-primary' ?>"
|
||||
<button class="btn btn-outline-secondary btn-sm <?= ($reInit === 1) ? 'text-danger fw-bold' : '' ?>"
|
||||
title="<?= _("Ré-initialiser mot de passe") ?>"
|
||||
onClick="reinitpaswd_client('<?= $codeUtilisateur ?>');">
|
||||
<i class="fas fa-key"></i>
|
||||
|
|
@ -96,20 +100,17 @@
|
|||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="card-footer bg-white text-muted small py-2">
|
||||
<i class="fas fa-info-circle me-1"></i>
|
||||
<?= _("Les comptes bloqués ne peuvent plus se connecter au portail.") ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
/* Style personnalisé pour les switches */
|
||||
.form-switch-custom {
|
||||
width: 2.5em;
|
||||
height: 1.25em;
|
||||
cursor: pointer;
|
||||
}
|
||||
.clickable { cursor: pointer; transition: 0.2s; }
|
||||
.clickable:hover { filter: brightness(0.9); }
|
||||
.shadow-xs { box-shadow: 0 1px 2px rgba(0,0,0,0.05); }
|
||||
.btn-white { background: #fff; border: none; }
|
||||
.btn-white:hover { background: #f8f9fa; }
|
||||
.font-monospace { font-family: 'Courier New', Courier, monospace; }
|
||||
.table-hover tbody tr:hover { background-color: rgba(13, 110, 253, 0.02) !important; }
|
||||
.btn-group .btn { padding: 0.4rem 0.6rem; }
|
||||
.btn-outline-secondary:hover { background-color: #f8f9fa; color: #0d6efd; }
|
||||
</style>
|
||||
Loading…
Reference in New Issue
Block a user