2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-19 05:25:42 +00:00

Added category list of parameter templates table to settings

This commit is contained in:
eeintech
2020-10-31 09:18:33 -05:00
parent 3e5d8d2b2d
commit 2a563d7370
3 changed files with 79 additions and 2 deletions

View File

@ -37,6 +37,33 @@
{{ block.super }}
{% if category %}
$("#param-table").inventreeTable({
url: "{% url 'api-part-category-parameters' category %}",
queryParams: {
ordering: 'name',
},
formatNoMatches: function() { return '{% trans "No category parameter templates found" %}'; },
columns: [
{
field: 'pk',
title: 'ID',
visible: false,
switchable: false,
},
{
field: 'parameter_template_detail.name',
title: 'Parameter Template',
sortable: 'true',
},
{
field: 'default_value',
title: 'Default Value',
sortable: 'true',
},
]
});
$("#new-param").click(function() {
launchModalForm("{% url 'category-param-template-create' category %}", {
success: function() {
@ -44,6 +71,6 @@
},
});
});
{% endif %}
{% endblock %}