Add part description to build allocation table

This commit is contained in:
Oliver Walters 2019-05-07 23:09:36 +10:00
parent 7dd7b68ed6
commit 7101d9cb7e
2 changed files with 14 additions and 6 deletions

View File

@ -6,17 +6,24 @@
<h3>Allocate Parts for Build</h3> <h3>Allocate Parts for Build</h3>
<div class='row'>
<div class='col-sm-6'>
<h4><a href="{% url 'build-detail' build.id %}">{{ build.title }}</a></h4> <h4><a href="{% url 'build-detail' build.id %}">{{ build.title }}</a></h4>
{{ build.quantity }} x {{ build.part.name }} {{ build.quantity }} x {{ build.part.name }}
</div>
<div class='col-sm-6'>
<div class='btn-group' style='float: right;'>
<button class='btn btn-warning' type='button' id='complete-build'>Complete Build</button>
</div>
</div>
</div>
<hr> <hr>
{% for bom_item in bom_items.all %} {% for bom_item in bom_items.all %}
{% include "build/allocation_item.html" with item=bom_item build=build collapse_id=bom_item.id %} {% include "build/allocation_item.html" with item=bom_item build=build collapse_id=bom_item.id %}
{% endfor %} {% endfor %}
<div>
<button class='btn btn-warning' type='button' id='complete-build'>Complete Build</button>
</div>
{% endblock %} {% endblock %}

View File

@ -3,7 +3,8 @@
{% load inventree_extras %} {% load inventree_extras %}
{% block collapse_title %} {% block collapse_title %}
{{ item.sub_part.name }} {{ item.sub_part.name }}<br>
<small><i>{{ item.sub_part.description }}</i></small>
{% endblock %} {% endblock %}
{% block collapse_heading %} {% block collapse_heading %}