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.                     <!-- Nav Item #2 - Dashboard -->
  33.                     {% if is_granted('ROLE_ADMIN') %}
  34.                         <li class="nav-item">
  35.                             <a class="nav-link" target="_blank" href="{{ path('dashboard') }}"><i
  36.                                         class="fa fa-chalkboard"></i></a>
  37.                         </li>
  38.                         {% if CountPendingWebsiteInquiries.countContacts >0 %}
  39.                             <li class="nav-item active">
  40.                                 <a style="color: red" class="nav-link" target="_blank"
  41.                                    href="{{ path('website_contacts_index') }}">
  42.                                     <i title="Website inquiries awaiting a response" style="color: purple"
  43.                                        class="fa fa-user-secret"></i>
  44.                                     ({{ CountPendingWebsiteInquiries.countContacts }})
  45.                                 </a>
  46.                             </li>
  47.                         {% endif %}
  48.                     {% endif %}
  49.                     <!-- Nav Item #3 - Products -->
  50.                     <li class="nav-item dropdown">
  51.                         <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button"
  52.                            data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
  53.                             {% if CompanyDetails.companyDetails is not null %}
  54.                                 {{ CompanyDetails.companyDetails.titleProducts }}
  55.                             {% else %}
  56.                                 Products
  57.                             {% endif %}
  58.                         </a>
  59.                         <div class="dropdown-menu" aria-labelledby="navbarDropdown">
  60.                             {% set products = Product.getProductMainAll %}
  61.                             {% for product in products %}
  62.                                 {% if product.isActive==1 %}
  63.                                     <a target="_blank" class="dropdown-item text-gray-600 ml-3"
  64.                                        href="{{ path('product_display', { product: product.product}) }}">{{ product.product }}
  65.                                     </a>
  66.                                 {% else %}
  67.                                     {% if is_granted('ROLE_ADMIN') and product.isActive ==0 %}
  68.                                         <a target="_blank" class="dropdown-item text-gray-600 ml-3"
  69.                                            href="{{ path('product_display', { product: product.product}) }}">
  70.                                             <span style="color: red">{{ product.product }}*</span>
  71.                                         </a>
  72.                                     {% endif %}
  73.                                 {% endif %}
  74.                             {% endfor %}
  75.                         </div>
  76.                     </li>
  77.                     <!-- Nav Item #4 - SubProducts -->
  78.                     {% if CompanyDetails.companyDetails is not null %}
  79.                         {% if CompanyDetails.companyDetails.headerDisplaySubProducts ==1 %}
  80.                             <li class="nav-item dropdown">
  81.                                 <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button"
  82.                                    data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
  83.                                     {% if CompanyDetails.companyDetails is not null %}
  84.                                         {{ CompanyDetails.companyDetails.titleSubProducts }}
  85.                                     {% else %}
  86.                                         Sub-Products
  87.                                     {% endif %}
  88.                                 </a>
  89.                                 {% if app.user %}
  90.                                     <div class="dropdown-menu" aria-labelledby="navbarDropdown">
  91.                                         {% set products = Product.getProductSubAll %}
  92.                                         {% for product in products %}
  93.                                             {% if product.isActive==1 %}
  94.                                                 <a target="_blank" class="dropdown-item text-gray-600 ml-3"
  95.                                                    href="{{ path('product_display', { product: product.product}) }}">{{ product.product }}
  96.                                                 </a>
  97.                                             {% else %}
  98.                                                 {% if is_granted('ROLE_ADMIN') and product.isActive ==0 %}
  99.                                                     <a target="_blank" class="dropdown-item text-gray-600 ml-3"
  100.                                                        href="{{ path('product_display', { product: product.product}) }}">
  101.                                                         <span style="color: red">{{ product.product }}*</span>
  102.                                                     </a>
  103.                                                 {% endif %}
  104.                                             {% endif %}
  105.                                         {% endfor %}
  106.                                     </div>
  107.                                 {% else %}
  108.                                     <div class="dropdown-menu" aria-labelledby="navbarDropdown">
  109.                                         {% set products = Product.getProductSubAll %}
  110.                                         {% for product in products %}
  111.                                             {% if product.isActive==1 %}
  112.                                                 <a target="_blank" class="dropdown-item text-gray-600 ml-3"
  113.                                                    href="{{ path('product_display', { product: product.product}) }}">{{ product.product }}
  114.                                                 </a>
  115.                                             {% endif %}
  116.                                         {% endfor %}
  117.                                     </div>
  118.                                 {% endif %}
  119.                             </li>
  120.                         {% endif %}
  121.                     {% endif %}
  122.                     <!-- Nav Item #5 - Useful Contacts And Weather -->
  123.                     {% if CompanyDetails.companyDetails is not null %}
  124.                         {% if CompanyDetails.companyDetails.headerDisplayBusinessContacts ==1
  125.                             or CompanyDetails.companyDetails.headerDisplayWeather ==1 %}
  126.                             <li class="nav-item dropdown">
  127.                                 <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button"
  128.                                    data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
  129.                                     Useful links
  130.                                 </a>
  131.                                 <div class="dropdown-menu" aria-labelledby="navbarDropdown">
  132.                                     {% if CompanyDetails.companyDetails.headerDisplayBusinessContacts ==1 %}
  133.                                         <a target="_blank" class="dropdown-item text-gray-600 ml-3"
  134.                                            href="{{ path('business_contacts_index') }}">Useful contacts
  135.                                         </a>
  136.                                     {% endif %}
  137.                                     {% if  CompanyDetails.companyDetails.headerDisplayWeather ==1 %}
  138.                                     <a target="_blank" class="dropdown-item text-gray-600 ml-3"
  139.                                        href="{{ path('weather_index') }}">Weather
  140.                                     </a>
  141.                                 </div>
  142.                                 {% endif %}
  143.                             </li>
  144.                         {% endif %}
  145.                     {% endif %}
  146.                     {% include 'template_parts_project_specific/header_project_specific1.html.twig' %}
  147.                     <!-- Nav Item #6 - Contact -->
  148.                     {% if CompanyDetails.getCompanyDetails is not null %}
  149.                         {% if CompanyDetails.companyDetails.headerDisplayContactDetails ==1 %}
  150.                             <li class="nav-item dropdown">
  151.                                 <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button"
  152.                                    data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
  153.                                     Contact
  154.                                 </a>
  155.                                 <div class="dropdown-menu" aria-labelledby="navbarDropdown">
  156.                                     {% if CompanyDetails.companyDetails.companyEmail is not null %}
  157.                                         <a title={{ CompanyDetails.companyDetails.companyEmail }} class="dropdown-item"
  158.                                            href="mailto:{{ CompanyDetails.companyDetails.companyEmail }}">
  159.                                             <span style="color: blue;">@</span> {{ CompanyDetails.companyDetails.companyEmail }}
  160.                                         </a>
  161.                                     {% endif %}
  162.                                     {% if CompanyDetails.companyDetails.companyTel is not null %}
  163.                                         <a class="dropdown-item" title="{{ CompanyDetails.companyDetails.companyTel }}"
  164.                                            href="https://wa.me/{{ CompanyDetails.companyDetails.companyTel | replace({' ': ''}) }}">
  165.                                             <i style="color: #0f6848"
  166.                                                class="fa fa-phone"></i> {{ CompanyDetails.companyDetails.companyTel }}
  167.                                         </a>
  168.                                     {% endif %}
  169.                                     {% if CompanyDetails.companyDetails.companyMobile is not null %}
  170.                                         <a class="dropdown-item"
  171.                                            title="{{ CompanyDetails.companyDetails.companyMobile }}"
  172.                                            href="https://wa.me/{{ CompanyDetails.companyDetails.companyMobile | replace({' ': ''}) }}">
  173.                                             <i style="color: #0f6848"
  174.                                                class="fab fa-whatsapp"></i> {{ CompanyDetails.companyDetails.companyMobile }}
  175.                                         </a>
  176.                                     {% endif %}
  177.                                     {% if CompanyDetails.companyDetails.companySkype is not null %}
  178.                                         <a class="dropdown-item"
  179.                                            title="{{ CompanyDetails.companyDetails.companySkype }}"
  180.                                            href="skype:{{ CompanyDetails.companyDetails.companySkype }}?call">
  181.                                             <i style="color: royalblue"
  182.                                                class="fab fa-skype"></i> {{ CompanyDetails.companyDetails.companySkype }}
  183.                                         </a>
  184.                                     {% endif %}
  185.                                     {% if app.user %}
  186.                                         {% if CompanyDetails.companyDetails.companyAddressStreet is not null %}
  187.                                             <a class="dropdown-item" target="_blank"
  188.                                                title="{{ CompanyDetails.companyDetails.companyAddressStreet }} "
  189.                                                href="{{ path('office_address') }}"> <i style="color: royalblue"
  190.                                                                                        class="fa fa-car"></i> {{ CompanyDetails.companyDetails.companyAddressStreet }}
  191.                                             </a>
  192.                                         {% endif %}
  193.                                     {% endif %}
  194.                                     <a class="dropdown-item" title="Contact details"
  195.                                        href="{{ path('create_vcard_company') }}">
  196.                                         <i class="fa fa-credit-card"></i> Business Card
  197.                                     </a>
  198.                                 </div>
  199.                             </li>
  200.                         {% endif %}
  201.                     {% endif %}
  202.                     {% include 'template_parts_project_specific/header_project_specific2.html.twig' %}
  203.                     <!-- Nav Item #7 - Login -->
  204.                     {% if CompanyDetails.getCompanyDetails is not null and CompanyDetails.companyDetails.headerDisplayLogin ==1 %}
  205.                         {% if app.user %}
  206.                             <li class="nav-item dropdown">
  207.                                 <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button"
  208.                                    data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
  209.                                     {{ app.user.fullName }}
  210.                                     {% if is_granted('ROLE_SUPER_ADMIN') %}
  211.                                         <i title="Super-Admin" style="color: green" class="fa fa-hat-wizard"></i>
  212.                                     {% endif %}
  213.                                     {% if is_granted('ROLE_ADMIN') %}
  214.                                         <i title="Admin" style="color: orange" class="fa fa-user-tie"></i>
  215.                                     {% endif %}
  216.                                 </a>
  217.                                 {% include 'template_parts_project_specific/header_project_specific3.html.twig' %}
  218.                                 <div class="dropdown-menu" aria-labelledby="navbarDropdown">
  219.                                     <a class="dropdown-item"
  220.                                        href="{{ path('user_edit',{'fullName':app.user.fullName}) }}">Profile</a>
  221.                                     <a class="dropdown-item" href="{{ path('app_logout') }}">Logout</a>
  222.                                 </div>
  223.                             </li>
  224.                         {% else %}
  225.                             <li class="nav-item">
  226.                                 <a class="nav-link btn btn-outline-dark btn-sm" href="{{ path('app_login') }}">Login</a>
  227.                             </li>
  228.                         {% endif %}
  229.                     {% endif %}
  230.                     {% if CompanyDetails.getCompanyDetails is not null and
  231.                         CompanyDetails.companyDetails.multiLingual ==1 and
  232.                         Languages.getLanguages != null and Languages.LanguageSelected != null %}
  233.                         <li class="nav-item dropdown">
  234.                             <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button"
  235.                                data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
  236.                                 <img src="{{ asset('administration/attachments/LanguageIcons/'~Languages.LanguageSelected.icon) }}"
  237.                                      height="30" width=30">
  238.                             </a>
  239.                             <div class="dropdown-menu" aria-labelledby="navbarDropdown">
  240.                                 {% for language in Languages.getLanguagesByRankingOrder %}
  241.                                     {% if language.language != Languages.LanguageSelected.language %}
  242.                                         <a class="dropdown-item"
  243.                                            href="{{ path('select_default_language',{id:language.id}) }}">
  244.                                             <img src="{{ asset('administration/attachments/LanguageIcons/'~language.icon) }}"
  245.                                                  height="30" width=30">
  246.                                         </a>
  247.                                     {% endif %}
  248.                                 {% endfor %}
  249.                             </div>
  250.                         </li>
  251.                     {% endif %}
  252.                 </ul>
  253.             </div>
  254.         </div>
  255.     </nav>
  256.     <!-- Navigation -->
  257. </header>
  258. <!--End Header Section -->