diff --git a/src/ninegate-1.0/src/Cadoles/CoreBundle/EventListener/sessionListener.php b/src/ninegate-1.0/src/Cadoles/CoreBundle/EventListener/sessionListener.php index 6a682b0b..a37a3b33 100644 --- a/src/ninegate-1.0/src/Cadoles/CoreBundle/EventListener/sessionListener.php +++ b/src/ninegate-1.0/src/Cadoles/CoreBundle/EventListener/sessionListener.php @@ -309,8 +309,15 @@ $color = $this->container->get('cadoles.core.service.color'); $color->setColor(); - // Visite if($curentuser!="anon.") { + // Préférence header + $preference=$curentuser->getPreference(); + if(array_key_exists("fgheader",$preference)) { + $fgheader=($preference["fgheader"][0]=="true"); + $session->set("fgheader", $fgheader); + } + + // Visite $now=new \DateTime(); if(!$curentuser->getVisitedate()) { $curentuser->setVisitedate($now); diff --git a/src/ninegate-1.0/src/Cadoles/CoreBundle/Resources/public/css/style.css b/src/ninegate-1.0/src/Cadoles/CoreBundle/Resources/public/css/style.css index 548810da..29c54e2a 100644 --- a/src/ninegate-1.0/src/Cadoles/CoreBundle/Resources/public/css/style.css +++ b/src/ninegate-1.0/src/Cadoles/CoreBundle/Resources/public/css/style.css @@ -62,6 +62,8 @@ body { @media (max-width: 767px) { .header { display: none } + #menu-header { display: none } + #navbarsmalltitle { display: none } } diff --git a/src/ninegate-1.0/src/Cadoles/CoreBundle/Resources/views/Include/footer.html.twig b/src/ninegate-1.0/src/Cadoles/CoreBundle/Resources/views/Include/footer.html.twig index b3ea925d..30e2e489 100644 --- a/src/ninegate-1.0/src/Cadoles/CoreBundle/Resources/views/Include/footer.html.twig +++ b/src/ninegate-1.0/src/Cadoles/CoreBundle/Resources/views/Include/footer.html.twig @@ -135,6 +135,26 @@ $(location).attr('href',"/{{ alias }}"); } + function switchHeader() { + {% if app.user %} + $.ajax({ + method: "POST", + url: "{{ path('cadoles_core_user_preference') }}", + data: { + id:0, + key:'fgheader', + {% if fgheader %} + value: false + {% else %} + value: true + {% endif %} + }, + success: function(idbookmark) { + location.reload(); + } + }); + {% endif %} + } $(document).ready(function() { $(".js-datepicker").datepicker({ diff --git a/src/ninegate-1.0/src/Cadoles/CoreBundle/Resources/views/Include/menu.html.twig b/src/ninegate-1.0/src/Cadoles/CoreBundle/Resources/views/Include/menu.html.twig index 9d84cf3c..f72a59bc 100644 --- a/src/ninegate-1.0/src/Cadoles/CoreBundle/Resources/views/Include/menu.html.twig +++ b/src/ninegate-1.0/src/Cadoles/CoreBundle/Resources/views/Include/menu.html.twig @@ -4,6 +4,13 @@ {% endif %} {% set permannu = app.session.get('permannu') %} + + {% if fgheader %} +