This commit is contained in:
KONE SOREL 2026-03-31 13:31:38 +00:00
parent 2d19976dca
commit 3477a720a2

View File

@ -1,142 +1,98 @@
<div id="div_menu_profil" class="container-fluid" style="padding-top: 10px;">
<div class="row">
<div id="div_sous_menu_1" class="col-md-6">
<div class="panel panel-danger" style="box-shadow: 0 2px 5px rgba(0,0,0,0.1); border-radius: 4px;">
<div class="panel-heading" style="padding: 12px 15px;">
<div class="row">
<div class="col-xs-9">
<strong style="text-transform: uppercase; font-size: 11px; letter-spacing: 0.5px;">
<span class="glyphicon glyphicon-ban-circle" style="margin-right: 8px;"></span>
<?= _("Actions / Boutons masqués") ?>
</strong>
</div>
<div class="col-xs-3 text-right">
<span class="badge" style="background-color: #a94442;"><?= count($sous_menus_non_accessibles) ?></span>
</div>
</div>
</div>
<div class="panel-body" style="background-color: #fcf8f2; padding: 10px;">
<button type="button" class="btn btn-danger btn-sm btn-block"
style="font-weight: bold; text-transform: uppercase; font-size: 11px;"
onclick="javascript:ajouter_tous_sous_menus_profil_rh();">
<?= _("Tout autoriser") ?> <span class="glyphicon glyphicon-fast-forward" style="margin-left: 5px;"></span>
</button>
</div>
<?php $this->titre = "INTER SANTE - Accès Sous-Menus"; ?>
<div class="table-responsive" style="max-height: 400px; overflow-y: auto; background: white; border-top: 1px solid #ddd;">
<table class="table table-hover table-condensed" style="margin-bottom: 0;">
<tbody style="font-size: 13px;">
<?php foreach ($sous_menus_non_accessibles as $sm):
$codeSousMenu = $sm['codeSousMenu'];
$libelle = est_anglophone() ? $sm['libelleEng'] : $sm['libelle'];
?>
<tr>
<td style="padding-left: 15px; vertical-align: middle; border-top: 1px solid #f9f9f9;">
<span class="text-muted small" style="display:block; font-family: monospace; font-size: 10px;"><?= $codeSousMenu ?></span>
<strong><?= $libelle ?></strong>
</td>
<td class="text-right" style="padding-right: 15px; vertical-align: middle; width: 60px; border-top: 1px solid #f9f9f9;">
<button class="btn btn-info btn-xs btn-circle-transfer"
title="<?= _("Ajouter") ?>"
onClick="javascript:ajouter_un_sous_menu_profil_rh('<?=$codeSousMenu?>');">
<span class="glyphicon glyphicon-arrow-right"></span>
</button>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<div id="div_liste" class="container-fluid" style="padding-top: 20px; padding-bottom: 20px;">
<div class="page-header" style="margin-top: 0; border-bottom: 2px solid #337ab7; padding-bottom: 15px;">
<div class="row">
<div class="col-xs-2 col-sm-1">
<div style="background-color: #337ab7; color: #fff; padding: 15px; border-radius: 6px; text-align: center;">
<span class="glyphicon glyphicon-th-list" style="font-size: 24px;"></span>
</div>
</div>
</div>
<div id="div_sous_menu_2" class="col-md-6">
<div class="panel panel-success" style="box-shadow: 0 2px 5px rgba(0,0,0,0.1); border-radius: 4px;">
<div class="panel-heading" style="padding: 12px 15px;">
<div class="row">
<div class="col-xs-9">
<strong style="text-transform: uppercase; font-size: 11px; letter-spacing: 0.5px;">
<span class="glyphicon glyphicon-ok" style="margin-right: 8px;"></span>
<?= _("Actions / Boutons autorisés") ?>
</strong>
</div>
<div class="col-xs-3 text-right">
<span class="badge" style="background-color: #3c763d;"><?= count($sous_menus_accessibles) ?></span>
</div>
</div>
</div>
<div class="panel-body" style="background-color: #f2fcf2; padding: 10px;">
<button type="button" class="btn btn-success btn-sm btn-block"
style="font-weight: bold; text-transform: uppercase; font-size: 11px;"
onclick="javascript:retirer_tous_sous_menus_profil_rh();">
<span class="glyphicon glyphicon-fast-backward" style="margin-right: 5px;"></span> <?= _("Tout restreindre") ?>
</button>
</div>
<div class="table-responsive" style="max-height: 400px; overflow-y: auto; background: white; border-top: 1px solid #ddd;">
<table class="table table-hover table-condensed" style="margin-bottom: 0;">
<tbody style="font-size: 13px;">
<?php foreach ($sous_menus_accessibles as $sm):
$codeSousMenu = $sm['codeSousMenu'];
$libelle = est_anglophone() ? $sm['libelleEng'] : $sm['libelle'];
?>
<tr>
<td class="text-left" style="padding-left: 15px; vertical-align: middle; width: 60px; border-top: 1px solid #f9f9f9;">
<button class="btn btn-warning btn-xs btn-circle-transfer"
title="<?= _("Retirer") ?>"
onClick="javascript:retirer_un_sous_menu_profil_rh('<?=$codeSousMenu?>');">
<span class="glyphicon glyphicon-arrow-left"></span>
</button>
</td>
<td style="vertical-align: middle; border-top: 1px solid #f9f9f9;">
<span class="text-muted small" style="display:block; font-family: monospace; font-size: 10px;"><?= $codeSousMenu ?></span>
<strong><?= $libelle ?></strong>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
<div class="col-xs-10 col-sm-11">
<h1 style="margin: 0; color: #337ab7; font-weight: bold; font-size: 24px;">
<?= _("Gestion des Sous-Menus") ?>
</h1>
<p class="text-muted" style="margin-top: 5px;"><?= _("Définissez quels boutons et actions sont visibles pour chaque profil") ?></p>
</div>
</div>
</div>
<div class="panel panel-default" style="border-radius: 4px; box-shadow: 0 1px 3px rgba(0,0,0,0.1);">
<div class="panel-body" style="background-color: #f9f9f9; padding: 25px;">
<div class="row">
<div class="col-md-4">
<div class="form-group">
<label for="codeProfil" class="control-label" style="text-transform: uppercase; font-size: 11px; color: #666; font-weight: bold;">
<span class="glyphicon glyphicon-tags" style="margin-right: 5px;"></span> <?= _("Profil") ?>
</label>
<select class="form-control" id="codeProfil" name="codeProfil" onChange="ajax_menus_profil();" style="height: 40px;">
<?php liste_options($profil, ""); ?>
</select>
</div>
</div>
<div class="col-md-5">
<div class="form-group">
<label for="vue" class="control-label" style="text-transform: uppercase; font-size: 11px; color: #666; font-weight: bold;">
<span class="glyphicon glyphicon-folder-open" style="margin-right: 5px;"></span> <?= _("Menu Principal") ?>
</label>
<div id="div_menu">
<select class="form-control" id="codeVue" name="codeVue" style="height: 40px;">
<?php liste_options($menus, ""); ?>
</select>
</div>
</div>
</div>
<div class="col-md-3">
<div class="form-group">
<label class="hidden-xs">&nbsp;</label> <button type="button" class="btn btn-primary btn-block"
onclick="afficher_menu_vue_profil();"
style="height: 40px; font-weight: bold; text-transform: uppercase;">
<span class="glyphicon glyphicon-refresh" style="margin-right: 8px;"></span> <?= _("Actualiser la vue") ?>
</button>
</div>
</div>
</div>
</div>
</div>
<div id="div_menu_profil" class="well" style="min-height: 350px; background-color: #ffffff; border: 2px dashed #ddd; text-align: center; margin-top: 20px;">
<div style="padding-top: 80px; color: #999;">
<div style="margin-bottom: 20px;">
<span class="glyphicon glyphicon-hand-up" style="font-size: 48px; opacity: 0.3;"></span>
</div>
<h4 style="font-weight: 300;"><?= _("Sélectionnez un profil et un menu pour gérer les boutons") ?></h4>
</div>
</div>
</div>
<style>
/* Style spécifique pour les boutons de transfert circulaires en BS3 */
.btn-circle-transfer {
width: 28px;
height: 28px;
padding: 0;
border-radius: 50%;
line-height: 28px;
text-align: center;
transition: all 0.2s ease;
/* Simulation de l'animation d'entrée pour les anciens navigateurs */
.container-fluid {
animation: fadeIn 0.4s ease-in-out;
}
.btn-circle-transfer:hover {
transform: scale(1.15);
box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
/* Scrollbar pour le panel fixe */
.table-responsive::-webkit-scrollbar {
width: 5px;
}
.table-responsive::-webkit-scrollbar-thumb {
background: #ccc;
border-radius: 10px;
}
/* Animation de chargement */
#div_menu_profil {
animation: fadeIn 0.3s ease-in;
}
@keyframes fadeIn {
from { opacity: 0; } to { opacity: 1; }
from { opacity: 0; }
to { opacity: 1; }
}
/* Style pour la zone de contenu quand elle est chargée via AJAX */
#div_menu_profil:not(:empty) {
border: none;
background-color: transparent;
padding: 0;
box-shadow: none;
}
/* Focus des champs version BS3 */
.form-control:focus {
border-color: #337ab7;
box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(51, 122, 183, 0.6);
}
</style>