{% extends 'base.html' %} {% load static %} {% load qr_code %} {% load crispy_forms_tags %} {% block content %}
{% if component.get_resolved_image %} {{component.name}} {% else %} {{component.name}} {% endif %}
{% qr_from_text component.get_qr_code size="m" image_format="svg" %}
{% if component.datasheet_link %} Datasheet {% endif %}
Name Package Manufacturer Type Total #
{{component.name}} {% if component.package %} {{component.package.name}} {% if component.package.image %} {% endif %} {% endif %} {% if component.manufacturer %} {{component.manufacturer.name}} {% if component.manufacturer.image %} {% endif %} {% endif %} {% if component.component_type %}{{component.component_type.class_name}}{% endif %} {{component.get_total_amount}}

Description

{% if component.description %} {{component.description|linebreaks}} {% else %} {% endif %}
{% if component.pref_distri %}

Preferred Distributor

{% if component.pref_distri.image %}
{{component.pref_distri.name}}
{{component.pref_distri.name}}
{% endif %}
{% endif %}

Parameters

{% csrf_token %} {% for f in param_formset %} {% if f.errors %} {% endif %} {% endfor %}
Parameter Value Unit
{{f.parameter_type_object.unit|default_if_none:"-"}}
{% if f.parameter_type.errors %} {{f.parameter_type.errors}} {% endif %} {% if f.value.errors %} {{f.value.errors}} {% endif %}
{{param_formset.management_form}}

Distributor Part Numbers

{% csrf_token %} {% for form in distri_num_formset %} {% endfor %}
Distributor Part Number
{% if form.instance.distributor %} {{form.instance.distributor.name}} {% else %} {% endif %}
{{distri_num_formset.management_form}}
{% for stock in stocks %} {% endfor %}
Storage Amount
{{stock.storage.get_full_path}} {{stock.amount}}
{% if component.get_resolved_image %} {% endif %} {% include 'parts/modals/edit-component-modal.html' with heading="Edit "|add:component.name form=edit_form %} {% endblock content %} {% block custom_scripts %} {% endblock custom_scripts %}