{# # --------------------------------------------------------------------- # # GLPI - Gestionnaire Libre de Parc Informatique # # http://glpi-project.org # # @copyright 2015-2024 Teclib' and contributors. # @copyright 2003-2014 by the INDEPNET Development Team. # @licence https://www.gnu.org/licenses/gpl-3.0.html # # --------------------------------------------------------------------- # # LICENSE # # This file is part of GLPI. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # # --------------------------------------------------------------------- #} {% set anonymous = session('glpiactiveprofile') is null %} {% set is_vertical = get_page_layout() == 'vertical' %} {% set is_horizontal = not is_vertical %} {% set is_helpdesk = get_current_interface() == 'helpdesk' %} {% if call('DBConnection::isDbAvailable') and constant('SKIP_UPDATES') is defined and not call('Update::isDbUpToDate') %}
{{ __("You are bypassing a needed update") }}
{% endif %} {{ include('layout/parts/impersonate_banner.html.twig') }} {{ include('components/messages_after_redirect_toasts.html.twig', {'display_container': true}) }}
{% if is_vertical %}
{% if not anonymous %} {{ include('layout/parts/goto_button.html.twig') }} {% endif %} {% if user is not null %} {# There may still be a user logged in without a profile or entity. This is seen when they need to reset their password. #}
{{ include('layout/parts/user_header.html.twig') }}
{% endif %} {% if not anonymous %}
{{ include('layout/parts/goto_button.html.twig') }} {{ include('layout/parts/menu.html.twig') }}

{% endif %}
{% endif %}
{# On the helpdesk interface, the container will be displayed with a reduced width #}
{% if is_vertical %} {{ include('layout/parts/breadcrumbs.html.twig') }}
{{ include('layout/parts/global_search_form.html.twig') }}
{% elseif is_horizontal %}
{{ include('layout/parts/user_header.html.twig') }}
{{ include('layout/parts/menu.html.twig') }} {{ include('layout/parts/goto_button.html.twig') }}
{% endif %}
{{ include('layout/parts/user_header.html.twig') }}
{# Breadcrumbs are not needed on the helpdesk as we have only a few pages #} {% if is_horizontal and not is_helpdesk %}
{{ include('layout/parts/breadcrumbs.html.twig') }}
{{ include('layout/parts/global_search_form.html.twig') }}
{% endif %}