{# # --------------------------------------------------------------------- # # 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 . # # --------------------------------------------------------------------- #} {% import 'components/form/fields_macros.html.twig' as fields %}
{% set label %}

{{ __("Total: %s, New: %s, Used: %s"|format( count_unused + count_used, count_unused, count_used )) }}

{% endset %} {{ fields.htmlField( '', label, '', { field_class: 'col-12 col-sm-3', label_class: ' ', } ) }} {% if can_edit %} {{ fields.numberField( 'to_add', 1, '', { min: 1, step: 1, field_class: 'col-12 col-sm-2', label_class: 'col-xxl-5', } ) }} {% set add_several %} {% endset %} {{ fields.htmlField( '', add_several, '', { field_class: 'col-12 col-sm-1', label_class: 'col-xxl-1', } ) }} {% endif %}
{% if count_unused > 0 %}

{{ __("%s New consumables"|format(count_unused)) }}

{% do call('\\Glpi\\Search\\SearchEngine::show', [itemtype, { 'criteria' : criteria_unused, 'push_history' : false, 'showmassiveactions': can_edit, 'hide_criteria' : true, 'init_session_data' : true, }]) %}
{% endif %} {% if count_used > 0 %}

{{ __("%s Used consumables"|format(count_used)) }}

{% do call('\\Glpi\\Search\\SearchEngine::show', [itemtype, { 'criteria' : criteria_used, 'push_history' : false, 'showmassiveactions': can_edit, 'hide_criteria' : true, 'init_session_data' : true, }]) %}
{% endif %}