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

Added views for part and part category

- Worked out simple linking
- Category path displaying correctly
- Category page lists parts in category
This commit is contained in:
Oliver Walters
2017-03-26 10:06:00 +11:00
parent ffb9132de2
commit ddd927c436
5 changed files with 56 additions and 3 deletions

View File

@@ -0,0 +1,17 @@
<h1>Category: {{ category.name }}</h1>
<h2>Path: {{ category }}</h2>
<br>
Path<br>
{# Construct the category path #}
{% for path_item in category.path %}
<a href="../{{path_item.pk}}">{{path_item.name}}</a>/
{% endfor %}
<br>Parts:<br>
{% for part in category.part_set.all %}
<a href="/part/{{part.pk}}">{{part.name}}</a><br>
{% endfor %}

View File

@@ -0,0 +1 @@
{{part}}