{% extends "modal_form.html" %}

{% block pre_form_content %}
<b>Build: {{ build.title }}</b> - {{ build.quantity }} x {{ build.part.full_name }}
<br>
Are you sure you want to mark this build as complete?
<hr>
{% if taking %}
The following items will be removed from stock:

<table class='table table-striped table-condensed'>
<tr>
    <th></th>
    <th>Part</th>
    <th>Quantity</th>
    <th>Location</th>
</tr>
{% for item in taking %}
<tr>
    <td>
        {% include "hover_image.html" with image=item.stock_item.part.image hover=True %}
    </td>
    <td>
        {{ item.stock_item.part.full_name }}<br>
        <i>{{ item.stock_item.part.description }}</i>
    </td>
    <td>{{ item.quantity }}</td>
    <td>{{ item.stock_item.location }}</td>
</tr>
{% endfor %}
</table>
{% else %}
No parts have been allocated to this build.
{% endif %}
<hr>
The following items will be created:
<div class='panel panel-default'>
    {% include "hover_image.html" with image=build.part.image hover=True %}
    {{ build.quantity }} x {{ build.part.full_name }}
</div>

{% endblock %}