{% extends "page_base.html" %}

{% load inventree_extras %}
{% load static %}
{% load i18n %}

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

{% block heading %}
{% trans "Build Orders" %}
{% endblock heading %}

{% block actions %}
{% if roles.build.add %}
<button type='button' class="btn btn-success" id='new-build'>
    <span class='fas fa-tools'></span> {% trans "New Build Order" %}
</button>
{% endif %}
{% endblock actions %}

{% block page_info %}

<div class='panel-content'>
    <div id='button-toolbar'>
        {% include "filter_list.html" with id="build" %}
    </div>

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

{% endblock page_info %}

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

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

loadBuildTable($("#build-table"), {
    locale: '{{ request.LANGUAGE_CODE }}',
});

{% endblock js_ready %}
