templates/ZZ_front_end/top_bar/top_bar.html.twig line 1

  1. {{ traduzione.CaricaTraduzioniDaFamiglia("top_bar", app.request.getLocale(), true) }}
  2. {{ traduzione.CaricaTraduzioniDaFamiglia("login", app.request.getLocale(), true) }}
  3. {{ traduzione.CaricaTraduzioniDaFamiglia("home_shop", app.request.getLocale(), true) }}
  4. <div class="navbar navbar-default navbar-fixed-top" role="navigation">
  5.     <div class="navbar-header">
  6.         <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
  7.             <span class="sr-only">Toggle navigation</span>
  8.             <span class="icon-bar"></span>
  9.             <span class="icon-bar"></span>
  10.             <span class="icon-bar"></span>
  11.         </button>
  12.         <a class="navbar-brand" href="{{ path('homepage') }}"><img src="{{ impostazioni.ritornaImpostazioneDaNome('Logo') }}" style="height: 30px; width: auto;" title="{{ impostazioni.ritornaImpostazioneDaNome('NomeShop') }}"></a>
  13.     </div>
  14.     <div class="navbar-collapse collapse">
  15.         {{ include('ZZ_front_end/top_bar/top_menu.html.twig') }}
  16.         {% if app.request.get('_route') not in ['richiesta_nuovo_inserimento_azienda', 'lista_prodotti_nl', 'agente_cliente_dettaglio', 'agente_cliente_dettaglio_da_codice','agente_dettaglio_anagrafica'] %}
  17.             <ul class="nav navbar-nav navbar-right">
  18.                 <li style="height: 55px; display: flex; align-items: center; font-weight: bold;">
  19.                     <a class="navbar-button-right" style="color: black;" href="#" onclick="{% if (is_granted("ROLE_ADMIN") or is_granted("ROLE_AGENTE") or is_granted("ROLE_COMMERCIALE")) %}ApriDettaglioClienteDialog();{% else %}ApriDettaglioClienteLoggato();{% endif %}" >
  20.                     <span id="navbar-dettaglio-cliente" style="background-color: yellow; max-width: 300px; max-height: 55px; overflow: hidden;">
  21.                         {% if servizi.RitornaAnagraficaCollegataUtente() %}
  22.                             {{ servizi.RitornaAnagraficaCollegataUtente.ragioneSociale|default("") }}
  23.                         {% endif %}
  24.                     </span>
  25.                     </a>
  26.                 </li>
  27.                 {% if (is_granted("ROLE_ADMIN") or is_granted("ROLE_AGENTE") or is_granted("ROLE_COMMERCIALE")) %}
  28.                 <li>
  29.                     <a class="navbar-button-right" href="#" onclick="ApriDettaglioClienteDialog();" >
  30.                         <img class="top-bar-seleziona-cliente" style="height: 25px;" src="{{ asset('img/sistema/customer_icon.png') }}" alt="Seleziona cliente" title="Seleziona cliente">
  31.                     </a>
  32.                 </li>
  33.                 {% elseif is_granted("IS_AUTHENTICATED_REMEMBERED")  %}
  34.                     {% set attivaTipoOrdine = impostazioni.ritornaImpostazioneDaNome("AbilitaTipoOrdine") %}
  35.                     {% if attivaTipoOrdine == '1' %}
  36.                     <li>
  37.                         <div class="form-inline" style="float:right; margin-right:20px;padding-top: 10px;{% if attivaTipoOrdine != '1' %}display:none;{% endif %}">
  38.                             <div class="form-group">
  39.                                 <label for="tipo-ordine-input">{{ traduzione.OttieniElementoDizionario("home_shop_tipo_ordine", "home_shop").valoreUscita }}</label>
  40.                                 <select id="tipo-ordine-input" class="form-control" style="width:auto;">
  41.                                     {% for tipoOrdine in servizi.RitornaTipiOrdine() %}
  42.                                         <option {% if loop.first %} selected="selected"{% endif %} value="{{ tipoOrdine.id|default("") }}">{{ tipoOrdine.testoVisualizzato|default("") }}</option>
  43.                                     {% endfor %}
  44.                                     {% if servizi.RitornaTipiOrdine()|length <= 0 or attivaTipoOrdine == '0' %}
  45.                                         <option value=""></option>
  46.                                     {% endif %}
  47.                                 </select>
  48.                             </div>
  49.                         </div>
  50.                     </li>
  51.                     {% endif %}
  52.                 {% endif %}
  53.                 {% if impostazioni.ritornaImpostazioneDaNome('MostraPulsanteOrdineVeloceTop') == '1' %}
  54.                 <li>
  55.                     <a class="navbar-button-right"  href="{{ path('ordine_veloce') }}">
  56.                         <img style="height: 25px;" src="{{ asset('img/sistema/fast_order.png') }}" alt="{{ traduzione.OttieniElementoDizionario("top_bar_menu_ordine_veloce_hover", "top_bar").valoreUscita }}" title="{{ traduzione.OttieniElementoDizionario("top_bar_menu_ordine_veloce_hover", "top_bar").valoreUscita }}">
  57.                     </a>
  58.                 </li>
  59.                 {% endif %}
  60.                 <li>
  61.                     <a class="navbar-button-right" style="padding-bottom:0; display: flex;align-content: center;justify-content: center;align-items: center;"  href="{{ path('carrello') }}" id="mostraCarrello">
  62.                         <img style="height: 25px;" src="{{ asset('img/sistema/carrello.jpg') }}" alt="{{ traduzione.OttieniElementoDizionario("top_bar_carrello", "top_bar").valoreUscita }}">
  63.                         <div class="centra-flex-tutto" style="display:flex;flex-direction: column;padding-left: 10px;">
  64.                             <div class="centra-flex-tutto">
  65.                                 <span style="background-color: red;margin-right: 5px;" class="badge" id="badgeArticoliCarello"></span>
  66.                                 <span id="badgeTotaleImponibileCarrello"></span>
  67.                             </div>
  68.                         </div>
  69.                     </a>
  70.                 </li>
  71.                 {% if app.user %}
  72.                     <li class="dropdown" id="form_dropdown_li" style="margin-right: -30px;">
  73.                         <a class="navbar-button-right"  href="#" id="form_nav_login" class="dropdown-toggle" style="margin-right: 10px;" data-toggle="dropdown">
  74.                             {% if app.user %}
  75.                                 {{ traduzione.OttieniElementoDizionario("ciao", "top_bar").valoreUscita }}<span class="nome_utente"><b>{{ app.user.username|capitalize }}</b></span>
  76.                             {% else %}
  77.                                 <b><a href="{{ path('home_login') }}">Login</a></b>
  78.                             {% endif %}
  79.                             <span class="caret"></span>
  80.                         </a>
  81.                         {% if app.user %}
  82.                         <ul id="login-dp" class="dropdown-menu">
  83.                             <li>
  84.                                 <div class="row">
  85.                                     <div class="col-md-12">
  86.                                         <div id="loginContainer" class="col-md-12">
  87.                                             {% if is_granted("IS_AUTHENTICATED_REMEMBERED") %}
  88.                                                 {{ traduzione.OttieniElementoDizionario("login_collegato_come", "login").valoreUscita ~ ' ' ~ app.user.username|default("") }}
  89.                                                 <a href="{{ path('app_logout') }}" class="btn btn-danger">
  90.                                                     {{ traduzione.OttieniElementoDizionario("login_logout", "login").valoreUscita }}
  91.                                                 </a>
  92.                                             {% else %}
  93.                                                 {% if app.user %}
  94.                                                     {{ render(controller('FOSUserBundle:Security:login')) }}
  95.                                                 {% else %}
  96.                                                     <a href="{{ path('home_login') }}">Login</a>
  97.                                                 {% endif %}
  98.                                             {% endif %}
  99.                                         </div>
  100.                                     </div>
  101.                                 </div>
  102.                             </li>
  103.                         </ul>
  104.                         {% endif %}
  105.                     </li>
  106.                 {% else %}
  107.                     <li>
  108.                         <a href="{{ path('home_login') }}">Login</a>
  109.                     </li>
  110.                 {% endif %}
  111.                 <li class="dropdown" id="form_dropdown_li">
  112.                     <a href="#" class="dropdown-toggle" style="margin-right: 10px;" data-toggle="dropdown">
  113.                         {% set linguaAttuale = servizi.RitornaLinguaDaLocale(app.request.locale) %}
  114.                         {% if linguaAttuale is not null %}
  115.                             <img src="{{ linguaAttuale.icona }}" class="img-responsive" style="height: 25px;">
  116.                         {% endif %}
  117.                     </a>
  118.                     <ul class="dropdown-menu">
  119.                         {% set lingue = servizi.RitornaLingue() %}
  120.                         {% for l in lingue %}
  121.                         <li {% if app.request.locale == l.locale %}style="background-color: yellow;"{% endif %}>
  122.                             <a href="{{ path('set_locale', { locale : (l.locale) }) }}">
  123.                                 <img style="height: 25px; display: inline;" src="{{ l.icona }}" class="img-responsive">
  124.                                 <span><b>{{ l.nome|default('') }}</b></span>
  125.                             </a>
  126.                         </li>
  127.                         {% endfor %}
  128.                     </ul>
  129.                 </li>
  130.             </ul>
  131.         {% endif %}
  132.     </div>
  133. </div>