{# # --------------------------------------------------------------------- # # GLPI - Gestionnaire Libre de Parc Informatique # # http://glpi-project.org # # @copyright 2015-2025 Teclib' and contributors. # @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 ancestors is defined %} {% endif %} {% for item in items %} {% if item is instanceof("Glpi\\Form\\ServiceCatalog\\ServiceCatalogLeafInterface") %} {{ include( 'components/helpdesk_forms/service_catalog_item.html.twig', {item: item}, with_context = false ) }} {% endif %} {% if item is instanceof("Glpi\\Form\\ServiceCatalog\\ServiceCatalogCompositeInterface") %} {% if expand_categories %}
{% set unique_dom_id = 'service-catalog-tree-' ~ random() %}

{{ item.getServiceCatalogItemTitle() }}

{{ item.getServiceCatalogItemDescription()|safe_html }}
{% for child in item.getChildren() %} {{ include( 'components/helpdesk_forms/service_catalog_nested_item.html.twig', {child: child}, with_context = false ) }} {% endfor %}
{% else %} {{ include( 'components/helpdesk_forms/service_catalog_item.html.twig', {item: item}, with_context = false ) }} {% endif %} {% endif %} {% else %} {% if is_default_search %} {# The user is not allowed to see any forms at this time #} {% set empty_title = __("There are no forms available") %} {% set empty_subtitle = __("Please try again later.") %} {% else %} {# The current search filter did not match any forms #} {% set empty_title = __("No forms found") %} {% set empty_subtitle = __("Try different keywords or filters.") %} {% endif %}

{{ empty_title }}

{{ empty_subtitle }}

{% endfor %} {# Add pagination if there are more items than items_per_page #} {% if total > items_per_page %} {% set total_pages = ((total + items_per_page - 1) / items_per_page)|round(0, 'floor') %} {% set adjacents = 2 %} {% set skip_adjacents = false %} {% endif %}