{% 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 %}
{% for stock in stocks %} {% endfor %}
Storage Amount
{{stock.storage.get_full_path}} {{stock.amount}}

Parameters

{% for param in parameters %} {% endfor %}
Parameter Value
{{param.parameter_type.parameter_name}}
{{param.resolved_value_as_string}}
{% csrf_token %}
{% for param in parameters %} {% if param.parameter_type.parameter_description %}
{{param.parameter_type.parameter_description}}
{% endif %} {% endfor %}

Distributor Part Numbers

{% for num in distri_nums %} {% endfor %}
Distributor Part Number
{{num.distributor.name}} {{num.distributor_part_number}}
{% csrf_token %}
{% if component.get_resolved_image %} {% endif %} {% include 'parts/modals/new-distributor-number-modal.html' with component_name=component.name form=new_distri_num_form %} {% include 'parts/modals/edit-component-modal.html' with heading="Edit "|add:component.name form=comp_form %} {% include 'parts/modals/new-component-parameter-modal.html' with component_name=component.name form=new_param_form %} {% endblock content %} {% block custom_scripts %} {% endblock custom_scripts %}