mirror of
https://github.com/inventree/InvenTree.git
synced 2025-08-14 07:31:10 +00:00
Added helper functions, improved UI
This commit is contained in:
@@ -11,9 +11,15 @@
|
||||
<i>{{ category.description }}</i>
|
||||
</p>
|
||||
|
||||
{% if category.has_children %}
|
||||
<h4>Subcategories</h4>
|
||||
{% include "part/category_subcategories.html" with children=category.children.all %}
|
||||
{% endif %}
|
||||
|
||||
{% if category.has_parts %}
|
||||
<h4>Parts</h4>
|
||||
{% include "part/category_parts.html" with parts=category.parts.all %}
|
||||
{% endif %}
|
||||
|
||||
<div class='container-fluid'>
|
||||
<a href="{% url 'category-create' %}?category={{ category.id }}">
|
||||
|
@@ -1,5 +1,3 @@
|
||||
{% if parts|length > 0 %}
|
||||
Parts:
|
||||
<table class="table table-striped">
|
||||
<tr>
|
||||
<th>Part</th>
|
||||
@@ -11,5 +9,4 @@ Parts:
|
||||
<td>{{ part.description }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% endif %}
|
||||
</table>
|
@@ -1,5 +1,3 @@
|
||||
{% if children|length > 0 %}
|
||||
Subcategories:
|
||||
<ul class="list-group">
|
||||
{% for child in children %}
|
||||
<li class="list-group-item">
|
||||
@@ -10,5 +8,4 @@ Subcategories:
|
||||
<span class='badge'>{{ child.partcount }}</span>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
</ul>
|
@@ -5,9 +5,15 @@
|
||||
|
||||
{% include "part/cat_link.html" with category=category %}
|
||||
|
||||
{% if children.all|length > 0 %}
|
||||
<h4>Part Categories</h4>
|
||||
{% include "part/category_subcategories.html" with children=children %}
|
||||
{% endif %}
|
||||
|
||||
{% if parts.all|length > 0%}
|
||||
<h4>Top Level Parts</h4>
|
||||
{% include "part/category_parts.html" with parts=parts %}
|
||||
{% endif %}
|
||||
|
||||
<div class='container-fluid'>
|
||||
<a href="{% url 'category-create' %}">
|
||||
|
Reference in New Issue
Block a user