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

Added part category path string to serializer

This commit is contained in:
Oliver
2018-04-24 17:54:08 +10:00
parent 25fcd3e9f1
commit f46c09e3a7
4 changed files with 11 additions and 4 deletions

View File

@@ -33,7 +33,9 @@ function add_part(part) {
// TODO - Work out how to add in category name + link...
if (part.category){
text += "category: " + part.category;
text += '<a href="/part/category/' + part.category + '/">';
text += part.category_path;
text += '</a>';
}
text += "</td>";

View File

@@ -10,10 +10,8 @@
{% include "part/category_subcategories.html" with children=children %}
{% endif %}
{% if parts.all|length > 0%}
<h4>Top Level Parts</h4>
<h4>Parts</h4>
{% include "part/category_parts.html" with parts=parts %}
{% endif %}
<div class='container-fluid'>
<a href="{% url 'category-create' %}">