Update badges

This commit is contained in:
Oliver Walters 2019-09-19 23:38:15 +10:00
parent 3c98cd87a7
commit b3ea2bfb9a
2 changed files with 6 additions and 2 deletions

View File

@ -12,7 +12,9 @@
{% if child.description %}
<i> - {{ child.description }}</i>
{% endif %}
<span class='badge'>{{ child.partcount }}</span>
{% if child.partcount > 0 %}
<span class='badge'>{{ child.partcount }} Part{% if child.partcount > 1 %}s{% endif %}</span>
{% endif %}
</li>
{% endfor %}
</ul>

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>