{# # --------------------------------------------------------------------- # # GLPI - Gestionnaire Libre de Parc Informatique # # http://glpi-project.org # # @copyright 2015-2023 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 . # # --------------------------------------------------------------------- #}
{% for col_name, column in columns %} {% set col_id = call('Html::cleanId', ['col_label_' ~ col_name ~ '_' ~ param['rand']]) %} {% endfor %} {% if param['row_check_all'] %} {% set col_id = call('Html::cleanId', ['col_of_table_' ~ param['rand']]) %} {% endif %} {% for row_name, row in rows %} {% if row is not iterable %} {% else %} {% set row_id = call('Html::cleanId', ['row_label_' ~ row_name ~ '_' ~ param['rand']]) %} {% for col_name, column in columns %} {% set content = row['columns'][col_name] %} {% endfor %} {% if param['row_check_all'] %} {% endif %} {% endif %} {% endfor %} {% if param['col_check_all'] %} {% for col_name, column in columns %} {% endfor %} {% if param['row_check_all'] %} {% endif %} {% endif %}

{{ title }}

{{ param['first_cell']|raw }} {% if column is not iterable %} {{ column }} {% else %} {% if column['short'] is defined and column['long'] is defined %} {{ column['short'] }} {% do call('Html::showToolTip', [column['long'], {'applyto': col_id}]) %} {% else %} {{ column['label'] }} {% endif %} {% endif %} {{ __('Select/unselect all') }}
{{ row }} {{ row['label'] ?? ' ' }} {% if content is iterable and content['checked'] is defined %} {% if content['readonly'] is not defined %} {% set content = content|merge({'readonly': false}) %} {% endif %} {% set content = content|merge({ 'name': row_name ~ '[' ~ col_name ~ ']', 'id': call('Html::cleanId', ['cb_' ~ row_name ~ '_' ~ col_name ~ '_' ~ param['rand']]) }) %} {% set massive_tags = [] %} {% if param['row_check_all'] %} {% set massive_tags = massive_tags|merge([ 'row_' ~ row_name ~ '_' ~ param['rand'], ]) %} {% endif %} {% if param['col_check_all'] %} {% set massive_tags = massive_tags|merge([ 'col_' ~ col_name ~ '_' ~ param['rand'], ]) %} {% endif %} {% if param['row_check_all'] and param['col_check_all'] %} {% set massive_tags = massive_tags|merge([ 'table_' ~ param['rand'], ]) %} {% endif %} {% set content = content|merge({ 'massive_tags': massive_tags }) %} {% do call('Html::showCheckbox', [content]) %} {% else %} {% if content is not iterable %} {{ content }} {% endif %} {% endif %} {% do call('Html::showCheckbox', [{ 'title': __('Check/uncheck all'), 'criterion': { 'tag_for_massive': 'row_' ~ row_name ~ '_' ~ param['rand'] }, 'massive_tags': 'table_' ~ param['rand'], 'id': call('Html::cleanId', ['cb_checkall_row_' ~ row_name ~ '_' ~ param['rand']]), 'checked': (nb_cb_per_row[row_name]['checked'] >= (nb_cb_per_row[row_name]['total'])), }]) %}
{{ __('Select/unselect all') }} {% if nb_cb_per_col[col_name]['total'] >= 2 %} {% do call('Html::showCheckbox', [{ 'title': __('Check/uncheck all'), 'criterion': { 'tag_for_massive': 'col_' ~ col_name ~ '_' ~ param['rand'] }, 'massive_tags': 'table_' ~ param['rand'], 'id': call('Html::cleanId', ['cb_checkall_col_' ~ col_name ~ param['rand']]), 'checked': (nb_cb_per_col[col_name]['checked'] >= (nb_cb_per_col[col_name]['total'])), }]) %} {% endif %} {% do call('Html::showCheckbox', [{ 'title': __('Check/uncheck all'), 'criterion': { 'tag_for_massive': 'table_' ~ param['rand'] }, 'massive_tags': '', 'id': call('Html::cleanId', ['cb_checkall_table_' ~ param['rand']]), }]) %}