{% extends "part/part_base.html" %} {% load static %} {% block css %} {% endblock %} {% block details %} {% include 'part/tabs.html' with tab='bom' %}

Bill of Materials

{% if editing_enabled %}
{% else %} {% endif %}
{% endblock %} {% block js_load %} {{ block.super }} {% endblock %} {% block js_ready %} {{ block.super }} // Load the BOM table data loadBomTable($("#bom-table"), { editable: {{ editing_enabled }}, bom_url: "{% url 'api-bom-list' %}", part_url: "{% url 'api-part-list' %}", parent_id: {{ part.id }} }); {% if editing_enabled %} $("#editing-finished").click(function() { location.href = "{% url 'part-bom' part.id %}"; }); $("#bom-item-new").click(function () { launchModalForm( "{% url 'bom-item-create' %}?parent={{ part.id }}", { success: function() { $("#bom-table").bootstrapTable('refresh'); } } ); }); {% else %} $("#edit-bom").click(function () { location.href = "{% url 'part-bom' part.id %}?edit=True"; }); $("#export-bom").click(function () { downloadBom({ modal: '#modal-form', url: "{% url 'bom-export' part.id %}" }); }); {% endif %} {% endblock %}