templates/template_parts/header.html.twig line 1

Open in your IDE?
  1. <!--Start Header Section -->
  2. <header id="top-header" class="clearfix">
  3.     <!-- Navigation -->
  4.     <nav class="navbar navbar-expand-lg navbar-light bg-gray-100 fixed-top shadow">
  5.         <div class="container-fluid">
  6.             <div class="logo">
  7.                 {% if is_granted('ROLE_ADMIN') %}
  8.                     <a target="_blank" href="{{ path('company_details_edit', {'id': '1'}) }}">
  9.                         <i style="color: red" class="fa fa-pen"></i>
  10.                     </a>
  11.                 {% endif %}
  12.                 <a class="navbar-brand" href="{{ path('app_home') }}">
  13.                     {% if CompanyDetails.getCompanyDetails is not null %}
  14.                         <a style="color: black" href="{{ path('app_home') }}">
  15.                             {{ CompanyDetails.getCompanyDetails.companyName }}
  16.                         </a>
  17.                     {% endif %}
  18.                 </a>
  19.             </div>
  20.             <button class=" navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent"
  21.                     aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
  22.                 <span class="navbar-toggler-icon"></span>
  23.             </button>
  24.             <div class="collapse  main-menu navbar-collapse pr-5 mr-5 " id="navbarSupportedContent">
  25.                 <ul class="navbar-nav ml-auto ">
  26.                     <!-- Nav Item #1 - Home -->
  27.                     <li class="nav-item active">
  28.                         <a class="nav-link" href="{{ path('app_home') }}">
  29.                             <i class="fa fa-home"></i>
  30.                         </a>
  31.                     </li>
  32.                     {% if is_granted('ROLE_ADMIN') %}
  33.                         <li class="nav-item">
  34.                             <a class="nav-link" target="_blank" href="{{ path('dashboard') }}"><i
  35.                                         class="fa fa-chalkboard"></i></a>
  36.                         </li>
  37.                         {% if CountPendingWebsiteInquiries.countContacts >0 %}
  38.                             <li class="nav-item active">
  39.                                 <a style="color: red" class="nav-link" target="_blank"
  40.                                    href="{{ path('website_contacts_index') }}">
  41.                                     <i title="Website inquiries awaiting a response" style="color: purple"
  42.                                        class="fa fa-user-secret"></i>
  43.                                     ({{ CountPendingWebsiteInquiries.countContacts }})
  44.                                 </a>
  45.                             </li>
  46.                         {% endif %}
  47.                     {% endif %}
  48.                     <!-- Nav Item #2 - Products -->
  49.                     <li class="nav-item dropdown">
  50.                         <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button"
  51.                            data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
  52.                             {% if CompanyDetails.companyDetails is not null %}
  53.                                 {{ CompanyDetails.companyDetails.titleProducts }}
  54.                             {% else %}
  55.                                 Products
  56.                             {% endif %}
  57.                         </a>
  58.                         <div class="dropdown-menu" aria-labelledby="navbarDropdown">
  59.                             {% set products = Product.getProductMainAll %}
  60.                             {% for product in products %}
  61.                                 {% if product.isActive==1 %}
  62.                                     <a target="_blank" class="dropdown-item text-gray-600 ml-3"
  63.                                        href="{{ path('product_display', { product: product.product}) }}">{{ product.product }}
  64.                                     </a>
  65.                                 {% else %}
  66.                                     {% if is_granted('ROLE_ADMIN') and product.isActive ==0 %}
  67.                                         <a target="_blank" class="dropdown-item text-gray-600 ml-3"
  68.                                            href="{{ path('product_display', { product: product.product}) }}">
  69.                                             <span style="color: red">{{ product.product }}*</span>
  70.                                         </a>
  71.                                     {% endif %}
  72.                                 {% endif %}
  73.                             {% endfor %}
  74.                         </div>
  75.                     </li>
  76.                     {% if CompanyDetails.companyDetails is not null %}
  77.                         {% if CompanyDetails.companyDetails.headerDisplaySubProducts ==1 %}
  78.                             <!-- Nav Item #2 - Sub-Products -->
  79.                             <li class="nav-item dropdown">
  80.                                 <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button"
  81.                                    data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
  82.                                     {% if CompanyDetails.companyDetails is not null %}
  83.                                         {{ CompanyDetails.companyDetails.titleSubProducts }}
  84.                                     {% else %}
  85.                                         Sub-Products
  86.                                     {% endif %}
  87.                                 </a>
  88.                                 {% if app.user %}
  89.                                     <div class="dropdown-menu" aria-labelledby="navbarDropdown">
  90.                                         {% set products = Product.getProductSubAll %}
  91.                                         {% for product in products %}
  92.                                             {% if product.isActive==1 %}
  93.                                                 <a target="_blank" class="dropdown-item text-gray-600 ml-3"
  94.                                                    href="{{ path('product_display', { product: product.product}) }}">{{ product.product }}
  95.                                                 </a>
  96.                                             {% else %}
  97.                                                 {% if is_granted('ROLE_ADMIN') and product.isActive ==0 %}
  98.                                                     <a target="_blank" class="dropdown-item text-gray-600 ml-3"
  99.                                                        href="{{ path('product_display', { product: product.product}) }}">
  100.                                                         <span style="color: red">{{ product.product }}*</span>
  101.                                                     </a>
  102.                                                 {% endif %}
  103.                                             {% endif %}
  104.                                         {% endfor %}
  105.                                     </div>
  106.                                 {% else %}
  107.                                     <div class="dropdown-menu" aria-labelledby="navbarDropdown">
  108.                                         {% set products = Product.getProductSubAll %}
  109.                                         {% for product in products %}
  110.                                             {% if product.isActive==1 %}
  111.                                                 <a target="_blank" class="dropdown-item text-gray-600 ml-3"
  112.                                                    href="{{ path('product_display', { product: product.product}) }}">{{ product.product }}
  113.                                                 </a>
  114.                                             {% endif %}
  115.                                         {% endfor %}
  116.                                     </div>
  117.                                 {% endif %}
  118.                             </li>
  119.                         {% endif %}
  120.                     {% endif %}
  121.                     {% include 'template_parts_project_specific/header_project_specific1.html.twig' %}
  122.                     <!-- Nav Item #5 - Contact -->
  123.                     {% if CompanyDetails.getCompanyDetails is not null %}
  124.                         <li class="nav-item dropdown">
  125.                             <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button"
  126.                                data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
  127.                                 Contact
  128.                             </a>
  129.                             <div class="dropdown-menu" aria-labelledby="navbarDropdown">
  130.                                 {% if CompanyDetails.companyDetails.companyEmail is not null %}
  131.                                     <a title={{ CompanyDetails.companyDetails.companyEmail }} class="dropdown-item"
  132.                                        href="mailto:{{ CompanyDetails.companyDetails.companyEmail }}">
  133.                                         <span style="color: blue;">@</span> {{ CompanyDetails.companyDetails.companyEmail }}
  134.                                     </a>
  135.                                 {% endif %}
  136.                                 {% if CompanyDetails.companyDetails.companyTel is not null %}
  137.                                     <a class="dropdown-item" title="{{ CompanyDetails.companyDetails.companyTel }}"
  138.                                        href="https://wa.me/{{ CompanyDetails.companyDetails.companyTel | replace({' ': ''}) }}">
  139.                                         <i style="color: #0f6848"
  140.                                            class="fa fa-phone"></i> {{ CompanyDetails.companyDetails.companyTel }}
  141.                                     </a>
  142.                                 {% endif %}
  143.                                 {% if CompanyDetails.companyDetails.companyMobile is not null %}
  144.                                     <a class="dropdown-item" title="{{ CompanyDetails.companyDetails.companyMobile }}"
  145.                                        href="https://wa.me/{{ CompanyDetails.companyDetails.companyMobile | replace({' ': ''}) }}">
  146.                                         <i style="color: #0f6848"
  147.                                            class="fab fa-whatsapp"></i> {{ CompanyDetails.companyDetails.companyMobile }}
  148.                                     </a>
  149.                                 {% endif %}
  150.                                 {% if CompanyDetails.companyDetails.companySkype is not null %}
  151.                                     <a class="dropdown-item" title="{{ CompanyDetails.companyDetails.companySkype }}"
  152.                                        href="skype:{{ CompanyDetails.companyDetails.companySkype }}?call">
  153.                                         <i style="color: royalblue"
  154.                                            class="fab fa-skype"></i> {{ CompanyDetails.companyDetails.companySkype }}
  155.                                     </a>
  156.                                 {% endif %}
  157.                                 {% if app.user %}
  158.                                     {% if CompanyDetails.companyDetails.companyAddressStreet is not null %}
  159.                                         <a class="dropdown-item" target="_blank"
  160.                                            title="{{ CompanyDetails.companyDetails.companyAddressStreet }} "
  161.                                            href="{{ path('office_address') }}"> <i style="color: royalblue"
  162.                                                                                    class="fa fa-car"></i> {{ CompanyDetails.companyDetails.companyAddressStreet }}
  163.                                         </a>
  164.                                     {% endif %}
  165.                                 {% endif %}
  166.                                 <a class="dropdown-item" title="Contact details"
  167.                                    href="{{ path('create_vcard_company') }}">
  168.                                     <i class="fa fa-credit-card"></i> Business Card
  169.                                 </a>
  170.                             </div>
  171.                         </li>
  172.                     {% endif %}
  173.                     {% include 'template_parts_project_specific/header_project_specific2.html.twig' %}
  174.                     <!-- Nav Item #10 - Login -->
  175.                     {% if CompanyDetails.getCompanyDetails is not null and CompanyDetails.companyDetails.headerDisplayLogin ==1 %}
  176.                         {% if app.user %}
  177.                             <li class="nav-item dropdown">
  178.                                 <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button"
  179.                                    data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
  180.                                     {{ app.user.fullName }}
  181.                                     {% if is_granted('ROLE_SUPER_ADMIN') %}
  182.                                         <i title="Super-Admin" style="color: green" class="fa fa-hat-wizard"></i>
  183.                                     {% endif %}
  184.                                     {% if is_granted('ROLE_ADMIN') %}
  185.                                         <i title="Admin" style="color: orange" class="fa fa-user-tie"></i>
  186.                                     {% endif %}
  187.                                 </a>
  188.                                 {% include 'template_parts_project_specific/header_project_specific3.html.twig' %}
  189.                                 <div class="dropdown-menu" aria-labelledby="navbarDropdown">
  190.                                     <a class="dropdown-item"
  191.                                        href="{{ path('user_edit',{'fullName':app.user.fullName}) }}">Profile</a>
  192.                                     <a class="dropdown-item" href="{{ path('app_logout') }}">Logout</a>
  193.                                 </div>
  194.                             </li>
  195.                         {% else %}
  196.                             <li class="nav-item">
  197.                                 <a class="nav-link btn btn-outline-dark btn-sm" href="{{ path('app_login') }}">Login</a>
  198.                             </li>
  199.                         {% endif %}
  200.                     {% endif %}
  201.                     {% if CompanyDetails.getCompanyDetails is not null and CompanyDetails.companyDetails.multiLingual ==1 and Languages.getLanguages != null and Languages.LanguageSelected != null %}
  202.                         <li class="nav-item dropdown">
  203.                             <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button"
  204.                                data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
  205.                                 <img src="{{ asset('administration/attachments/LanguageIcons/'~Languages.LanguageSelected.icon) }}"
  206.                                      height="30" width=30">
  207.                             </a>
  208.                             <div class="dropdown-menu" aria-labelledby="navbarDropdown">
  209.                                 {% for language in Languages.getLanguages %}
  210.                                     {% if language.language != Languages.LanguageSelected.language %}
  211.                                         <a class="dropdown-item"
  212.                                            href="{{ path('select_default_language',{id:language.id}) }}">
  213.                                             <img src="{{ asset('administration/attachments/LanguageIcons/'~language.icon) }}"
  214.                                                  height="30" width=30">
  215.                                         </a>
  216.                                     {% endif %}
  217.                                 {% endfor %}
  218.                             </div>
  219.                         </li>
  220.                     {% endif %}
  221.                 </ul>
  222.             </div>
  223.         </div>
  224.     </nav>
  225.     <!-- Navigation -->
  226. </header>
  227. <!--End Header Section -->