This commit is contained in:
KONE SOREL 2026-01-16 11:47:05 +00:00
parent ba356f2731
commit cef7218103

View File

@ -1,78 +1,118 @@
<div id="div_menu_profil">
<div class="row">
<div id="div_utilisateur_profil_1" class="col-6" >
<div id="div_menu_profil" class="animate__animated animate__fadeIn">
<div class="row g-4">
<div id="div_utilisateur_profil_1" class="col-md-6">
<div class="card h-100 shadow-sm border-0 bg-white">
<div class="card-header bg-light border-bottom-0 py-3 d-flex justify-content-between align-items-center">
<h6 class="mb-0 fw-bold text-secondary">
<i class="fas fa-eye-slash me-2"></i><?= _("Sous-menus non accessibles") ?>
</h6>
<span class="badge bg-secondary rounded-pill"><?= format_N(count($menus_non_accessibles)) ?></span>
</div>
<div class="px-3 pb-2">
<button type="button" class="btn btn-sm btn-info text-white w-100 fw-bold shadow-xs transition-btn"
onclick="javascript:ajouter_tous_menu_vue_module_assureur();">
<?= _("Tout ajouter") ?> <i class="fas fa-chevron-right ms-1"></i>
</button>
</div>
<legend> <?= _("Sous-menus non accessibles")." (".format_N(count($menus_non_accessibles)).")" ?> </legend>
<div class="table-responsive" style="max-height: 450px;">
<table class="table table-hover align-middle mb-0">
<tbody class="border-top-0">
<?php foreach ($menus_non_accessibles as $m):
$codeMenu = $m['codeMenu'];
$libeleMenu = est_anglophone() ? $m['libelleEng'] : $m['libeleMenu'];
?>
<tr>
<td class="ps-3 text-muted"><?= $libeleMenu ?></td>
<td class="text-end pe-3" width="60">
<button class="btn btn-sm btn-outline-info rounded-circle btn-action"
title="<?= _("Ajouter") ?>"
onClick="javascript:ajouter_un_menu_vue_module_assureur('<?=$codeMenu?>');">
<i class="fas fa-plus"></i>
</button>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
</div>
</div>
<table class="table table-striped table-bordered table-hover table-condensed table-responsive" style="font-size:10pt;">
<thead>
<tr>
<th style='text-align:center'> <?= _("Désignation")?> </th>
<th style='text-align:center'> => </th>
</tr>
<tr>
<th colspan="2"> <button type="button" style="font-size:10pt;" class="form-control btn btn-primary" onclick="javascript:ajouter_tous_menu_vue_module_assureur();" > <?= _("Ajouter tous") . " ==>" ?> </button> </th>
</tr>
</thead>
<div id="div_utilisateur_profil_2" class="col-md-6">
<div class="card h-100 shadow-sm border-0 bg-white">
<div class="card-header bg-info bg-opacity-10 border-bottom-0 py-3 d-flex justify-content-between align-items-center">
<h6 class="mb-0 fw-bold text-info">
<i class="fas fa-eye me-2"></i><?= _("Sous-menus accessibles") ?>
</h6>
<span class="badge bg-info rounded-pill"><?= format_N(count($menus_accessibles)) ?></span>
</div>
<tbody>
<?php foreach ($menus_non_accessibles as $menus_non_accessible):
$codeMenu = $menus_non_accessible['codeMenu'];
if (est_anglophone())
{
$libeleMenu = $menus_non_accessible['libelleEng'];
}
else
{
$libeleMenu = $menus_non_accessible['libeleMenu'];
}
?>
<tr valign="top">
<td align='center'><?= $libeleMenu ?></td>
<td align='center'> <input type="button" value="=>" onClick="javascript:ajouter_un_menu_vue_module_assureur('<?=$codeMenu?>');" ></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
<div class="px-3 pb-2">
<button type="button" class="btn btn-sm btn-outline-secondary w-100 fw-bold shadow-xs transition-btn"
onclick="javascript:retirer_tous_menu_vue_module_assureur();">
<i class="fas fa-chevron-left me-1"></i> <?= _("Tout retirer") ?>
</button>
</div>
<div id="div_utilisateur_profil_2" class="col-6" >
<div class="table-responsive" style="max-height: 450px;">
<table class="table table-hover align-middle mb-0">
<tbody class="border-top-0">
<?php foreach ($menus_accessibles as $m):
$codeMenu = $m['codeMenu'];
$libeleMenu = est_anglophone() ? $m['libelleEng'] : $m['libeleMenu'];
?>
<tr>
<td class="ps-3" width="60">
<button class="btn btn-sm btn-outline-secondary rounded-circle btn-action"
title="<?= _("Retirer") ?>"
onClick="javascript:retirer_un_menu_vue_module_assureur('<?=$codeMenu?>');">
<i class="fas fa-minus"></i>
</button>
</td>
<td class="text-start fw-bold text-dark"><?= $libeleMenu ?></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
</div>
</div>
<legend> <?= _("Sous-menus accessibles")." (".format_N(count($menus_accessibles)).")" ?> </legend>
</div>
</div>
<table class="table table-striped table-bordered table-hover table-condensed table-responsive" style="font-size:10pt;">
<thead>
<tr>
<th style='text-align:center'> <= </th>
<th style='text-align:center'> <?= _("Désignation")?> </th>
</tr>
<style>
/* Design des boutons d'action circulaires */
.btn-action {
width: 32px;
height: 32px;
padding: 0;
line-height: 32px;
display: inline-flex;
align-items: center;
justify-content: center;
transition: all 0.2s ease;
}
.btn-action:hover {
transform: scale(1.15);
background-color: var(--bs-info);
color: white;
border-color: var(--bs-info);
}
<tr>
<th colspan="2"> <button type="button" style="font-size:10pt;" class="form-control btn btn-primary" onclick="javascript:retirer_tous_menu_vue_module_assureur();" > <?= "<== " . _("Retirer tous") ?> </button> </th>
</tr>
</thead>
/* Animation au survol des lignes */
.table-hover tbody tr:hover td {
background-color: rgba(13, 202, 240, 0.03);
}
<tbody>
<?php foreach ($menus_accessibles as $menus_accessible):
$codeMenu = $menus_accessible['codeMenu'];
if (est_anglophone())
{
$libeleMenu = $menus_accessible['libelleEng'];
}
else
{
$libeleMenu = $menus_accessible['libeleMenu'];
}
?>
<tr valign="top">
<td align='center'> <input type="button" value="<=" onClick="javascript:retirer_un_menu_vue_module_assureur('<?=$codeMenu?>');" ></td>
<td align='center'><?= $libeleMenu ?></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
</div>
</div>
/* Utilitaires */
.shadow-xs { box-shadow: 0 1px 2px rgba(0,0,0,0.075); }
.transition-btn:active { transform: translateY(1px); }
/* Scrollbar discrète */
.table-responsive::-webkit-scrollbar { width: 5px; }
.table-responsive::-webkit-scrollbar-thumb { background: #e0e0e0; border-radius: 10px; }
</style>