2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-01 11:10:54 +00:00

Merge remote-tracking branch 'inventree/master'

This commit is contained in:
Oliver Walters
2019-09-22 22:34:34 +10:00
32 changed files with 239 additions and 101 deletions

View File

@ -32,6 +32,27 @@
</p>
</div>
<div class='col-sm-6'>
{% if location %}
<h3>Location Details</h3>
<table class='table table-striped table-condensed'>
<tr>
<td>Location Path</td>
<td>{{ location.pathstring }}</td>
</tr>
<tr>
<td>Location Description</td>
<td>{{ location.description }}</td>
</tr>
<tr>
<td>Sublocations</td>
<td>{{ location.children.count }}</td>
</tr>
<tr>
<td>Stock Items</td>
<td>{{ location.item_count }}</td>
</tr>
</table>
{% endif %}
</div>
</h3>
</div>
@ -55,16 +76,16 @@
{% block js_ready %}
{{ block.super }}
if (sessionStorage.getItem("inventree-show-part-locations")) {
if (inventreeLoadInt("show-part-locs") == 1) {
$("#collapse-item-locations").collapse('show');
}
$("#collapse-item-locations").on('shown.bs.collapse', function() {
sessionStorage.setItem('inventree-show-part-locations', 1);
inventreeSave('show-part-locs', 1);
});
$("#collapse-item-locations").on('hidden.bs.collapse', function() {
sessionStorage.removeItem('inventree-show-part-locations');
inventreeDel('show-part-locs');
});
$("#stock-export").click(function() {

View File

@ -8,7 +8,9 @@ Sub-Locations<span class='badge'>{{ children|length }}</span>
<ul class="list-group">
{% for child in children %}
<li class="list-group-item"><a href="{% url 'stock-location-detail' child.id %}">{{ child.name }}</a> - <i>{{ child.description }}</i>
<span class='badge'>{{ child.item_count }}</span>
{% if child.item_count > 0 %}
<span class='badge'>{{ child.item_count }} Item{% if child.item_count > 1 %}s{% endif %}</span>
{% endif %}
</li>
{% endfor %}
</ul>