{% extends "panel.html" %} {% load i18n %} {% block label %}parts{% endblock %} {% block heading %} {% trans "Part Settings" %} {% endblock %} {% block content %}

{% trans "Part Options" %}

{% include "InvenTree/settings/header.html" %} {% include "InvenTree/settings/setting.html" with key="PART_IPN_REGEX" %} {% include "InvenTree/settings/setting.html" with key="PART_ALLOW_DUPLICATE_IPN" %} {% include "InvenTree/settings/setting.html" with key="PART_ALLOW_EDIT_IPN" %} {% include "InvenTree/settings/setting.html" with key="PART_SHOW_QUANTITY_IN_FORMS" icon="fa-hashtag" %} {% include "InvenTree/settings/setting.html" with key="PART_SHOW_PRICE_IN_FORMS" icon="fa-dollar-sign" %} {% include "InvenTree/settings/setting.html" with key="PART_SHOW_RELATED" icon="fa-random" %} {% include "InvenTree/settings/setting.html" with key="PART_CREATE_INITIAL" icon="fa-boxes" %} {% include "InvenTree/settings/setting.html" with key="PART_TEMPLATE" icon="fa-clone" %} {% include "InvenTree/settings/setting.html" with key="PART_ASSEMBLY" icon="fa-tools" %} {% include "InvenTree/settings/setting.html" with key="PART_COMPONENT" icon="fa-th"%} {% include "InvenTree/settings/setting.html" with key="PART_TRACKABLE" icon="fa-directions" %} {% include "InvenTree/settings/setting.html" with key="PART_PURCHASEABLE" icon="fa-shopping-cart" %} {% include "InvenTree/settings/setting.html" with key="PART_SALABLE" icon="fa-dollar-sign" %} {% include "InvenTree/settings/setting.html" with key="PART_VIRTUAL" icon="fa-ghost" %} {% include "InvenTree/settings/setting.html" with key="PART_COPY_BOM" %} {% include "InvenTree/settings/setting.html" with key="PART_COPY_PARAMETERS" %} {% include "InvenTree/settings/setting.html" with key="PART_COPY_TESTS" %} {% include "InvenTree/settings/setting.html" with key="PART_CATEGORY_PARAMETERS" %} {% include "InvenTree/settings/setting.html" with key="PART_INTERNAL_PRICE" %} {% include "InvenTree/settings/setting.html" with key="PART_BOM_USE_INTERNAL_PRICE" %}

{% trans "Part Import" %}

{% include "InvenTree/settings/header.html" %} {% include "InvenTree/settings/setting.html" with key="PART_SHOW_IMPORT" icon="fa-file-upload" %}

{% trans "Part Parameter Templates" %}

{% endblock %} {% block js_ready %} {{ block.super }} $("#param-table").inventreeTable({ url: "{% url 'api-part-parameter-template-list' %}", queryParams: { ordering: 'name', }, formatNoMatches: function() { return '{% trans "No part parameter templates found" %}'; }, columns: [ { field: 'pk', title: 'ID', visible: false, switchable: false, }, { field: 'name', title: 'Name', sortable: 'true', }, { field: 'units', title: 'Units', sortable: 'true', }, { formatter: function(value, row, index, field) { var bEdit = ""; var bDel = ""; var html = "
" + bEdit + bDel + "
"; return html; } } ] }); $("#new-param").click(function() { launchModalForm("{% url 'part-param-template-create' %}", { success: function() { $("#param-table").bootstrapTable('refresh'); }, }); }); $("#param-table").on('click', '.template-edit', function() { var button = $(this); var url = "/part/parameter/template/" + button.attr('pk') + "/edit/"; launchModalForm(url, { success: function() { $("#param-table").bootstrapTable('refresh'); } }); }); $("#param-table").on('click', '.template-delete', function() { var button = $(this); var url = "/part/parameter/template/" + button.attr('pk') + "/delete/"; launchModalForm(url, { success: function() { $("#param-table").bootstrapTable('refresh'); } }); }); $("#import-part").click(function() { launchModalForm("{% url 'api-part-import' %}?reset", {}); }); {% endblock %}