From 0e684071fa9deb95298b203b29415801595b717f Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Sat, 25 May 2019 23:21:38 +1000 Subject: [PATCH] Display message if a part is a template or a variant --- InvenTree/part/templates/part/part_base.html | 22 +++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/InvenTree/part/templates/part/part_base.html b/InvenTree/part/templates/part/part_base.html index 8470677487..cc1ed3df9f 100644 --- a/InvenTree/part/templates/part/part_base.html +++ b/InvenTree/part/templates/part/part_base.html @@ -4,12 +4,24 @@ {% block content %} +{% if part.active == False %} +
+ This part is not active: +
+{% endif %} +{% if part.has_variants %} +
+ This part is a template part.
+ It is not a real part, but real parts can be based on this template. +
+{% endif %} +{% if part.variant_of %} +
+ This part is a variant of {{ part.variant_of.full_name }} +
+{% endif %} +
- {% if part.active == False %} -
- This part ({{ part.full_name }}) is not active: -
- {% endif %}