templates/template_parts/header.html.twig line 1
<!--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"><!-- Nav Item #1 - Home --><a class="navbar-brand" href="{{ path('app_home') }}">{% if CompanyDetailsService.getCompanyDetails is not null %}<a style="color: black" href="{{ path('app_home') }}"><i class="fa fa-home"></i><span> </span> {{ CompanyDetailsService.getCompanyDetails.companyName }}</a>{% endif %}</a><!-- Nav Item #1 - Company Details Edit -->{% if is_granted('ROLE_ADMIN') %}{% if CompanyDetailsService.getCompanyDetails is not null %}<a target="_blank" href="{{ path('company_details_edit', {'id': '1'}) }}"><i style="color: red" class="fa fa-pen"></i></a><a target="_blank" href="{{ path('company_details_show', {'id': '1'}) }}"><i style="color: red" class="fa fa-eye"></i></a>{% else %}<a target="_blank" href="{{ path('company_details_new') }}"><i style="color: blue" class="fa fa-pen"></i></a>{% endif %}{% endif %}</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 #2 - Dashboard -->{% if is_granted('ROLE_ADMIN') %}<li class="nav-item"><a class="nav-link" target="_blank" href="{{ path('dashboard') }}"><iclass="fa fa-tachometer-alt"></i></a></li>{% if CountPendingWebsiteInquiriesService.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>({{ CountPendingWebsiteInquiriesService.countContacts }})</a></li>{% endif %}{% endif %}<!-- Nav Item #3 - Products -->{% if CompanyDetailsService.companyDetails is not null %}{% if CompanyDetailsService.companyDetails.headerDisplayProducts ==1 %}<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 CompanyDetailsService.companyDetails.titleProducts is not null %}{{ CompanyDetailsService.companyDetails.titleProducts }}{% else %}Products{% endif %}</a><div class="dropdown-menu" aria-labelledby="navbarDropdown">{% set products = ProductService.getProductMainAll %}{% for product in products %}{% if product.isActive==1 %}<a class="dropdown-item" title="{{ product.notes|striptags }}"href="{{ path('product_display', { product: product.product}) }}">{{ product.product }}</a>{% else %}{% if is_granted('ROLE_ADMIN') and product.isActive ==0 %}<a class="dropdown-item" title="{{ product.notes|striptags }}"href="{{ path('product_display', { product: product.product}) }}"><span style="color: red">{{ product.product }}*</span></a>{% endif %}{% endif %}{% endfor %}</div></li>{% endif %}{% endif %}<!-- Nav Item #4 - SubProducts -->{% if CompanyDetailsService.companyDetails is not null %}{% if CompanyDetailsService.companyDetails.headerDisplaySubProducts ==1 %}<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 CompanyDetailsService.companyDetails is not null %}{{ CompanyDetailsService.companyDetails.titleSubProducts }}{% else %}Sub-Products{% endif %}</a>{% if app.user %}<div class="dropdown-menu" aria-labelledby="navbarDropdown">{% set products = ProductService.getProductSubAll %}{% for product in products %}{% if product.isActive==1 %}<a class="dropdown-item" title="{{ product.notes|striptags }}"href="{{ path('product_display', { product: product.product}) }}">{{ product.product }}</a>{% else %}{% if is_granted('ROLE_ADMIN') and product.isActive ==0 %}<a class="dropdown-item" title="{{ product.notes|striptags }}"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 = ProductService.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 %}{% set countPublic = CountPhotoLocationsService.countPublic() %}{% set countPrivate = CountPhotoLocationsService.countPrivate(app.user) %}{% set countTotal = countPublic + countPrivate %}{% set countPublicAndPrivate = CountPhotoLocationsService.countPublicAndPrivate(app.user) %}{# Public Locations: {{ countPublic }}<br>#}{# Private Locations: {{ countPrivate }}<br>#}{# All Locations:{{ countTotal}}:: {{ countPublicAndPrivate['public_count'] }} (Public) / {{ countPrivate }} (Private)#}<!-- Nav Item #5 - Photos -->{% if CompanyDetailsService.companyDetails is not null and CompanyDetailsService.companyDetails.headerDisplayPhotos ==1 %}{% if is_granted('ROLE_ADMIN') and countTotal >1 %}<li class="nav-item"><a class="dropdown-item nav-link" href="{{ path('photos_index') }}"id="navbarDropdown" role="button"aria-haspopup="true" aria-expanded="false">Photo Gallery*</a></li>{% else %}{% if app.user %}{% if CountPhotoLocationsService.countPublicAndPrivate(app.user) >1 %}<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">Photos</a><div class="dropdown-menu" aria-labelledby="navbarDropdown">{% for location in CountPhotoLocationsService.listPublicLocations() %}{% if CompanyDetailsService.companyDetails.photoLocationsSort == 'Location' %}<a target="_blank" class="dropdown-item"href="{{ path('show_photos_by_location', { id: location.id, author: 'All', format: 'Full' }) }}">{{ location.location }} - {{ location.date|date('M-Y') }}({{ CountPhotosService.calculateTotalPhotos(location) }})</a>{% else %}<a target="_blank" class="dropdown-item"href="{{ path('show_photos_by_location', { id: location.id, author: 'All', format: 'Full' }) }}">{{ location.date|date('M-Y') }} - {{ location.location }}({{ CountPhotosService.calculateTotalPhotos(location) }})</a>{% endif %}{% endfor %}{% for location in CountPhotoLocationsService.listPrivateLocations() %}{% if app.user.id in location.enabledUsers or (is_granted('ROLE_ADMIN')) %}{% if CompanyDetailsService.companyDetails.photoLocationsSort == 'Location' %}<a style="color: red" target="_blank" class="dropdown-item"href="{{ path('show_photos_by_location', { id: location.id, author: 'All', format: 'Full' }) }}">{{ location.location }}- {{ location.date|date('M-Y') }}({{ CountPhotosService.calculateTotalPhotos(location) }})</a>{% else %}<a style="color: red" target="_blank" class="dropdown-item"href="{{ path('show_photos_by_location', { id: location.id, author: 'All', format: 'Full' }) }}">{{ location.date|date('M-Y') }}- {{ location.location }}({{ CountPhotosService.calculateTotalPhotos(location) }})</a>{% endif %}{% endif %}{% endfor %}</div></li>{% else %}<li class="nav-link"><a class="dropdown-item"href="{{ path('show_photos_by_location', { id: CountPhotoLocationsService.maxId(), author: 'All', format: 'Full' }) }}">Gallery</a></li>{% endif %}{% else %}{% if CountPhotoLocationsService.countPublic() >1 %}<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">Photos</a><div class="dropdown-menu" aria-labelledby="navbarDropdown">{% for location in CountPhotoLocationsService.listPublicLocations() %}{% if CompanyDetailsService.companyDetails.photoLocationsSort == 'Location' %}<a target="_blank" class="dropdown-item"href="{{ path('show_photos_by_location', { id: location.id, author: 'All', format: 'Full' }) }}">{{ location.location }} - {{ location.date|date('M-Y') }}({{ CountPhotosService.calculateTotalPhotos(location) }})</a>{% else %}<a target="_blank" class="dropdown-item"href="{{ path('show_photos_by_location', { id: location.id, author: 'All', format: 'Full' }) }}">{{ location.date|date('M-Y') }} - {{ location.location }}({{ CountPhotosService.calculateTotalPhotos(location) }})</a>{% endif %}{% endfor %}</div></li>{% else %}<li class="nav-link"><a class="dropdown-item"href="{{ path('show_photos_by_location', { id: CountPhotoLocationsService.maxId(), author: 'All', format: 'Full' }) }}">Gallery</a></li>{% endif %}{% endif %}{% endif %}{% endif %}<!-- Nav Item #6 - Useful Contacts/ Weather -->{% if CompanyDetailsService.companyDetails is not null %}{% if CompanyDetailsService.companyDetails.headerDisplayBusinessContacts ==1or CompanyDetailsService.companyDetails.headerDisplayWeather ==1 %}<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 CompanyDetailsService.companyDetails.titleUsefulLinks is not null %}{{ CompanyDetailsService.companyDetails.titleUsefulLinks }}{% else %}Useful Links{% endif %}</a><div class="dropdown-menu" aria-labelledby="navbarDropdown">{% if is_granted('ROLE_ADMIN') %}<a style="color: red" class="dropdown-item"href="{{ path('useful_links_index', {'category':'All'}) }}">Links</a><a style="color: red" class="dropdown-item"href="{{ path('file_attachments_index') }}">Files</a><hr>{% endif %}{% include 'template_parts_project_specific/header_project_specific1.html.twig' %}{% if CompanyDetailsService.companyDetails.headerDisplayBusinessContacts ==1 %}<a style="color: black" class="dropdown-item"href="{{ path('business_contacts_index') }}">Usefulcontacts</a>{% endif %}{% if CompanyDetailsService.companyDetails.headerDisplayWeather ==1 %}<a style="color: black" class="dropdown-item"href="{{ path('weather_index') }}">Weather</a>{% endif %}</div></li>{% endif %}{% endif %}<!-- Nav Item #6 - Contact -->{% if CompanyDetailsService.getCompanyDetails is not null %}{% if CompanyDetailsService.companyDetails.headerDisplayContactDetails ==1 %}<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 CompanyDetailsService.companyDetails.companyQrCode is not null %}<a class="dropdown-item" target="_blank"href="{{ path('company_qr_code') }}"><iclass="fa fa-qrcode"></i> QR code</a>{% endif %}{% if CompanyDetailsService.companyDetails.companyEmail is not null %}<a title={{ CompanyDetailsService.companyDetails.companyEmail }} class="dropdown-item"href="mailto:{{ CompanyDetailsService.companyDetails.companyEmail }}"><span style="color: blue">@</span> {{ CompanyDetailsService.companyDetails.companyEmail }}</a>{% endif %}{% if CompanyDetailsService.companyDetails.companyTel is not null and CompanyDetailsService.companyDetails.headerDisplayTelNumbers ==1 %}<a class="dropdown-item"title="{{ CompanyDetailsService.companyDetails.companyTel }}"href="https://wa.me/{{ CompanyDetailsService.companyDetails.companyTel | replace({' ': ''}) }}"><i style="color: #0f6848"class="fa fa-phone"></i> {{ CompanyDetailsService.companyDetails.companyTel }}</a>{% endif %}{% if CompanyDetailsService.companyDetails.companyMobile is not null and CompanyDetailsService.companyDetails.headerDisplayTelNumbers ==1 %}<a class="dropdown-item"title="{{ CompanyDetailsService.companyDetails.companyMobile }}"href="https://wa.me/{{ CompanyDetailsService.companyDetails.companyMobile | replace({' ': ''}) }}"><i style="color: #0f6848"class="fab fa-whatsapp"></i> {{ CompanyDetailsService.companyDetails.companyMobile }}</a>{% endif %}{% if app.user %}{% if CompanyDetailsService.companyDetails.companyAddressStreet is not null and CompanyDetailsService.companyDetails.headerDisplayAddress ==1 %}<a class="dropdown-item" target="_blank"title="{{ CompanyDetailsService.companyDetails.companyAddressStreet }} "href="{{ path('office_address') }}"><i style="color: royalblue"class="fa fa-car"></i> {{ CompanyDetailsService.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 %}{% endif %}{% include 'template_parts_project_specific/header_project_specific2.html.twig' %}<!-- Nav Item #8 - Login -->{% if CompanyDetailsService.getCompanyDetails is not null and (CompanyDetailsService.companyDetails.headerDisplayLogin ==1 or app.user is not null) %}{% 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-cog"></i>{% endif %}{% include 'template_parts_project_specific/header_project_specific3.html.twig' %}</a><div class="dropdown-menu" aria-labelledby="navbarDropdown"><a class="dropdown-item"href="{{ path('user_edit',{'id':app.user.id}) }}">Profile</a><a class="dropdown-item" href="{{ path('app_logout') }}">Logout</a>{% include 'template_parts_project_specific/user_profile_project_specific.html.twig' %}</div></li>{% else %}<li class="nav-item"><a class="btn btn-outline-dark btn-sm nav-link"href="{{ path('app_login') }}">Login</a></li>{% endif %}{% endif %}{% if CompanyDetailsService.getCompanyDetails is not null andCompanyDetailsService.companyDetails.multiLingual == 1 andLanguagesService.getLanguages is not null andLanguagesService.getLanguageSelected 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"><img src="{{ asset('administration/ATSSharedFiles/LanguageIcons/' ~ LanguagesService.getLanguageSelected.icon) }}"height="30" width="30"></a><div class="dropdown-menu" aria-labelledby="navbarDropdown">{% set selected = LanguagesService.getLanguageSelected %}{% for language in LanguagesService.getLanguagesByRankingOrder %}{% if language.language != selected.language %}<a class="dropdown-item"href="{{ path('select_default_language', {id: language.id}) }}"><img src="{{ asset('administration/ATSSharedFiles/LanguageIcons/' ~ language.icon) }}"height="30" width="30"></a>{% endif %}{% endfor %}</div></li>{% endif %}</ul></div></div></nav><!-- Navigation --></header><!--End Header Section -->