Template changes

This commit is contained in:
Oliver Walters 2020-05-26 11:38:17 +10:00
parent 27ca84fd2a
commit 47a4ab2ed8
2 changed files with 7 additions and 2 deletions

View File

@ -6,11 +6,14 @@
{% block content %}
{% if part.virtual %}
<div class='alert alert-info alert-block'>
{% trans "This part is a virtual part" %}
</div>
{% endif %}
{% if part.is_template %}
<div class='alert alert-info alert-block'>
{% trans "This part is a template part." %}
<br>
{% trans "It is not a real part, but real parts can be based on this template." %}
</div>
{% endif %}
{% if part.variant_of %}

View File

@ -13,9 +13,11 @@
<a href="{% url 'part-variants' part.id %}">{% trans "Variants" %} <span class='badge'>{{ part.variants.count }}</span></span></a>
</li>
{% endif %}
{% if not part.virtual %}
<li{% ifequal tab 'stock' %} class="active"{% endifequal %}>
<a href="{% url 'part-stock' part.id %}">{% trans "Stock" %} <span class="badge">{% decimal part.total_stock %}</span></a>
</li>
{% endif %}
{% if part.component or part.used_in_count > 0 %}
<li{% ifequal tab 'allocation' %} class="active"{% endifequal %}>
<a href="{% url 'part-allocation' part.id %}">{% trans "Allocated" %} <span class="badge">{% decimal part.allocation_count %}</span></a>