{# # ------------------------------------------------------------------------- # Order plugin for GLPI # ------------------------------------------------------------------------- # # LICENSE # # This file is part of Order. # # Order 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. # # Order 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 Order. If not, see . # ------------------------------------------------------------------------- # @copyright Copyright (C) 2009-2023 by Order plugin team. # @copyright 2015-2025 Teclib' and contributors. # @copyright 2003-2014 by the INDEPNET Development Team. # @licence https://www.gnu.org/licenses/gpl-3.0.html # @license GPLv3 https://www.gnu.org/licenses/gpl-3.0.html # @link https://github.com/pluginsGLPI/order # ------------------------------------------------------------------------- #} {% set datatable_id = 'datatable_link_' ~ rand %} {% set table_visible = table_visible|default(false) %} {% if numref == 0 %}
{{ __("No item to take delivery of", "order") }}
{% else %}
{{ __('Assets') }} {{ __('Manufacturer') }} {{ __('Product reference', 'order') }}
{{ reference_header_data.item_type_name }} {{ reference_header_data.manufacturer_name|raw }} {{ reference_header_data.reference_name|raw }} ({{ reference_header_data.item_count }})
{% if hide_and_show %} {% endif %} {# Items Details Table (collapsible) #} {% if total_count < 1 %}
{{ __('No results found') }}
{% else %} {% set total_cols = columns|length + (showmassiveactions ? 1 : 0) %}
{% if showmassiveactions %}
{% do call('Html::showMassiveActions', [massiveactionparams|default([])]) %} {% do call( 'Dropdown::showNumber', [ massive_select_params["name"]|default(''), massive_select_params["params"]|default([]) ] ) %}
{% endif %} {% if showmassiveactions %} {% endif %} {% for colkey, column in columns %} {% set column_label = column is array ? column['label'] : column %} {% set raw_header = column is array ? column['raw_header']|default(false) : false %} {% set sort_icon = '' %} {% set new_order = "ASC" %} {# Default to ASC for the next click #} {% if sort == colkey %} {% set sort_icon = order == 'ASC' ? 'ti ti-sort-ascending' : (order == 'DESC' ? 'ti ti-sort-descending' : '') %} {% set new_order = (order == 'ASC' ? 'DESC' : 'ASC') %} {% endif %} {% set sort_href = "javascript:reloadTab('start=" ~ start ~ "&" ~ countainer_name ~ "sort=" ~ colkey ~ "&" ~ countainer_name ~ "order=" ~ new_order ~ "&" ~ countainer_name ~ "visible=" ~ true ~ "');" %} {% endfor %} {% if entries|length > 0 %} {% for entry in entries %} {% set row_massiveactions = entry['showmassiveactions']|default(showmassiveactions) %} {% if row_massiveactions %} {% endif %} {% for colkey, colum in columns %} {% endfor %} {% endfor %} {% else %} {% endif %} {% if footers is defined and footers|length > 0 %} {% for footer in footers %} {% if showmassiveactions %} {% endif %} {% for footer_col, footerval in footer %} {% endfor %} {% endfor %} {% endif %}
{% if not nosort and not (column is array and column['nosort'] is defined) %} {% endif %} {{ raw_header ? column_label|raw : column_label }} {% if not nosort and not (column is array and column['nosort'] is defined) %} {% endif %}
{% if entry['skip_ma'] is not defined or entry['skip_ma'] == false %} {% endif %} {% if colkey in entry|keys %} {% set formatter = formatters[colkey]|default(null) %} {% if formatter == "raw_html" %} {{ entry[colkey]|raw }} {% else %} {{ entry[colkey] }} {% endif %} {% endif %}
{{ __('No results found') }}
{{ footerval|nl2br }}
{% if showmassiveactions and entries|length > 10 %} {# Show actions at bottom if many items #}
{% do call('Html::showMassiveActions', [massiveactionparams|default([])]) %}
{% endif %} {% if not nopager and total_count > 0 %}
{{ __('Showing %s to %s of %s entries', 'order')|format( start + 1, (start + displayed_count > total_count ? total_count : start + displayed_count), total_count ) }}
{{ __('Entries to show:', 'order') }} {% include 'components/dropdown/limit.html.twig' with { 'is_tab': true, 'right': true, 'additional_params': 'id=' ~ ID ~ '&' ~ countainer_name ~ 'sort=' ~ sort ~ '&' ~ countainer_name ~ 'order=' ~ order ~ '&' ~ countainer_name ~ 'visible=1' } %}
{% set nb_pages = (total_count / limit)|round(0, 'ceil') %} {% if nb_pages > 1 %}
  • {% set current_page = (start / limit)|round(0, 'floor') + 1 %} {% set start_page = max(1, current_page - 2) %} {% set end_page = min(nb_pages, current_page + 2) %} {% for i in start_page..end_page %}
  • {{ i }}
  • {% endfor %}
{% endif %}
{% endif %}
{% endif %} {% if hide_and_show %} {% endif %} {% endif %}