2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-08-14 15:41:10 +00:00

Rename field part.has_variants to part.is_template

This commit is contained in:
Oliver Walters
2019-05-25 23:58:31 +10:00
parent c3d75deb16
commit c45a506a10
12 changed files with 95 additions and 14 deletions

View File

@@ -9,7 +9,7 @@
This part is not active:
</div>
{% endif %}
{% if part.has_variants %}
{% if part.is_template %}
<div class='alert alert-info alert-block'>
This part is a <i>template part</i>.<br>
It is not a <i>real</i> part, but real parts can be based on this template.

View File

@@ -2,7 +2,7 @@
<li{% ifequal tab 'detail' %} class="active"{% endifequal %}>
<a href="{% url 'part-detail' part.id %}">Details</a>
</li>
{% if part.has_variants %}
{% if part.is_template %}
<li{% ifequal tab 'variants' %} class='active'{% endifequal %}>
<a href="{% url 'part-variants' part.id %}">Variants <span class='badge'>{{ part.variants.count }}</span></span></a>
</li>
@@ -25,7 +25,7 @@
<li{% ifequal tab 'used' %} class="active"{% endifequal %}>
<a href="{% url 'part-used-in' part.id %}">Used In{% if part.used_in_count > 0 %}<span class="badge">{{ part.used_in_count }}</span>{% endif %}</a></li>
{% endif %}
{% if part.purchaseable and part.has_variants == False %}
{% if part.purchaseable and part.is_template == False %}
<li{% ifequal tab 'suppliers' %} class="active"{% endifequal %}>
<a href="{% url 'part-suppliers' part.id %}">Suppliers
<span class="badge">{{ part.supplier_count }}</span>

View File

@@ -15,7 +15,7 @@
<div id='button-toolbar'>
<div class='btn-group'>
{% if part.has_variants and part.active %}
{% if part.is_template and part.active %}
<button class='btn btn-success' id='new-variant' title='Create new variant'>New Variant</button>
{% endif %}
</div>