fr
This commit is contained in:
parent
5aedd98f96
commit
6c972c4679
|
|
@ -1,81 +1,121 @@
|
|||
<?php
|
||||
$this->titre = "INTER SANTE - Liste Utilisateurs portail RH";
|
||||
$idClient = $this->nettoyer($client['idClient']);
|
||||
$nomClient = $this->nettoyer($client['nom']);
|
||||
$this->titre = "INTER SANTE - Utilisateurs RH";
|
||||
$idClient = $this->nettoyer($client['idClient']);
|
||||
$nomClient = $this->nettoyer($client['nom']);
|
||||
?>
|
||||
|
||||
<script type="text/javascript">
|
||||
<input class="visually-hidden" type="text" id="idClient" value="<?= $idClient ?>">
|
||||
|
||||
</script>
|
||||
<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>
|
||||
</h5>
|
||||
<span class="badge bg-white text-primary rounded-pill"><?= count($users) ?> <?= _("comptes") ?></span>
|
||||
</div>
|
||||
|
||||
<input class="sr-only" type="text" id="idClient" name="idClient" value="<?= $idClient ?>" >
|
||||
<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"><?= _("Accès Actes") ?></th>
|
||||
<th class="text-center"><?= _("Accès Pathos") ?></th>
|
||||
<th class="text-center"><?= _("Compte") ?></th>
|
||||
<th class="text-center pe-4"><?= _("Actions") ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($users as $user_client):
|
||||
$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'];
|
||||
?>
|
||||
<tr>
|
||||
<td class="ps-4">
|
||||
<span class="badge bg-secondary-subtle text-dark border font-monospace px-2 py-1">
|
||||
<?= $this->nettoyer($codeUtilisateur) ?>
|
||||
</span>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<div class="fw-bold"><?= $this->nettoyer($user_client['utilisateur']) ?></div>
|
||||
</td>
|
||||
|
||||
<div id="div_liste">
|
||||
<fieldset>
|
||||
<legend> <?= _("Utilisateurs du portail RH chez") . " : " . $nomClient ?> </legend>
|
||||
<td class="text-center">
|
||||
<span class="small fw-bold border p-1 rounded bg-white shadow-xs"><?= strtoupper($codeLangue) ?></span>
|
||||
</td>
|
||||
|
||||
<table class="table table-striped table-bordered table-hover table-condensed table-responsive" style="font-size:10pt;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style='text-align:center' width="15%">Login</th>
|
||||
<th style='text-align:center'> <?= _("Nom") ?> </th>
|
||||
<th style='text-align:center' width="8%"> <?= _("Langue") ?> </th>
|
||||
<th style='text-align:center'> <?= _("Ré-Init Mot de Passe") ?> </th>
|
||||
<th style='text-align:center'> <?= _("Activer / Désactiver") ?> </th>
|
||||
<th style='text-align:center'> <?= _("Actes visibles?") ?> </th>
|
||||
<th style='text-align:center'> <?= _("Affections Visibles?") ?> </th>
|
||||
<th style='text-align:center' width="10%"> <?= _("Action") ?> </th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($users as $user_client):
|
||||
$idUtilisateur = $user_client['idUtilisateur'];
|
||||
$codeUtilisateur = $user_client['codeUtilisateur'];
|
||||
$actif = $user_client['actif'];
|
||||
$actVisible = $user_client['actVisible'];
|
||||
$AffectionVisible = $user_client['AffectionVisible'];
|
||||
$reInit = $user_client['reInit'];
|
||||
$codeLangue = $user_client['codeLangue'];
|
||||
?>
|
||||
<tr valign="top">
|
||||
<td align='center'> <?= $this->nettoyer($user_client['codeUtilisateur']) ?> </td>
|
||||
<td align='center'> <?= $this->nettoyer($user_client['utilisateur']) ?></td>
|
||||
<td align='center'> <?= $codeLangue ?> </td>
|
||||
|
||||
<?php if($reInit==1): ?>
|
||||
<td> <input style="font-size:10pt;" class = "form-control btn btn-danger" type="button" value="<?= _("Ré-Init Mot de Passe") ?>" onClick="javascript:reinitpaswd_client('<?= $codeUtilisateur ?>');"></td>
|
||||
<?php else: ?>
|
||||
<td> <input style="font-size:10pt;" class = "form-control btn btn-primary" type="button" value="<?= _("Ré-Init Mot de Passe") ?>" onClick="javascript:reinitpaswd_client('<?= $codeUtilisateur ?>');"></td>
|
||||
<?php endif; ?>
|
||||
<td class="text-center">
|
||||
<div class="form-check form-switch d-inline-block">
|
||||
<input class="form-switch-custom input-switch-actes" type="checkbox" role="switch"
|
||||
<?= ($actVisible === 1) ? 'checked' : '' ?>
|
||||
onClick="gerer_acces_actes_client('<?= $codeUtilisateur ?>', '<?= $actVisible ?>');">
|
||||
</div>
|
||||
</td>
|
||||
|
||||
<?php if($actif==1): ?>
|
||||
<td> <input style="font-size:10pt;" class = "form-control btn btn-danger" type="button" value="<?= _("Désactiver") ?>" onClick="javascript:desactiver_user_client('<?= $codeUtilisateur ?>');"></td>
|
||||
<?php else: ?>
|
||||
<td> <input style="font-size:10pt;" class = "form-control btn btn-primary" type="button" value="<?= _("Activer") ?>" onClick="javascript:activer_user_client('<?= $codeUtilisateur ?>');"></td>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if($actVisible==1): ?>
|
||||
<td> <input style="font-size:10pt;" class = "form-control btn btn-danger" type="button" value="<?= _("Oui => Désactiver?") ?>" onClick="javascript:gerer_acces_actes_client('<?= $codeUtilisateur ?>', '<?= $actVisible ?>');"></td>
|
||||
<?php else: ?>
|
||||
<td> <input style="font-size:10pt;" class = "form-control btn btn-primary" type="button" value="<?= _("Non => Activer?") ?>" onClick="javascript:gerer_acces_actes_client('<?= $codeUtilisateur ?>', '<?= $actVisible ?>');"></td>
|
||||
<?php endif; ?>
|
||||
<td class="text-center">
|
||||
<div class="form-check form-switch d-inline-block">
|
||||
<input class="form-switch-custom input-switch-affections" type="checkbox" role="switch"
|
||||
<?= ($AffectionVisible === 1) ? 'checked' : '' ?>
|
||||
onClick="gerer_acces_affection_client('<?= $codeUtilisateur ?>', '<?= $AffectionVisible ?>');">
|
||||
</div>
|
||||
</td>
|
||||
|
||||
<?php if($AffectionVisible==1): ?>
|
||||
<td> <input style="font-size:10pt;" class = "form-control btn btn-danger" type="button" value="<?= _("Oui => Désactiver?") ?>" onClick="javascript:gerer_acces_affection_client('<?= $codeUtilisateur ?>', '<?= $AffectionVisible ?>');"></td>
|
||||
<?php else: ?>
|
||||
<td> <input style="font-size:10pt;" class = "form-control btn btn-primary" type="button" value="<?= _("Non => Activer?") ?>" onClick="javascript:gerer_acces_affection_client('<?= $codeUtilisateur ?>', '<?= $AffectionVisible ?>');"></td>
|
||||
<?php endif; ?>
|
||||
<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 ?>');">
|
||||
<i class="fas fa-check-circle me-1"></i> <?= _("Actif") ?>
|
||||
</span>
|
||||
<?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>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<input class = "form-control btn btn-info" type="button" value="<?= _("Modifier") ?>" onClick="javascript:afficher_users_client_id(<?= $idUtilisateur ?>);" style='font-size:9pt;' >
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</fieldset>
|
||||
</div>
|
||||
<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") ?>"
|
||||
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' ?>"
|
||||
title="<?= _("Ré-initialiser mot de passe") ?>"
|
||||
onClick="reinitpaswd_client('<?= $codeUtilisateur ?>');">
|
||||
<i class="fas fa-key"></i>
|
||||
</button>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id ="div_export_a">
|
||||
</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; }
|
||||
</style>
|
||||
Loading…
Reference in New Issue
Block a user