templates/FrontCommun/header.html.twig line 1

Open in your IDE?
  1. {% if app.request.get('_route') == 'header' %}
  2.     {% set agence = getAgence() %}
  3.     {% set client = app.session.get('client') %}
  4.     {% set src_logo = domaineBack() ~ '/' ~ agence.logo %}
  5.     {% set alt_logo = agence.nom %}
  6.     {% set reseauxSociaux = getReseauxSociaux() %}
  7.     <link href="{{ asset('assets-commun/css/bootstrap.css') }}" rel="stylesheet" type="text/css"/>
  8.     <link href="{{ asset('assets-commun/css/font-awesome.css') }}" rel="stylesheet" type="text/css"/>
  9. {% endif %}
  10. <link href="{{ asset('assets-commun/css/header-commun.css') }}" rel="stylesheet" type="text/css"/>
  11. <header class="common-header hidden-sm hidden-xs">
  12.     <nav class="navbar navbar-info" role="navigation">
  13.         <div class="container-fluid">
  14.             <div class="top-common">
  15.                 <div class="row">
  16.                     <ul class="navbar-nav social-custom list-inline hidden-xs hidden-sm justify-content-center">
  17.                         {% if agence.langues %}
  18.                             <div class="btn-group" id="dropdown-login">
  19.                                 <button class="btn btn-default btn-sm dropdown-toggle dropdown-login-btn" type="button"
  20.                                         data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
  21.                                     {{ app.request.locale|upper }} <i class="fa fa-sort"></i>
  22.                                 </button>
  23.                                 <ul class="dropdown-menu">
  24.                                     {% for langue in agence.langues|split(',') %}
  25.                                         <li><a href="{{ path('change_langue',{langue:langue}) }}"><span
  26.                                                         class="flag flag-{{ getLanguesTraduction()[langue].flag }}"></span> {% if getLanguesTraduction()[langue].libelle == 'Anglais' %}English {% else %}{{ getLanguesTraduction()[langue].libelle }}{% endif %}
  27.                                             </a></li>
  28.                                     {% endfor %}
  29.                                 </ul>
  30.                             </div>
  31.                         {% endif %}
  32.                         <li class="list-inline-item ">
  33.                             <a href="tel:{{ getAgence().tel1 }}">
  34.                                 <img src="{{ asset('assets-commun/images/icons/iconwhats.svg') }} "
  35.                                      class="social-icon-svg " alt=" ">
  36.                             </a>
  37.                         </li>
  38.                         {% if reseauxSociaux and reseauxSociaux.facebook  is not null %}
  39.                             <li class="list-inline-item">
  40.                                 <a class="facebook" href="{{ reseauxSociaux.facebook }}">
  41.                                     <img src="{{ asset('assets-commun/images/icons/fb.svg') }}" class="social-icon-svg"
  42.                                          alt="">
  43.                                 </a>
  44.                             </li>
  45.                         {% endif %}
  46.                         {% if reseauxSociaux and reseauxSociaux.twitter  is not null %}
  47.                             <li>
  48.                                 <a class="twitter" href="{{ reseauxSociaux.twitter }}">
  49.                                     <img src="{{ asset('assets-commun/images/icons/twitter.svg') }}"
  50.                                          class="social-icon-svg"
  51.                                          alt="">
  52.                                 </a>
  53.                             </li>
  54.                         {% endif %}
  55.                         {% if reseauxSociaux and reseauxSociaux.instagram  is not null %}
  56.                             <li>
  57.                                 <a class="pinterest" href="{{ reseauxSociaux.instagram }}">
  58.                                     <img src="{{ asset('assets-commun/images/icons/insta.svg') }}"
  59.                                          class="social-icon-svg"
  60.                                          alt="">
  61.                                 </a>
  62.                             </li>
  63.                         {% endif %}
  64.                         {% if reseauxSociaux and reseauxSociaux.youtube  is not null %}
  65.                             <li>
  66.                                 <a class="youtube" href="{{ reseauxSociaux.youtube }}">
  67.                                     <img src="{{ asset('assets-commun/images/icons/youtube.svg') }}"
  68.                                          class="social-icon-svg"
  69.                                          alt="">
  70.                                 </a>
  71.                             </li>
  72.                         {% endif %}
  73.                         {% if  not is_granted('IS_AUTHENTICATED_FULLY') %}
  74.                             <li class="list-inline-item">
  75.                                 <a href="{{ path('app_login') }}" class="btn btn-connect text-white"><img
  76.                                             src="{{ asset('assets-commun/images/icons/connect.svg') }}"
  77.                                             class="social-icon-svg"
  78.                                             alt=""> {{ "Se Connecter"|trans }}</a>
  79.                             </li>
  80.                             {% if disableRegistration == 'false' %}
  81.                                 <li class="list-inline-item">
  82.                                     <a href="{{ path('app_register') }}" class="btn btn-connect text-white"><img
  83.                                                 src="{{ asset('assets-commun/images/icons/connect.svg') }}"
  84.                                                 class="social-icon-svg"
  85.                                                 alt="">
  86.                                         {{"S'inscrire"|trans}}</a>
  87.                                 </li>
  88.                             {% endif %}
  89.                         {% else %}
  90.                             <div class="btn-group" id="dropdown-login">
  91.                                 <button class="btn btn-default btn-sm dropdown-toggle dropdown-login-btn" type="button"
  92.                                         data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
  93.                                     <img src="{{ asset('assets-commun/images/icons/connect-new.svg') }}"
  94.                                          class="social-icon-svg" alt=""> {{ "Bienvenue"|trans }} {{ client ? client.nomPrenom : '' }}
  95.                                 </button>
  96.                             </div>
  97.                             <li class="list-inline-item">
  98.                                 <a href="{{ path('app_logout') }}" class="btn btn-connect text-white"><img
  99.                                             src="{{ asset('assets-commun/images/icons/connect.svg') }}"
  100.                                             class="social-icon-svg"
  101.                                             alt="">
  102.                                     {{"Se déconnecter"|trans}}</a>
  103.                             </li>
  104.                         {% endif %}
  105.                         {% if app.session.get('solde') and amicale.agenceB2B %}
  106.                             {% set solde = app.session.get('solde') %}
  107.                             <div class="header-right header-right-solde">
  108.                                 <div class="navi background-solde d-flex align-items-center">
  109.                                     <p style="color: var(--color-site-2);text-align: left;font-size: 18px;margin: 0 0 0px;">
  110.                                         <a href="javascript:void(0);">
  111.                                          <span style="color: var(--color-site-2);" class="glyphicon glyphicon-refresh"
  112.                                                onclick="var $this=$(this);$this.addClass('fa-spin'); $.get('{{ path('espace_affilie_solde') }}',function(data) {
  113.                                                        $this.removeClass('fa-spin');
  114.                                                        $('.header-right-solde #date').html(data.date)
  115.                                                        $('.header-right-solde #time').html(data.time)
  116.                                                        $('.header-right-solde #solde').html(`${parseFloat(data.solde).toFixed({{ deviseAgence().scale }})} ${ data.deviseComptable }`)
  117.                                                        $('.header-right-solde #disponible').html(`${parseFloat(data.disponible).toFixed({{ deviseAgence().scale }})} ${ data.deviseComptable }`)
  118.                                                        viewAlert(`Votre solde actuel est ${parseFloat(data.solde).toFixed({{ deviseAgence().scale }})} ${ data.deviseComptable }`,'success')
  119.                                                        })"></span>
  120.                                         </a>
  121.                                         {##}
  122.                                     <div class="btn-group" id="dropdown-login">
  123.                                         <button class="btn btn-default btn-sm dropdown-toggle dropdown-login-btn dropdown-login-solde text-blue"
  124.                                                 type="button" data-toggle="dropdown" aria-haspopup="true"
  125.                                                 aria-expanded="false">
  126.                                             {{ "Montant disponible"|trans }} <span
  127.                                                     id="disponible">{{ solde.disponible|number_format(deviseAgence().scale,'.','') }} {{ solde.deviseComptable }}</span>
  128.                                             <span class="caret"></span>
  129.                                         </button>
  130.                                         <ul class="dropdown-menu">
  131.                                             <li><a href=""> {{ "Votre solde le"|trans }} <span id="date">{{ solde.date }}</span>{{"à"|trans}}
  132.                                                     <span id="time">{{ solde.time }}</span></a></li>
  133.                                             <hr class="style-hr " style="margin: 0 5px;border-color: var(--color-site-2);">
  134.                                             <li><a href=""> {{ "Solde"|trans }} <span
  135.                                                             id="solde">{{ solde.solde|number_format(deviseAgence().scale,'.','') }} {{ solde.deviseComptable }}</span></a>
  136.                                             </li>
  137.                                             <hr class="style-hr " style="margin: 0 5px;border-color: var(--color-site-2);">
  138.                                             <li><a href=""> {{ "Montant disponible"|trans }} <span
  139.                                                             id="disponible">{{ solde.disponible|number_format(deviseAgence().scale,'.','') }} {{ solde.deviseComptable }}</span></a>
  140.                                             </li>
  141.                                         </ul>
  142.                                     </div>
  143.                                     {##}
  144.                                     {#  Montant disponible <span id="disponible">{{ solde.disponible|number_format(deviseAgence().scale,'.','') }} {{ deviseAgence().symbole }}</span>#}
  145.                                     </p>
  146.                                 </div>
  147.                             </div>
  148.                         {% endif %}
  149.                         {% if getDevise()|length > 1 and multi_devise == 'true' %}
  150.                             <div class="btn-group" id="dropdown-login">
  151.                                 <button class="btn btn-default btn-sm dropdown-toggle dropdown-login-btn" type="button"
  152.                                         data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
  153.                                     {{ "Devise"|trans }} ({{ deviseSelected().symbole }})<i class="fa fa-sort"></i>
  154.                                 </button>
  155.                                 <ul class="dropdown-menu">
  156.                                     {% for devise in getDevise() %}
  157.                                         {% if devise.symbole != deviseSelected().symbole %}
  158.                                             <li>
  159.                                                 <a href="{{ path('change_devise',{code:devise.code}) }}"><b>{{ devise.symbole }}</b> {{ devise.libelle }}
  160.                                                 </a></li>
  161.                                         {% endif %}
  162.                                     {% endfor %}
  163.                                 </ul>
  164.                             </div>
  165.                         {% endif %}
  166.                         {% if   is_granted('IS_AUTHENTICATED_FULLY') %}
  167.                             <div class="btn-group" id="dropdown-login">
  168.                                 <button class="btn btn-default btn-sm dropdown-toggle dropdown-login-btn" type="button"
  169.                                         data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
  170.                                     <img src="{{ asset('assets-commun/images/icons/connect-new.svg') }}"
  171.                                          class="social-icon-svg" alt=""> {{ "Votre Espace"|trans }} <span
  172.                                             class="caret"></span>
  173.                                 </button>
  174.                                 {% if app.request.server.has('DOMAINE_ARCHIVE') %}
  175.                                     {% set domaine_archive = app.request.server.get('DOMAINE_ARCHIVE')|json_decode %}
  176.                                 {% endif %}
  177.                                 <ul class="dropdown-menu">
  178.                                     {% if not client.hideListRservation %}
  179.                                         {% if hasModule('sejour') or hasModule('voyages-organise') or hasModule('voyages-package') or hasModule('vol') %}
  180.                                             <li><a href="{{ path('espace_affilie_reservations') }}"> <i
  181.                                                             class="fa fa-file-text-o"></i> {{"Réservations"|trans}}</a>
  182.                                                 <ul class="niveau3">
  183.                                                     {% for route in routeReservation() %}
  184.                                                         <li class="{{ route.route_liste }}"><a
  185.                                                                     href="{{ path(route.route_liste) }}">  {{ ("Réservations " ~ route.libelle)|trans }}</a>
  186.                                                         </li>
  187.                                                         {% if domaine_archive is defined and route.route_liste == 'espace_affilie_reservations' %}
  188.                                                             <li class="{{ route.route_liste }}"><a
  189.                                                                         href="{{ path(route.route_liste ~ '_archive') }}">  {{ ("Réservations " ~ route.libelle)|trans }}
  190.                                                                     <b class="text-danger">({{ domaine_archive.libelle }}
  191.                                                                         )</b></a>
  192.                                                             </li>
  193.                                                         {% endif %}
  194.                                                     {% endfor %}
  195.                                                     {% if app.request.server.has('FLIGHTS_WORLDSOFT_SUB_DOMAINE') and hasModule('vol') %}
  196.                                                         <li class="flight-queue"><a
  197.                                                                     href="{{ app.request.server.get('FLIGHTS_WORLDSOFT_SUB_DOMAINE') }}/#!/flight-queue">  {{ "Réservations Vol"|trans }}</a>
  198.                                                         </li>
  199.                                                     {% endif %}
  200.                                                 </ul>
  201.                                             </li>
  202.                                         {% endif %}
  203.                                     {% endif %}
  204.                                     {% if is_granted('ROLE_CLIENT_AMICALE_RESPONSABLE') or is_granted('ROLE_CLIENT_B2B') %}
  205.                                         {% if hasModule('tache') %}
  206.                                             <li><a href="{{ path('ticket_liste') }}"> <i
  207.                                                             class="fa fa-tasks"></i> {{ "gestion des tickets"|trans }} </a></li>
  208.                                         {% endif %}
  209.                                         <li><a href="{{ path('espace_affilie_reglements') }}"> <i
  210.                                                         class="fa fa-credit-card"></i> {{"comptabilité"|trans}} </a></li>
  211.                                         {% if domaine_archive is defined %}
  212.                                             <li><a href="{{ path('espace_affilie_reglements_archive') }}"> <i
  213.                                                             class="fa fa-credit-card"></i> {{"comptabilité"|trans}} <b
  214.                                                             class="text-danger">({{ domaine_archive.libelle }})</b>
  215.                                                 </a></li>
  216.                                         {% endif %}
  217.                                         <li><a href="{{ path('espace_affilie_balance') }}"> <i
  218.                                                         class="fa fa-balance-scale"></i>{{ "Balance"|trans }}</a></li>
  219.                                         <li><a href="{{ path('espace_affilie_balance_paiements_echeance') }}"> <i
  220.                                                         class="fa fa-balance-scale"></i>{{"Paiements à échéance"|trans}}</a></li>
  221.                                         {% if not (amicale and amicale.configs.HIDE_LIST_FACTURE is defined and amicale.configs.HIDE_LIST_FACTURE|upper == 'TRUE') %}
  222.                                             <li><a href="{{ path('espace_affilie_factures') }}"> <i
  223.                                                             class="fa fa-file-archive-o"></i> {{ "Factures et avoirs"|trans }}</a>
  224.                                             </li>
  225.                                             {% if domaine_archive is defined %}
  226.                                                 <li><a href="{{ path('espace_affilie_factures_archive') }}"> <i
  227.                                                                 class="fa fa-file-archive-o"></i> {{ "Factures et avoirs"|trans }}
  228.                                                         <b class="text-danger">({{ domaine_archive.libelle }}
  229.                                                             )</b></a>
  230.                                                 </li>
  231.                                             {% endif %}
  232.                                         {% endif %}
  233.                                         {% if is_granted('ROLE_CLIENT_B2B_RESPONSABLE') or is_granted('ROLE_CLIENT_AMICALE_RESPONSABLE') %}
  234.                                             <li><a href="{{ path('espace_agence_utilisateurs') }}"> <i
  235.                                                             class="fa fa-user"></i> {{ "Utilisateurs"|trans }}</a></li>
  236.                                             <li><a href="{{ path('espace_agence_profile') }}"> <i
  237.                                                             class="fa fa-cog"></i>
  238.                                                 {{"Etablissement"|trans }}</a></li>
  239.                                             {# Recharge solde menu - opens modal #}
  240.                                             {% set configurationPayement = getConfigurationPayement() %}
  241.                                             {% if configurationPayement.0.fraisService is defined %}
  242.                                                 <li>
  243.                                                     <a href="#" data-toggle="modal" data-target="#rechargeSoldeModal">
  244.                                                         <i
  245.                                                                 class="fa fa-credit-card"></i> {{ "Recharge solde"|trans }}</a>
  246.                                                 </li>
  247.                                             {% endif %}
  248.                                             <li><a href="{{ path('espace_agence_marges') }}"> <i
  249.                                                             class="fa fa-bar-chart"></i> {{ "Marges"|trans }}</a></li>
  250.                                             {% if hasModule('billetterie-avion-xml') %}
  251.                                                 <li><a href="{{ path('espace_agence_marges_aerien') }}"> <i
  252.                                                                 class="fa fa-bar-chart"></i> {{"Marges aérien"|trans}}</a></li>
  253.                                             {% endif %}
  254.                                         {% endif %}
  255.                                     {% endif %}
  256.                                     <li><a href="{{ path('app_change_password') }}"> <i
  257.                                                     class="fa fa-key"></i> {{ "Changer le mot de passe"|trans }}</a></li>
  258.                                 </ul>
  259.                             </div>
  260.                         {% endif %}
  261.                     </ul>
  262.                 </div>
  263.             </div>
  264.         </div>
  265.         <div class="container-fluid">
  266.             <!-- Brand and toggle get grouped for better mobile display -->
  267.             <div class="navbar-header">
  268.                 <button type="button" class="navbar-toggle" data-toggle="collapse"
  269.                         data-target="#bs-example-navbar-collapse-1">
  270.                     <span class="sr-only">Toggle navigation</span>
  271.                     <span class="icon-bar"></span>
  272.                     <span class="icon-bar"></span>
  273.                     <span class="icon-bar"></span>
  274.                 </button>
  275.                 <a class="navbar-brand hidden-lg mobile-logo" href="/">
  276.                     <img src="{{ src_logo }}" class="logo-responsive" alt="{{ alt_logo }}">
  277.                 </a>
  278.             </div>
  279.             <!-- Collect the nav links, forms, and other content for toggling -->
  280.             <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
  281.                 <div class="row align-items-center">
  282.                     <div class="col-lg-2">
  283.                         <div class="pull-left">
  284.                             <a href="/">
  285.                                 <img src="{{ src_logo }}"
  286.                                      class="logo-responsive hidden-md hidden-sm hidden-xs" alt="{{ alt_logo }}">
  287.                             </a>
  288.                         </div>
  289.                     </div>
  290.                     <div class="col-md-8 col-xs-12">
  291.                         <ul class="nav navbar-nav justify-content-center">
  292.                             <li class="{#active#}"><a href="/">{{ "ACCUEIL"|trans }}</a></li>
  293.                             {% if hasModule('sejour') %}
  294.                                 <li><a href="{{ path('sejour_hotel_availability') }} ">{{"HÔTELS"|trans}} </a></li>
  295.                             {% endif %}
  296.                             {% if hasModule('appartement') %}
  297.                                 <li><a href="{{ path('sejour_appartement_availability') }} ">{{ "APPARTEMENTS"|trans }} </a></li>
  298.                             {% endif %}
  299.                             {% if hasModule('voyages-package') %}
  300.                                 <li><a href="{{ path('front_package_liste') }} ">
  301.                                     {{"Pack VOYAGE ORGANISÉS"|trans}}</a>
  302.                                 </li>
  303.                             {% endif %}
  304.                             {% if hasModule('voyages-organise') %}
  305.                                 <li><a href="{{ path('front_voyageorganise_liste') }}" class="navitem-vo">{{"VOYAGES
  306.                                 ORGANISÉS"|trans}}</a></li>
  307.                                 <li><a href="{{ path('front_voyagecarte_liste') }}" class="navitem-vc">{{"Voyages à la
  308.                                     carte"|trans}}</a></li>
  309.                                 <li><a href="{{ path('front_omraorganise_liste') }}" class="navitem-omra">{{ "OMRA"|trans }}</a></li>
  310.                                 <li><a href="{{ path('front_circuitorganise_liste') }}" class="navitem-circuits">
  311.                                     {{ "CIRCUITS"|trans }} </a></li>
  312.                                 <li><a href="{{ path('front_croisieres_liste') }}" class="navitem-croisieres">
  313.                                     {{"CROISIÈRES"|trans}} </a></li>
  314.                             {% endif %}
  315.                             {% if hasModule('vol') %}
  316.                                 <li class="form_vol"><a  href="{{ path('vol') }} "> {{ "BILLETTERIE AVION"|trans }}</a></li>
  317.                                 {% if hasModule('billetterie-avion-xml') %}
  318.                                     <li><a href="{{ path('home_aerien') }}"> {{ "VOL"|trans }} </a></li>
  319.                                 {% endif %}
  320.                             {% endif %}
  321.                             {% if hasModule('bien-etre') %}
  322.                                 <li><a href="{{ path('front_bien_etre_liste') }} "> {{ "SPA"|trans }}</a></li>
  323.                             {% endif %}
  324.                             {#<li><a href="{{ url('volSearch') }}" > Vols </a>#}
  325.                             {% if hasModule('location-voiture') %}
  326.                                 {% if hasModule('location-voiture-xml') %}
  327.                                     <li><a href="{{ path('availibility') }} "> {{ "LOCATION VOITURE"|trans }}</a></li>
  328.                                 {% endif %}
  329.                             {% endif %}
  330.                             {% if hasModule('billetterie-maritime-xml') %}
  331.                                 <li><a href="{{ path('availibility_maritime') }} ">{{ "MARITIME"|trans }} </a></li>
  332.                             {% endif %}
  333.                             {#  <li><a href="/"> VISA ASSURANCES</a></li>#}
  334.                             {% if is_granted('ROLE_CLIENT_AMICALE_RESPONSABLE') or is_granted('ROLE_CLIENT_B2B') %}
  335.                                 {% if hasModule('tache') %}
  336.                                     <li><a href="{{ path('ticket_liste') }}"> {{ "gestion des tickets"|trans }} </a></li>
  337.                                 {% endif %}
  338.                             {% endif %}
  339.                             {% if is_granted('IS_AUTHENTICATED_FULLY') %}
  340.                                 <li class="contact-display"><a href="{{ path('contact') }} ">{{ "CONTACT"|trans }}</a></li>
  341.                                 {% for article in ArticlesElement().desktop %}
  342.                                     {% if article.code=="Contactez-nous" %}
  343.                                         {% for elem in article.elements %}
  344.                                             <li class="contact-article"><a
  345.                                                         href="{{ path('contact_us') }} "> {{ elem.titre }}</a></li>
  346.                                         {% endfor %}
  347.                                     {% endif %}
  348.                                 {% endfor %}
  349.                             {% endif %}
  350.                             {% if is_granted('IS_AUTHENTICATED_FULLY') and form_send_payment == 'true' %}
  351.                                 <li><a href="{{ path('sendPayment') }} ">{{ "ENVOYER UN PAIEMENT"|trans }}</a></li>
  352.                             {% endif %}
  353.                         </ul>
  354.                     </div>
  355.                     <div class="col-md-2 hidden-xs hidden-sm">
  356.                         <div class="social pull-right ">
  357.                             <div class="card-header ">
  358.                                 <div class="row center-content ">
  359.                                     <div class="col-xs ">
  360.                                        <svg version="1.1" id="Calque_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
  361.      width="45px" height="45px" viewBox="0 0 45 45" enable-background="new 0 0 45 45" xml:space="preserve">
  362. <g>
  363.     <g>
  364.         <g>
  365.             <path fill="var(--color-site-1)" d="M33.41,19.279c-0.193,0.047-0.332,0.193-0.526,0.239c-0.239,0.093-0.432,0.147-0.671,0.193
  366.                 c-0.285,0.046-0.48-0.147-0.572-0.386c-0.046-0.24-0.092-0.434-0.046-0.674c0.046-0.433,0.148-0.865,0.24-1.298
  367.                 c0.238-1.299,0.479-2.635,0.719-3.934c0.045-0.332,0.147-0.718,0.091-1.059c0-0.434-0.284-0.627-0.717-0.627
  368.                 c-0.57,0-1.197,0-1.78,0c-0.578,0-1.149,0-1.675,0c-0.148,0-0.285,0-0.434,0.046c-0.238,0.047-0.386,0.193-0.431,0.387
  369.                 c0,0.147,0.091,0.332,0.331,0.434c0.193,0.046,0.385,0.092,0.625,0.092c0.479,0.046,0.626,0.24,0.626,0.719
  370.                 c0,0.092,0,0.147,0,0.239c-0.192,1.151-0.387,2.303-0.626,3.454c-0.092,0.673-0.193,1.345-0.285,1.963
  371.                 c-0.146,0.957,0.82,1.87,1.54,1.962c0.431,0.045,0.911,0.092,1.343,0.092c0.958,0,1.779-0.434,2.45-1.105
  372.                 c0.093-0.092,0.24-0.286,0.24-0.434C33.89,19.335,33.696,19.141,33.41,19.279z"/>
  373.             <path fill="var(--color-site-1)" d="M40.796,4.173c-5.516-5.563-14.486-5.563-19.997,0c-5.324,5.324-5.518,13.817-0.571,19.381l0.093,0.091
  374.                 c-0.526,1.153-1.483,2.59-2.929,3.308c-0.479,0.239-0.388,0.958,0.146,1.06c1.631,0.239,3.934,0,6.043-1.631l0.045,0.046
  375.                 c5.417,3.169,12.518,2.45,17.169-2.211C46.314,18.663,46.314,9.69,40.796,4.173z M30.821,25.037
  376.                 c-5.997,0-10.841-4.846-10.841-10.843c0-5.996,4.844-10.831,10.841-10.831s10.842,4.845,10.842,10.841
  377.                 C41.663,20.201,36.818,25.037,30.821,25.037z"/>
  378.             <path fill="var(--color-site-1)" d="M26.548,33.096c-1.106-1.15-2.542-1.15-3.694,0c-0.865,0.866-1.723,1.723-2.587,2.589
  379.                 c-0.24,0.239-0.433,0.285-0.72,0.147c-0.525-0.332-1.15-0.57-1.676-0.912c-2.495-1.585-4.604-3.602-6.475-5.895
  380.                 c-0.911-1.151-1.723-2.35-2.302-3.74C9,24.999,9,24.853,9.24,24.612c0.912-0.819,1.721-1.677,2.588-2.541
  381.                 c1.197-1.198,1.197-2.589,0-3.787c-0.718-0.718-1.391-1.391-2.063-2.063c-0.718-0.718-1.391-1.437-2.11-2.109
  382.                 c-1.104-1.105-2.541-1.105-3.693,0c-0.865,0.866-1.722,1.722-2.588,2.589c-0.82,0.819-1.243,1.777-1.345,2.873
  383.                 c-0.146,1.777,0.285,3.5,0.912,5.176c1.299,3.501,3.261,6.521,5.61,9.351c3.214,3.841,7.046,6.861,11.514,9.018
  384.                 c2.017,0.957,4.081,1.723,6.283,1.869c1.582,0.093,2.929-0.331,4.024-1.538c0.72-0.865,1.585-1.584,2.349-2.395
  385.                 c1.151-1.197,1.151-2.634,0-3.786C29.33,35.878,27.939,34.487,26.548,33.096z"/>
  386.             <path fill="var(--color-site-1)" d="M31.153,10.889c1.004,0,1.824-0.82,1.824-1.824s-0.82-1.869-1.824-1.869
  387.                 c-1.006,0-1.823,0.819-1.869,1.822C29.33,10.077,30.147,10.889,31.153,10.889z"/>
  388.         </g>
  389.     </g>
  390. </g>
  391. </svg>
  392.                                     </div>
  393.                                     <div class="col-xs">
  394.                                         <div class="card-body ">
  395.                                             <h6 class="card-title">{{"INFOS & RÉSERVATIONS"|trans}}</h6>
  396.                                             {% if  amicale and amicale.configs.NUM_SUPPORT is defined %}
  397.                                                 {% set num_support = amicale.configs.NUM_SUPPORT %}
  398.                                                 <a href="tel:{{ num_support }}">
  399.                                                     <p class="card-text "> {{ getAgence().prefixTel }} {{ num_support }}</p>
  400.                                                 </a>
  401.                                             {% else %}
  402.                                                 <a href="tel:{{ getAgence().tel1 }}">
  403.                                                     <p class="card-text "> {{ getAgence().prefixTel }} {{ getAgence().tel1 }}</p>
  404.                                                 </a>
  405.                                             {% endif %}
  406.                                         </div>
  407.                                     </div>
  408.                                 </div>
  409.                             </div>
  410.                         </div>
  411.                     </div>
  412.                 </div>
  413.             </div>
  414.             <!-- /.navbar-collapse -->
  415.         </div>
  416.     </nav>
  417. </header>
  418. {# Recharge solde menu - opens modal #}
  419. {% if configurationPayement.0.fraisService is defined %}
  420.     {# Recharge solde modal #}
  421.     <div class="modal fade" id="rechargeSoldeModal" tabindex="-1" role="dialog"
  422.          aria-labelledby="rechargeSoldeModalLabel" aria-hidden="true">
  423.         <div class="modal-dialog" role="document">
  424.             <div class="modal-content">
  425.                 <div class="modal-header">
  426.                     <h5 class="modal-title" id="rechargeSoldeModalLabel">{{ "Recharge solde"|trans }}</h5>
  427.                     <button type="button" class="close" data-dismiss="modal"
  428.                             aria-label="Close">
  429.                         <span aria-hidden="true">&times;</span>
  430.                     </button>
  431.                 </div>
  432.                 <form method="post"
  433.                       action="{{ path('espace_agence_recharge_solde') }}">
  434.                     <div class="modal-body">
  435.                         <div class="form-group">
  436.                             <label for="montant_recharge">{{ "Montant de la recharge"|trans }}</label>
  437.                             <input type="number" min="0"
  438.                                    class="form-control" name="montant_recharge"
  439.                                    id="montant_recharge"
  440.                                    placeholder="{{ 0|number_format(deviseAgence().scale, '.', '') }}"
  441.                                    required>
  442.                             <small id="rechargeInfo" class="form-text text-muted">{{"Le montant final (recharge + frais)
  443.                             sera affiché ici."|trans}}</small>
  444.                         </div>
  445.                         {# hidden fields #}
  446.                         <input type="hidden" name="frais_percent" id="frais_percent"
  447.                                value="{{ configurationPayement.0.fraisService }}">
  448.                         <input type="hidden" name="montant_total" id="montant_total"
  449.                                value="">
  450.                     </div>
  451.                     <div class="modal-footer">
  452.                         <button type="button" class="btn btn-secondary"
  453.                                 data-dismiss="modal">{{ "Annuler"|trans }}
  454.                         </button>
  455.                         <button type="submit" class="btn btn-primary">{{ "Payer"|trans }}</button>
  456.                     </div>
  457.                 </form>
  458.             </div>
  459.         </div>
  460.     </div>
  461.     <script>
  462.         // Compute recharge fee and total (vanilla JS)
  463.         (function () {
  464.             var input = document.getElementById('montant_recharge');
  465.             var fraisInput = document.getElementById('frais_percent');
  466.             var totalInput = document.getElementById('montant_total');
  467.             var info = document.getElementById('rechargeInfo');
  468.             if (!input || !fraisInput || !totalInput || !info) return;
  469.             var fraisPercent = parseFloat(fraisInput.value) || 0;
  470.             var scale = {{ deviseAgence().scale|default(2) }};
  471.             var symbole = '{{ deviseAgence().symbole|e('js') }}';
  472.             // ensure the input step and placeholder reflect the agence currency scale
  473.             try {
  474.                 var computedStep = (1 / Math.pow(10, scale));
  475.                 // set numeric step as string with exact decimals (works also for scale=0)
  476.                 input.step = computedStep.toFixed(Math.max(0, scale));
  477.                 input.placeholder = (0).toFixed(Math.max(0, scale));
  478.             } catch (e) {
  479.                 // fallback to 2 decimals
  480.                 input.step = '0.01';
  481.                 input.placeholder = '0.00';
  482.             }
  483.             function update() {
  484.                 var val = parseFloat(input.value);
  485.                 if (isNaN(val) || val <= 0) {
  486.                     totalInput.value = '';
  487.                     info.innerText = 'Le montant final (recharge + frais) sera affiché ici.';
  488.                     return;
  489.                 }
  490.                 var fee = val * fraisPercent / 100;
  491.                 var total = val + fee;
  492.                 totalInput.value = total.toFixed(scale);
  493.                 info.innerText = 'Vous paierez ' + total.toFixed(scale) + ' ' + symbole + ' (frais: ' + fraisPercent + '% = ' + fee.toFixed(scale) + ' ' + symbole + ')';
  494.             }
  495.             input.addEventListener('input', update);
  496.             document.querySelector('a[data-target="#rechargeSoldeModal"]').closest('li').addEventListener('click', function () {
  497.                 setTimeout(function () {
  498.                     if (input) input.focus();
  499.                     update();
  500.                 },500)
  501.             });
  502.         })();
  503.     </script>
  504. {% endif %}
  505. {% include checkCustomTemplate('header-mobile.html.twig') %}
  506. {% if app.request.get('_route') == 'header' %}
  507.     <script type="text/javascript" src="{{ asset('assets-commun/js/jquery.js') }}"></script>
  508.     <script type="text/javascript" src="{{ asset('assets-commun/js/bootstrap.js') }}"></script>
  509.     <script>$(document).ready(function () {
  510.             $('.toggle-navbar').on('click', function (e) {
  511.                 e.preventDefault();
  512.                 $('body').toggleClass('navbar-open');
  513.             });
  514.         });</script>
  515. {% endif %}