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

Added "new part" feature

- Create a new part
- Button provided on the "category" list page
This commit is contained in:
Oliver
2018-04-15 10:08:44 +10:00
parent ff2082b156
commit 2c2db4fffb
4 changed files with 58 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
{% extends "base.html" %}
{% load static %}
{% block content %}
{% include "part/cat_link.html" with category=category %}
<div class='panel panel-primary'>
<div class='panel-heading'>Create a new part{% if category %} in category '{{ category.name }}'{% endif %}</div>
<div class='panel-body'>
{% load crispy_forms_tags %}
{% crispy form %}
</div>
{% endblock %}

View File

@@ -28,5 +28,8 @@ Parts:
</ul>
{% endif %}
<a href="/part/create/{% if category %}?category={{ category.id }}{% endif %}">
<button class="btn btn-default">New Part</button>
</a>
{% endblock %}