{% extends "base.html" %}
{% load static %}
{% load i18n %}

{% block page_title %}
InvenTree | {% trans "Build Orders" %} 
{% endblock %}

{% block content %}


<div class='row'>
    <div class='col-sm-6'>
        <h3>{% trans "Build Orders" %}</h3>
    </div>
    <div class='col-sm-6'>

    </div>
    
    <hr>
    
    <div id='button-toolbar'>
        <div class='button-toolbar container-fluid' style='float: right;'>
            <button type='button' class="btn btn-success" id='new-build'>
                <span class='fas fa-tools'></span> {% trans "New Build Order" %}</button>
            <div class='filter-list' id='filter-list-build'>
                <!-- An empty div in which the filter list will be constructed -->
            </div>
        </div>
    </div>
</div>

<table class='table table-striped table-condensed' id='build-table' data-toolbar='#button-toolbar'>
</table>

{% endblock %}

{% block js_ready %}
{{ block.super }}

    $("#collapse-item-active").collapse().show();

    $("#new-build").click(function() {
        newBuildOrder();
    });

    loadBuildTable($("#build-table"), {
        url: "{% url 'api-build-list' %}",
        params: {
            part_detail: "true",
        },
    });

{% endblock %}