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:
@ -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 %}
|
||||
|
Reference in New Issue
Block a user