templates/_layout/header.html.twig line 1

Open in your IDE?
  1. <nav class="navbar navbar-expand-lg  m-0" id="mainNavbar">
  2.     <div class="container-fluid">
  3.         <div class="d-flex w-100 align-items-center justify-content-between justify-content-md-start me-md-5">
  4.                 <a class="navbar-brand d-block ms-2" href="{{ path('app_stock_index') }}">
  5.                     <img src="/img/logo_dark.svg" class="logo mr-2" style="height:50px;">
  6.                 </a>
  7.                 {% if is_granted('ROLE_USER') %}
  8.                     {% if app.user.shop  %}
  9.                        {#  <a href="{{ app.user.shop.config.url is defined ?app.user.shop.config.url:'#' }}">#}
  10.                             {% if  app.user.shop.logo is defined and app.user.shop.logo!='' %}
  11.                                 <img src="{{ app.user.shop.logo }}" class="logo ms-5" alt="{{ app.user.shop.name }}">
  12.                             {% elseif app.user.shop.config is defined and app.user.shop.config.logo is defined and  app.user.shop.config.logo!='' %}
  13.                                 <img src="{{ app.user.shop.config.logo }}" class="logo ms-5" alt="{{ app.user.shop.name }}">
  14.                             {% endif %}
  15.                             {# % else %}
  16.                             <h1 class="m-0 p-0 text-grey">{{ app.user.shop.name }}</h1>
  17.                             {% endif %#}
  18.                         {# </a> #}
  19.                     {% endif %}
  20.                 {% endif %}
  21.             </div>
  22.         {% if is_granted('ROLE_USER') %}
  23.             <div class="collapse navbar-collapse gap-4 d-flex d-lg-block" id="navbarSupportedContent">
  24.                 {# { render(controller('App\\Controller\\StockController::searchForm')) }#}
  25.                 <div class="flex-fill">
  26.                     <form class="d-flex justify-content-center" id="searchForm" action="{{ path('app_stock_index') }}">
  27.                         <img src="/img/search.svg" class="ms-2" />
  28.                         <input class="form-control me-2" type="search" placeholder="{{ "Search"|trans }}"
  29.                                aria-label="Search" name="keyword"
  30.                                value="{{ app.request.get("keyword")?app.request.get("keyword"):'' }}"/>
  31.                         <input type="hidden" class="form-control me-2" id="sortby" name="sortby"
  32.                                value="{{ app.request.get("sortby")?app.request.get("sortby"):'' }}"/>
  33.                         <input type="hidden" class="form-control me-2" id="filterBy" name="category"
  34.                                value="{{ app.request.get("category")?app.request.get("category"):'' }}"/>
  35.                         <input type="hidden" class="form-control me-2" id="modelId" name="model"
  36.                                value="{{ app.request.get("model")?app.request.get("model"):'' }}"/>
  37.                         <input type="hidden" class="form-control me-2" id="manufacturerId" name="brand"
  38.                                value="{{ app.request.get("brand")?app.request.get("brand"):'' }}"/>
  39.                         <button class="btn btn-sm btn-primary" type="submit">{{ "Search"|trans }}</button>
  40.                     </form>
  41.                 </div>
  42.                 {% if not (app.user.email starts with 'afpa' ) %}
  43.                     <li class="nav-item " id="my-account">
  44.                         <a class="nav-link " href="{{ path('app_user_me') }}" id="navbarDropdown">
  45.                                 <div class="picto text-center">
  46.                                     <div class="img">
  47.                                         <img src="/img/account.svg" />
  48.                                     </div>
  49.                                     <div class="fs-7">{{ "My account"|trans }}</div>
  50.                                 </div>
  51.                         </a>
  52.                     </li>
  53.                 {% endif %}
  54.                 {% if is_granted('ROLE_SUPER_ADMIN') == false %}
  55.                     <li class="nav-item me-3">
  56.                         {{ render(controller(
  57.                             'App\\Controller\\CartController::summary', {user: app.user}
  58.                         )) }}
  59.                     </li>
  60.                 {% endif %}
  61.             </div>
  62.         {% endif %}
  63.     </div>
  64.     {#
  65.     <div class="d-flex d-lg-none justify-content-center ">
  66.         {{ render(controller(
  67.             'App\\Controller\\CartController::summary', {user: app.user}
  68.         )) }}
  69.     </div>
  70.     #}
  71. </nav>