From 440436c70d0b16856cf6609049eed358a24cf96a Mon Sep 17 00:00:00 2001 From: Oliver Date: Tue, 30 Nov 2021 20:00:26 +1100 Subject: [PATCH] Refactor display for "part category" --- InvenTree/part/templates/part/category.html | 43 +++++++++++-------- InvenTree/stock/templates/stock/location.html | 2 +- 2 files changed, 26 insertions(+), 19 deletions(-) diff --git a/InvenTree/part/templates/part/category.html b/InvenTree/part/templates/part/category.html index bc8a99a3dd..9e6a923dda 100644 --- a/InvenTree/part/templates/part/category.html +++ b/InvenTree/part/templates/part/category.html @@ -61,29 +61,36 @@ {% endblock %} {% block details_left %} -{% if category %} -

{{ category.description }}

-{% else %} -

{% trans "Top level part category" %}

-{% endif %} - -{% endblock %} + + + {% if category %} + {% if category.description %} + + + + + + {% endif %} + + + + + + {% else %} + + + + + + {% endif %} +
{% trans "Description" %}{{ category.description }}
{% trans "Category Path" %}{{ category.pathstring }}
{% trans "Category Path" %}{% trans "Top level part category" %}
+{% endblock details_left %} {% block details_right %} {% if category %} - - - - - - - - - - {% if category.default_location %} @@ -124,7 +131,7 @@
{% trans "Category Path" %}{{ category.pathstring }}
{% trans "Category Description" %}{{ category.description }}
{% endif %} -{% endblock %} +{% endblock details_right %} {% block page_content %} diff --git a/InvenTree/stock/templates/stock/location.html b/InvenTree/stock/templates/stock/location.html index c956508d76..6a201e610c 100644 --- a/InvenTree/stock/templates/stock/location.html +++ b/InvenTree/stock/templates/stock/location.html @@ -11,7 +11,7 @@ {% if location %} {% trans "Stock Location" %}: {{ location.name }} {% else %} -{% trans "Stock Location" %} +{% trans "Stock" %} {% endif %} {% endblock %}