<!--Start Header Section -->
<header id="top-header" class="clearfix">
<!-- Navigation -->
<nav class="navbar navbar-expand-lg navbar-light bg-gray-100 fixed-top shadow">
<div class="container-fluid">
<div class="logo">
{% if is_granted('ROLE_ADMIN') %}
<a target="_blank" href="{{ path('company_details_edit', {'id': '1'}) }}">
<i style="color: red" class="fa fa-pen"></i>
</a>
{% endif %}
<a class="navbar-brand" href="{{ path('app_home') }}">
{% if CompanyDetails.getCompanyDetails is not null %}
<a style="color: black" href="{{ path('app_home') }}">
{{ CompanyDetails.getCompanyDetails.companyName }}
</a>
{% endif %}
</a>
</div>
<button class=" navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent"
aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse main-menu navbar-collapse pr-5 mr-5 " id="navbarSupportedContent">
<ul class="navbar-nav ml-auto ">
<!-- Nav Item #1 - Home -->
<li class="nav-item active">
<a class="nav-link" href="{{ path('app_home') }}">
<i class="fa fa-home"></i>
</a>
</li>
{% if is_granted('ROLE_ADMIN') %}
<li class="nav-item">
<a class="nav-link" target="_blank" href="{{ path('dashboard') }}"><i
class="fa fa-chalkboard"></i></a>
</li>
{% if CountPendingWebsiteInquiries.countContacts >0 %}
<li class="nav-item active">
<a style="color: red" class="nav-link" target="_blank"
href="{{ path('website_contacts_index') }}">
<i title="Website inquiries awaiting a response" style="color: purple"
class="fa fa-user-secret"></i>
({{ CountPendingWebsiteInquiries.countContacts }})
</a>
</li>
{% endif %}
{% endif %}
<!-- Nav Item #2 - Products -->
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
{% if CompanyDetails.companyDetails is not null %}
{{ CompanyDetails.companyDetails.titleProducts }}
{% else %}
Products
{% endif %}
</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
{% set products = Product.getProductMainAll %}
{% for product in products %}
{% if product.isActive==1 %}
<a target="_blank" class="dropdown-item text-gray-600 ml-3"
href="{{ path('product_display', { product: product.product}) }}">{{ product.product }}
</a>
{% else %}
{% if is_granted('ROLE_ADMIN') and product.isActive ==0 %}
<a target="_blank" class="dropdown-item text-gray-600 ml-3"
href="{{ path('product_display', { product: product.product}) }}">
<span style="color: red">{{ product.product }}*</span>
</a>
{% endif %}
{% endif %}
{% endfor %}
</div>
</li>
{% if CompanyDetails.companyDetails is not null %}
{% if CompanyDetails.companyDetails.headerDisplaySubProducts ==1 %}
<!-- Nav Item #2 - Sub-Products -->
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
{% if CompanyDetails.companyDetails is not null %}
{{ CompanyDetails.companyDetails.titleSubProducts }}
{% else %}
Sub-Products
{% endif %}
</a>
{% if app.user %}
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
{% set products = Product.getProductSubAll %}
{% for product in products %}
{% if product.isActive==1 %}
<a target="_blank" class="dropdown-item text-gray-600 ml-3"
href="{{ path('product_display', { product: product.product}) }}">{{ product.product }}
</a>
{% else %}
{% if is_granted('ROLE_ADMIN') and product.isActive ==0 %}
<a target="_blank" class="dropdown-item text-gray-600 ml-3"
href="{{ path('product_display', { product: product.product}) }}">
<span style="color: red">{{ product.product }}*</span>
</a>
{% endif %}
{% endif %}
{% endfor %}
</div>
{% else %}
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
{% set products = Product.getProductSubAll %}
{% for product in products %}
{% if product.isActive==1 %}
<a target="_blank" class="dropdown-item text-gray-600 ml-3"
href="{{ path('product_display', { product: product.product}) }}">{{ product.product }}
</a>
{% endif %}
{% endfor %}
</div>
{% endif %}
</li>
{% endif %}
{% endif %}
{# {% include 'template_parts_project_specific/header_project_specific1.html.twig' %}#}
<!-- Nav Item #5 - Contact -->
{% if CompanyDetails.getCompanyDetails is not null %}
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Contact
</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
{% if CompanyDetails.companyDetails.companyEmail is not null %}
<a title={{ CompanyDetails.companyDetails.companyEmail }} class="dropdown-item"
href="mailto:{{ CompanyDetails.companyDetails.companyEmail }}">
<span style="color: blue;">@</span> {{ CompanyDetails.companyDetails.companyEmail }}
</a>
{% endif %}
{% if CompanyDetails.companyDetails.companyTel is not null %}
<a class="dropdown-item" title="{{ CompanyDetails.companyDetails.companyTel }}"
href="https://wa.me/{{ CompanyDetails.companyDetails.companyTel | replace({' ': ''}) }}">
<i style="color: #0f6848"
class="fa fa-phone"></i> {{ CompanyDetails.companyDetails.companyTel }}
</a>
{% endif %}
{% if CompanyDetails.companyDetails.companyMobile is not null %}
<a class="dropdown-item" title="{{ CompanyDetails.companyDetails.companyMobile }}"
href="https://wa.me/{{ CompanyDetails.companyDetails.companyMobile | replace({' ': ''}) }}">
<i style="color: #0f6848"
class="fab fa-whatsapp"></i> {{ CompanyDetails.companyDetails.companyMobile }}
</a>
{% endif %}
{% if CompanyDetails.companyDetails.companySkype is not null %}
<a class="dropdown-item" title="{{ CompanyDetails.companyDetails.companySkype }}"
href="skype:{{ CompanyDetails.companyDetails.companySkype }}?call">
<i style="color: royalblue"
class="fab fa-skype"></i> {{ CompanyDetails.companyDetails.companySkype }}
</a>
{% endif %}
{% if app.user %}
{% if CompanyDetails.companyDetails.companyAddressStreet is not null %}
<a class="dropdown-item" target="_blank"
title="{{ CompanyDetails.companyDetails.companyAddressStreet }} "
href="{{ path('office_address') }}"> <i style="color: royalblue"
class="fa fa-car"></i> {{ CompanyDetails.companyDetails.companyAddressStreet }}
</a>
{% endif %}
{% endif %}
<a class="dropdown-item" title="Contact details"
href="{{ path('create_vcard_company') }}">
<i class="fa fa-credit-card"></i> Business Card
</a>
</div>
</li>
{% endif %}
{% include 'template_parts_project_specific/header_project_specific2.html.twig' %}
<!-- Nav Item #10 - Login -->
{% if CompanyDetails.getCompanyDetails is not null and CompanyDetails.companyDetails.headerDisplayLogin ==1 %}
{% if app.user %}
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
{{ app.user.fullName }}
{% if is_granted('ROLE_SUPER_ADMIN') %}
<i title="Super-Admin" style="color: green" class="fa fa-hat-wizard"></i>
{% endif %}
{% if is_granted('ROLE_ADMIN') %}
<i title="Admin" style="color: orange" class="fa fa-user-tie"></i>
{% endif %}
</a>
{% include 'template_parts_project_specific/header_project_specific3.html.twig' %}
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
<a class="dropdown-item"
href="{{ path('user_edit',{'fullName':app.user.fullName}) }}">Profile</a>
<a class="dropdown-item" href="{{ path('app_logout') }}">Logout</a>
</div>
</li>
{% else %}
<li class="nav-item">
<a class="nav-link btn btn-outline-dark btn-sm" href="{{ path('app_login') }}">Login</a>
</li>
{% endif %}
{% endif %}
{% if CompanyDetails.getCompanyDetails is not null and CompanyDetails.companyDetails.multiLingual ==1 and Languages.getLanguages != null and Languages.LanguageSelected != null %}
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<img src="{{ asset('administration/attachments/LanguageIcons/'~Languages.LanguageSelected.icon) }}"
height="30" width=30">
</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
{% for language in Languages.getLanguages %}
{% if language.language != Languages.LanguageSelected.language %}
<a class="dropdown-item"
href="{{ path('select_default_language',{id:language.id}) }}">
<img src="{{ asset('administration/attachments/LanguageIcons/'~language.icon) }}"
height="30" width=30">
</a>
{% endif %}
{% endfor %}
</div>
</li>
{% endif %}
</ul>
</div>
</div>
</nav>
<!-- Navigation -->
</header>
<!--End Header Section -->