{% import "helper.twig" as helper %} {% if decoded is not empty %}
{% if part %} {# Show detailed info when it is a part #}
{% trans %}label_scanner.db_part_found{% endtrans %} {% if openUrl %} {% endif %}

{{ part.name }}

{{ part.description | format_markdown(true) }}
{% trans %}category.label{% endtrans %}
{{ helper.structural_entity_link(part.category) }}
{% trans %}footprint.label{% endtrans %}
{{ helper.structural_entity_link(part.footprint) }}
{# Show part lots / locations #} {% if part.partLots is not empty %} {% for lot in part.partLots %} {% endfor %}
{% trans %}part_lots.storage_location{% endtrans %} {% trans %}part_lots.amount{% endtrans %}
{% if lot.storageLocation %} {{ helper.structural_entity_link(lot.storageLocation) }} {% else %} {% endif %} {% if lot.instockUnknown %} ? {% else %} {{ lot.amount | format_amount(part.partUnit, {'decimals': 5}) }} {% endif %}
{% else %}
{% trans %}label_scanner.no_locations{% endtrans %}
{% endif %}
{% elseif entity %} {# If we have an entity but that is not an part #}
{% trans %}label_scanner.target_found{% endtrans %}: {{ type_label(entity) }} {% if openUrl %} {% endif %}

{{ entity.name }}

{% trans %}id.label{% endtrans %}: {{ entity.id }} ({{ type_label(entity) }})

{% if entity.fullPath is defined %} {{ helper.breadcrumb_entity_link(entity)}} {% endif %}
{% endif %} {% if createUrl %}

{% trans %}label_scanner.part_can_be_created{% endtrans %}

{% trans %}label_scanner.part_can_be_created.help{% endtrans %}


{% trans %}label_scanner.part_create_btn{% endtrans %}
{% endif %}

{% trans %}label_scanner.scan_result.title{% endtrans %}

{# Decoded barcode fields #} {% for key, value in decoded %} {% endfor %}
{{ key }} {{ value }}
{# Whitespace under table and Input form fields #}
{% endif %}