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-bs-toggle="collapse" data-bs-target="#navbarSupportedContent"aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation"><span class="navbar-toggler-icon"></span></button><div class="collapse navbar-collapse main-menu pr-5 mr-5" id="navbarSupportedContent"><ul class="navbar-nav ml-auto "><!-- Nav Item #2 - Dashboard -->{% if is_granted('ROLE_ADMIN') %}<style>/* Hide mobile text by default */.text-mobile {display: none;}/* Show mobile text only on small screens */@media (max-width: 767px) {.text-mobile {display: inline !important;}}</style><li class="nav-item"><a class="nav-link" target="_blank" href="{{ path('dashboard') }}"><i title="Dashboard" style="color: green" class="fa fa-tachometer-alt"></i><span class="text-mobile">Dashboard</span></a></li><li class="nav-item"><a class="nav-link" target="_blank" href="{{ path('advanced_dashboard') }}"><i title="Advanced Dashboard" style="color: red" class="fa fa-tachometer-alt"></i><span class="text-mobile">Advanced Dashboard</span></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-bs-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 and CountCMSCopyPhotoService.countCMSCopy(product) >0 %}<a class="dropdown-item" title="{{ product.notes|striptags }}"href="{{ path('product_display', { product: product.product}) }}"><i style="color: {{ product.menuIconColour }}"class="mr-2 {{ product.menuIcon }}"></i>{{ product.product }}</a>{% elseif product.isActive==1 and CountCMSCopyPhotoService.countCMSCopy(product) ==0 %}{% if is_granted('ROLE_ADMIN') %}<a class="dropdown-item" title="{{ product.notes|striptags }}"href="{{ path('product_display', { product: product.product}) }}"><i style="color: {{ product.menuIconColour }}"class="mr-2 {{ product.menuIcon }}"></i><span style="color: red"> {{ product.product }}* (No CMS) </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-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">{% if CompanyDetailsService.companyDetails.titleSubProducts is not null %}{{ CompanyDetailsService.companyDetails.titleSubProducts }}{% else %}Sub-Products{% endif %}</a><div class="dropdown-menu" aria-labelledby="navbarDropdown">{% set products = ProductService.getProductSubAll %}{% for product in products %}{% if product.isActive==1 and CountCMSCopyPhotoService.countCMSCopy(product) >0 %}<a class="dropdown-item" title="{{ product.notes|striptags }}"href="{{ path('product_display', { product: product.product}) }}"><i style="color: {{ product.menuIconColour }}"class="mr-2 {{ product.menuIcon }}"></i>{{ product.product }}</a>{% elseif product.isActive==1 and CountCMSCopyPhotoService.countCMSCopy(product) ==0 %}{% if is_granted('ROLE_ADMIN') %}<a class="dropdown-item" title="{{ product.notes|striptags }}"href="{{ path('product_display', { product: product.product}) }}"><i style="color: {{ product.menuIconColour }}"class="mr-2 {{ product.menuIcon }}"></i><span style="color: red"> {{ product.product }}* (No CMS) </span></a>{% endif %}{% endif %}{% endfor %}</div></li>{% endif %}{% endif %}<!-- Nav Item #5 - Photos -->{% set user = app.user %}{% set userIsValid = user is not null and user.id is defined %}{% set isAdmin = userIsValid and is_granted('ROLE_ADMIN') %}{% set company = CompanyDetailsService.companyDetails %}{% set photoSort = company.photoLocationsSort ?? 'Date' %}{% if userIsValid %}{% set visibleLocations = CountPhotoLocationsService.listVisibleLocations(user) %}{% else %}{% set visibleLocations = CountPhotoLocationsService.listPublicLocations() %}{% endif %}{% set countVisibleVenues = visibleLocations|length %}{% set singleLocation = countVisibleVenues == 1 ? visibleLocations[0] : null %}{% if company is not null and company.headerDisplayPhotos == 1 %}{% if isAdmin %}<li class="nav-item"><a class="nav-link" href="{{ path('photos_index') }}">Photos</a></li>{% elseif countVisibleVenues > 1 %}<li class="nav-item dropdown"><a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button"data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Photos</a><div class="dropdown-menu" aria-labelledby="navbarDropdown">{# Public Locations #}{% for location in CountPhotoLocationsService.listPublicLocations() %}<a target="_blank" class="dropdown-item"href="{{ path('show_photos_by_location', { id: location.id, author: 'All', format: 'Full' }) }}">{{ photoSort == 'Location'? location.location ~ ' - ' ~ location.date|date('M-Y'): location.date|date('M-Y') ~ ' - ' ~ location.location }}({{ CountPhotosService.calculateTotalPhotos(location) }})</a>{% endfor %}{# Private Locations if allowed #}{% for location in CountPhotoLocationsService.listPrivateLocations() %}{% if user and (user.id in location.enabledUsers) %}<a style="color: red" target="_blank" class="dropdown-item"href="{{ path('show_photos_by_location', { id: location.id, author: 'All', format: 'Full' }) }}">{{ photoSort == 'Location'? location.location ~ ' - ' ~ location.date|date('M-Y'): location.date|date('M-Y') ~ ' - ' ~ location.location }}({{ CountPhotosService.calculateTotalPhotos(location) }})</a>{% endif %}{% endfor %}</div></li>{% elseif singleLocation is not null %}{# Exactly one visible location for non-admins — direct link with "Photos" label #}<li class="nav-item"><a class="dropdown-item nav-link"href="{{ path('show_photos_by_location', { id: singleLocation.id, author: 'All', format: 'Full' }) }}">Photos</a></li>{% endif %}{% endif %}<!-- Nav Item #6 - Useful Contacts/ Weather -->{% if CompanyDetailsService.companyDetails is not null and CompanyDetailsService.companyDetails.headerDisplayUsefulLinks ==1 %}{% 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-bs-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 class="dropdown-item"href="{{ path('useful_links_index', {'category':'All'}) }}"><i style="color: blue" class="mr-2 fa fa-link"></i>Links</a><a class="dropdown-item"href="{{ path('file_attachments_index') }}"><i style="color: red" class="mr-2 fa fa-file-pdf-o"></i>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') }}"><i style="color: purple" class="mr-2 fa fa-user-friends"></i>Useful Contacts</a></a>{% endif %}{% if CompanyDetailsService.companyDetails.headerDisplayWeather ==1 %}<a style="color: black" class="dropdown-item"href="{{ path('weather_index') }}"><i style="color: orange" class="mr-2 fa fa-cloud-rain"></i>Weather</a></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-bs-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') }}"><i style="color: orange" class="mr-2 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 }}"><i style="color: blue" class="mr-2 fa fa-envelope"></i>{{ CompanyDetailsService.companyDetails.companyEmail }}</a>{% endif %}{% if CompanyDetailsService.companyDetails.companyTel is not null and CompanyDetailsService.companyDetails.contactDetailsDisplayTelNumbers ==1 %}<a class="dropdown-item"title="{{ CompanyDetailsService.companyDetails.companyTel }}"href="https://wa.me/{{ CompanyDetailsService.companyDetails.companyTel | replace({' ': ''}) }}"><i style="color: #0f6848"class="mr-2 fa fa-phone"></i> {{ CompanyDetailsService.companyDetails.companyTel }}</a>{% endif %}{% if CompanyDetailsService.companyDetails.companyMobile is not null and CompanyDetailsService.companyDetails.contactDetailsDisplayTelNumbers ==1 %}<a class="dropdown-item"title="{{ CompanyDetailsService.companyDetails.companyMobile }}"href="https://wa.me/{{ CompanyDetailsService.companyDetails.companyMobile | replace({' ': ''}) }}"><i style="color: green"class="mr-2 fab fa-whatsapp"></i> {{ CompanyDetailsService.companyDetails.companyMobile }}</a>{% endif %}{% if app.user %}{% if CompanyDetailsService.companyDetails.companyAddressStreet is not null and CompanyDetailsService.companyDetails.contactDetailsDisplayAddress ==1 %}<a class="dropdown-item" target="_blank"title="{{ CompanyDetailsService.companyDetails.companyAddressStreet }} "href="{{ path('office_address') }}"><i style="color: royalblue"class="mr-2 fa fa-car"></i> {{ CompanyDetailsService.companyDetails.companyAddressStreet }}</a>{% endif %}{% endif %}{% if CompanyDetailsService.companyDetails.contactDetailsDisplayCompanyVCF ==1 %}<a class="dropdown-item" title="Contact details"href="{{ path('create_vcard_company') }}"><i class="mr-2 fa fa-credit-card"></i> Business Card</a>{% endif %}</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-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">{{ app.user.fullName }}{% if app.user.autoLoginURL|length >0 %}<i class="mr-2 fas fa-user-check"title="Auto-login enabled: {{ user.autoLoginURL }}"></i>{% endif %}{% 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}) }}"><i class="mr-2 fa fa-user"></i>Profile</a>{% if CompanyDetailsService.companyDetails.autoLoginAvailable == 1 %}{% if app.user.autoLoginURL|length>0 %}<a class="dropdown-item"href="{{ path('auto_login_reset_pause_and_email_bookmark', {userId: app.user.id}) }}"><i style="color: green" class="mr-2 fa fa-book"></i>Resend Auto-loginBookmark</a>{% endif %}{% if app.user.autoLoginURL|length == 0 %}<a class="dropdown-item"href="{{ path('auto_login_create_personal_url_for_logged_user', {userId: app.user.id}) }}"><i style="color: red" class="mr-2 fa fa-bookmark"></i>Set up auto-login</a>{% endif %}{% endif %}<a class="dropdown-item" href="{{ path('app_logout') }}"><i style="color: red" class="mr-2 fas fa-sign-out-alt"></i>Logout</a></div></li>{% else %}<li class="nav-item"><a class="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 p-0" href="#" id="navbarDropdown" role="button"data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><img src="{{ asset('administration/ATSSharedFiles/LanguageIcons/' ~ LanguagesService.getLanguageSelected.icon) }}"width="24" height="24" alt="Selected language"></a><div class="dropdown-menu dropdown-menu-end p-1 slim-lang-menu"aria-labelledby="navbarDropdown">{% set selected = LanguagesService.getLanguageSelected %}{% for language in LanguagesService.getLanguagesByRankingOrder %}{% if language.language != selected.language %}<a class="dropdown-item icon-item"href="{{ path('select_default_language', { id: language.id }) }}"><img src="{{ asset('administration/ATSSharedFiles/LanguageIcons/' ~ language.icon) }}"width="20" height="20" alt="{{ language.language }}"></a>{% endif %}{% endfor %}</div></li>{% endif %}</ul></div></div></nav><!-- Navigation --></header><!--End Header Section -->