mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-18 21:15:41 +00:00
Improvements to stock page
- Fixed URL / view (use class views) - Better slug lookup - Better table rendering using ol' mate bootstrap
This commit is contained in:
@ -4,7 +4,7 @@
|
||||
|
||||
{% include 'part/tabs.html' with tab='bom' %}
|
||||
|
||||
<table>
|
||||
<table class="table table-striped">
|
||||
<tr>
|
||||
<th>Part</th>
|
||||
<th>Description</th>
|
||||
|
@ -8,7 +8,7 @@
|
||||
Total in stock: {{ part.stock }}
|
||||
<br>
|
||||
|
||||
<table>
|
||||
<table class="table table-striped">
|
||||
<tr>
|
||||
<th>Quantity</th>
|
||||
<th>Location</th>
|
||||
|
@ -5,7 +5,7 @@
|
||||
{% include 'part/tabs.html' with tab='suppliers' %}
|
||||
|
||||
{% if part.supplier_parts.all|length > 0 %}
|
||||
<table>
|
||||
<table class="table table-striped">
|
||||
<tr>
|
||||
<th>Supplier</th>
|
||||
<th>SKU</th>
|
||||
@ -15,7 +15,11 @@
|
||||
<tr>
|
||||
<td><a href="{% url 'supplier-detail' spart.supplier.id %}">{{ spart.supplier.name }}</a></td>
|
||||
<td><a href="{% url 'supplier-part-detail' spart.id %}">{{ spart.SKU }}</a></td>
|
||||
<td>{{ spart.URL }}</td>
|
||||
<td>
|
||||
{% if spart.URL %}
|
||||
<a href="{{ spart.URL }}">{{ spart.URL }}</a>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
@ -1,6 +1,9 @@
|
||||
<ul class="nav nav-tabs">
|
||||
<li{% ifequal tab 'detail' %} class="active"{% endifequal %}><a href="{% url 'part-detail' part.id %}">Details</a></li>
|
||||
<li{% ifequal tab 'bom' %} class="active"{% endifequal %}><a href="{% url 'part-bom' part.id %}">BOM <span class="badge">{{ part.bomItemCount }}</span></a></li>
|
||||
{% if part.bomItemCount > 0 %}
|
||||
<li{% ifequal tab 'build' %} class "active"{% endifequal %}><a href="#">Build</a></li>
|
||||
{% endif %}
|
||||
{% if part.usedInCount > 0 %}
|
||||
<li{% ifequal tab 'used' %} class="active"{% endifequal %}><a href="{% url 'part-used-in' part.id %}">Used In <span class="badge">{{ part.usedInCount }}</span></a></li>
|
||||
{% endif %}
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
Part tracking for {{ part.name }}
|
||||
|
||||
<table>
|
||||
<table class="table table-striped">
|
||||
<tr>
|
||||
<th>Serial</th>
|
||||
<th>Status</th>
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
This part is used to make the following parts:
|
||||
|
||||
<table>
|
||||
<table class="table table-striped">
|
||||
<tr>
|
||||
<th>Part</th>
|
||||
<th>Description</th>
|
||||
|
@ -20,7 +20,7 @@ class PartIndex(ListView):
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
|
||||
context = super(PartIndex, self).get_context_data(**kwargs)
|
||||
context = super(PartIndex, self).get_context_data(**kwargs).copy()
|
||||
|
||||
# View top-level categories
|
||||
children = PartCategory.objects.filter(parent=None)
|
||||
|
Reference in New Issue
Block a user