ser
This commit is contained in:
parent
d24e813cd8
commit
2d19976dca
28
Controleur/ControleurAccessubmenus.php
Normal file
28
Controleur/ControleurAccessubmenus.php
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
<?php
|
||||
require_once 'Framework/Controleur.php';
|
||||
require_once 'Modele/Utilisateur.php';
|
||||
require_once 'Modele/Menuvueutilisateur.php';
|
||||
|
||||
class ControleurAccessubmenus extends Controleur
|
||||
{
|
||||
private $menuvue;
|
||||
private $utilisateur;
|
||||
|
||||
public function __construct() {
|
||||
$this->menuvue = new Menuvueutilisateur();
|
||||
$this->menuvue->getMenuVue('Accessubmenus');
|
||||
|
||||
$this->utilisateur = new Utilisateur();
|
||||
}
|
||||
|
||||
public function index()
|
||||
{
|
||||
$profil = $this->utilisateur->getListeProfilCodeRh();
|
||||
$menus = array();
|
||||
|
||||
$this->genererVue(array(
|
||||
'profil' => $profil,
|
||||
'menus' => $menus
|
||||
));
|
||||
}
|
||||
}
|
||||
142
Vue/Accessubmenus/index.php
Normal file
142
Vue/Accessubmenus/index.php
Normal file
|
|
@ -0,0 +1,142 @@
|
|||
<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>
|
||||
|
||||
<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>
|
||||
</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>
|
||||
</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;
|
||||
}
|
||||
|
||||
.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; }
|
||||
}
|
||||
</style>
|
||||
Loading…
Reference in New Issue
Block a user