mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-30 12:36:45 +00:00
Improve display of Build index
This commit is contained in:
parent
ff14b0b363
commit
c10ddab30c
@ -12,6 +12,11 @@
|
|||||||
<th>Part</th>
|
<th>Part</th>
|
||||||
<th>Quantity</th>
|
<th>Quantity</th>
|
||||||
<th>Status</th>
|
<th>Status</th>
|
||||||
|
{% if completed %}
|
||||||
|
<th>Completed</th>
|
||||||
|
{% else %}
|
||||||
|
<th>Created</th>
|
||||||
|
{% endif %}
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@ -21,6 +26,11 @@
|
|||||||
<td><a href="{% url 'part-build' build.part.id %}">{{ build.part.name }}</a></td>
|
<td><a href="{% url 'part-build' build.part.id %}">{{ build.part.name }}</a></td>
|
||||||
<td>{{ build.quantity }}</td>
|
<td>{{ build.quantity }}</td>
|
||||||
<td>{% include "build_status.html" with build=build %}
|
<td>{% include "build_status.html" with build=build %}
|
||||||
|
{% if completed %}
|
||||||
|
<td>{{ build.completion_date }}</td>
|
||||||
|
{% else %}
|
||||||
|
<td>{{ build.creation_date }}</td>
|
||||||
|
{% endif %}
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
|
@ -3,39 +3,26 @@
|
|||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
|
|
||||||
<h4>Active Builds</h4>
|
<div class='row'>
|
||||||
|
<div class='col-sm-6'>
|
||||||
<div id='active-build-toolbar'>
|
<h4>Part Builds</h4>
|
||||||
<div class='btn-group'>
|
</div>
|
||||||
<button class="btn btn-success" id='new-build'>Start New Build</button>
|
<div class='col-sm-6'>
|
||||||
|
<div class='container' id='active-build-toolbar' style='float: right;'>
|
||||||
|
<div class='btn-group' style='float: right;'>
|
||||||
|
<button class="btn btn-success" id='new-build'>Start New Build</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<table class='table table-striped table-condensed build-table' id='build-table-{{collapse_id}}' data-toolbar='#active-build-toolbar'>
|
<hr>
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>Build</th>
|
|
||||||
<th>Part</th>
|
|
||||||
<th>Quantity</th>
|
|
||||||
<th>Status</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
{% for build in active %}
|
|
||||||
<tr>
|
|
||||||
<td><a href="{% url 'build-detail' build.id %}">{{ build.title }}</a></td>
|
|
||||||
<td><a href="{% url 'part-build' build.part.id %}">{{ build.part.name }}</a></td>
|
|
||||||
<td>{{ build.quantity }}</td>
|
|
||||||
<td>{% include "build_status.html" with build=build %}
|
|
||||||
</tr>
|
|
||||||
{% endfor %}
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<p></p>
|
{% include "build/build_list.html" with builds=active title="Active Builds" completed=False collapse_id='active' %}
|
||||||
{% include "build/build_list.html" with builds=completed title="Completed Builds" collapse_id="complete" %}
|
|
||||||
<p></p>
|
{% include "build/build_list.html" with builds=completed completed=True title="Completed Builds" collapse_id="complete" %}
|
||||||
{% include "build/build_list.html" with builds=cancelled title="Cancelled Builds" collapse_id="cancelled" %}
|
|
||||||
|
{% include "build/build_list.html" with builds=cancelled title="Cancelled Builds" completed=False collapse_id="cancelled" %}
|
||||||
|
|
||||||
{% include 'modals.html' %}
|
{% include 'modals.html' %}
|
||||||
|
|
||||||
@ -75,6 +62,21 @@
|
|||||||
title: 'Status',
|
title: 'Status',
|
||||||
sortable: true,
|
sortable: true,
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
title: 'Created',
|
||||||
|
sortable: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'Completed',
|
||||||
|
sortable: true,
|
||||||
|
formatter: function(value, row, index, field) {
|
||||||
|
if (value) {
|
||||||
|
return 'hello';
|
||||||
|
} else {
|
||||||
|
return "---";
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user