mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Small improvements for build display
Working toward build management
This commit is contained in:
parent
690ec83265
commit
07f16d8891
@ -9,26 +9,27 @@
|
||||
|
||||
<hr>
|
||||
|
||||
<table class='table table-striped' id='part-table'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Part</th>
|
||||
<th>Source</th>
|
||||
<th>Quantity</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for item in build.part.bom_items.all %}
|
||||
<tr>
|
||||
<td colspan='3'><b><i>{{ item.sub_part.name }}</b></i></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td><i>Select...</i></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
<table class='table table-striped' id='build-table'>
|
||||
</table>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block js_ready %}
|
||||
{{ block.super }}
|
||||
|
||||
$('#build-table').bootstrapTable({
|
||||
sortable: true,
|
||||
columns: [
|
||||
{
|
||||
title: 'Part',
|
||||
},
|
||||
{
|
||||
title: 'Source',
|
||||
},
|
||||
{
|
||||
title: 'Quantity',
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
{% endblock %}
|
@ -2,7 +2,32 @@
|
||||
{% load static %}
|
||||
|
||||
{% block content %}
|
||||
<h3>Build Details</h3>
|
||||
|
||||
<div class='row'>
|
||||
<div class='col-sm-6'>
|
||||
<h3>Build Details</h3>
|
||||
<p><b>{{ build.title }}</b>{% include "build_status.html" with build=build %}</p>
|
||||
<p>Building {{ build.quantity }} × {{ build.part.name }}</p>
|
||||
</div>
|
||||
<div class='col-sm-6'>
|
||||
<h3>
|
||||
<div style='float: right;'>
|
||||
<div class="dropdown" style="float: right;">
|
||||
<button class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown">Options
|
||||
<span class="caret"></span></button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href='#' id='build-edit' title='Edit build'>Edit build</a></li>
|
||||
{% if build.is_active %}
|
||||
<li><a href="{% url 'build-allocate' build.id %}" title='Allocate parts'>Allocate Parts</a></li>
|
||||
<li><a href='#' id='build-cancel' title='Cancel build'>Cancel build</a></li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table class='table table-striped'>
|
||||
<tr>
|
||||
<td>Title</td><td>{{ build.title }}</td>
|
||||
@ -68,28 +93,20 @@
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class='container-fluid'>
|
||||
<button class="btn btn-info" id='edit-build'>Edit Build</button>
|
||||
{% if build.is_active %}
|
||||
<a href="{% url 'build-allocate' build.id %}"><button class='btn btn-primary' id='allocate-build'>Allocate Parts</button></a>
|
||||
<button class='btn btn-warning' id='cancel-build'>Cancel Build</button>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% include 'modals.html' %}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block js_ready %}
|
||||
{{ block.super }}
|
||||
$("#edit-build").click(function () {
|
||||
$("#build-edit").click(function () {
|
||||
launchModalForm("{% url 'build-edit' build.id %}",
|
||||
{
|
||||
reload: true
|
||||
});
|
||||
});
|
||||
|
||||
$("#cancel-build").click(function() {
|
||||
$("#build-cancel").click(function() {
|
||||
launchModalForm("{% url 'build-cancel' build.id %}",
|
||||
{
|
||||
reload: true
|
||||
|
Loading…
Reference in New Issue
Block a user