{#
# ---------------------------------------------------------------------
#
# 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 .
#
# ---------------------------------------------------------------------
#}
{% extends "generic_show_form.html.twig" %}
{% import 'components/form/fields_macros.html.twig' as fields %}
{% set params = params ?? [] %}
{% set field_options = field_options ?? {} %}
{% block more_fields %}
{{ fields.dropdownYesNo(
'locked',
item.fields['locked'],
__('Locked'),
field_options
) }}
{{ fields.textField(
'deviceid',
item.fields['deviceid'],
__('Device id'),
field_options
) }}
{{ fields.numberField(
'port',
item.fields['port'],
_n('Port', 'Ports', 1),
field_options
) }}
{{ fields.htmlField(
"Agent",
item.fields['remote_addr'],
__('Public contact address'),
field_options
) }}
{{ fields.dropdownArrayField(
'itemtype',
item.fields['itemtype'],
itemtypes,
__('Item type'),
field_options
) }}
{% if not item.isNewItem() %}
{% set asset_item = get_item(item.fields['itemtype'], item.fields['items_id']) %}
{{ fields.htmlField(
'items_id',
asset_item.getLink(),
__('Item link'),
field_options
) }}
{% set versions %}
{% set versions_array = call("importArrayFromDB", [versions_field]) %}
{% if versions_array|length %}