2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-08-14 15:41:10 +00:00

Unique parameters names from category makes it to bootstrap table

This commit is contained in:
eeintech
2020-09-29 16:13:08 -05:00
parent 6b48977e7b
commit d05a5978a0
7 changed files with 127 additions and 25 deletions

View File

@@ -116,10 +116,10 @@
</div>
{% block part_list %}
{% block category_tables %}
<table class='table table-striped table-condensed' data-toolbar='#button-toolbar' id='part-table'>
</table>
{% endblock part_list %}
{% endblock category_tables %}
{% endblock %}
{% block js_load %}
@@ -245,16 +245,4 @@
},
);
loadParametricPartTable(
"#parametric-part-table",
"{% url 'api-part-list' %}",
{
params: {
{% if category %}category: {{ category.id }},
{% else %}category: "null",
{% endif %}
},
},
);
{% endblock %}

View File

@@ -2,7 +2,7 @@
{% load static %}
{% load i18n %}
{% block part_list %}
{% block category_tables %}
{% include 'part/category_tabs.html' with tab='parametric-table' %}
@@ -10,3 +10,22 @@
</table>
{% endblock %}
{% block js_ready %}
{{ block.super }}
loadParametricPartTable(
"#parametric-part-table",
"{% url 'api-part-list' %}",
{
params: {
{% if category %}category: {{ category.id }},
{% else %}category: "null",
{% endif %}
},
headers: {{ parameters|safe }},
name: 'parametric',
},
);
{% endblock %}

View File

@@ -2,7 +2,7 @@
{% load static %}
{% load i18n %}
{% block part_list %}
{% block category_tables %}
{% include 'part/category_tabs.html' with tab='part-list' %}