{# # --------------------------------------------------------------------- # # 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 . # # --------------------------------------------------------------------- #} {% if breadcrumbs|length > 0 %}
{% set previous_location_id = null %} {% for breadcrumb_item in breadcrumbs %}
{{ breadcrumb_item['link']|raw }} {% if breadcrumb_item['side'] is defined %} {% if breadcrumb_item['side'] == constant('PDU_Rack::SIDE_LEFT') %} {{ __('On left') }} {% elseif breadcrumb_item['side'] == constant('PDU_Rack::SIDE_RIGHT') %} {{ __('On right') }} {% elseif breadcrumb_item['side'] == constant('PDU_Rack::SIDE_TOP') %} {{ __('On top') }} {% elseif breadcrumb_item['side'] == constant('PDU_Rack::SIDE_BOTTOM') %} {{ __('On bottom') }} {% endif %} {% endif %} {% if breadcrumb_item['position'] is defined %} {{ __('(U%d)')|format(breadcrumb_item['position']) }} {% endif %} {% if breadcrumb_item['location'] is not null and breadcrumb_item['location']['id'] != previous_location_id %}
{% if breadcrumb_item['location']['locations_id'] == previous_location_id %} {% if previous_location_id is not null %} > {% endif %} {{ breadcrumb_item['location']['name'] }} {% else %} {{ breadcrumb_item['location']['completename'] }} {% endif %} {% set previous_location_id = breadcrumb_item['location']['id'] %} {% endif %}
{% if loop.last == false %}
>
{% endif %} {% endfor %}
{% endif %}