From 64abe1e889ea7123dc385fad191aa0224d5e4717 Mon Sep 17 00:00:00 2001 From: Oliver Date: Tue, 30 Nov 2021 20:31:05 +1100 Subject: [PATCH] Refactoring "company" view --- .../templates/company/company_base.html | 40 ++++--- InvenTree/part/templates/part/category.html | 14 +-- InvenTree/part/templates/part/part_base.html | 108 +++++++++--------- .../stock/templates/stock/item_base.html | 2 - 4 files changed, 86 insertions(+), 78 deletions(-) diff --git a/InvenTree/company/templates/company/company_base.html b/InvenTree/company/templates/company/company_base.html index b9cd650395..e19e8e4e37 100644 --- a/InvenTree/company/templates/company/company_base.html +++ b/InvenTree/company/templates/company/company_base.html @@ -56,7 +56,29 @@ {% endblock %} {% block details %} -

{{ company.description }}

+ + + + + + + + + + + + + + + + + + + + + + +
{% trans "Description" %}{{ company.description }}
{%trans "Manufacturer" %}{% include "yesnolabel.html" with value=company.is_manufacturer %}
{% trans "Supplier" %}{% include 'yesnolabel.html' with value=company.is_supplier %}
{% trans "Customer" %}{% include 'yesnolabel.html' with value=company.is_customer %}
{% endblock %} @@ -110,22 +132,6 @@ {{ company.contact }}{% include "clip.html"%} {% endif %} - - - - {%trans "Manufacturer" %} - {% include "yesnolabel.html" with value=company.is_manufacturer %} - - - - {% trans "Supplier" %} - {% include 'yesnolabel.html' with value=company.is_supplier %} - - - - {% trans "Customer" %} - {% include 'yesnolabel.html' with value=company.is_customer %} - {% endblock %} diff --git a/InvenTree/part/templates/part/category.html b/InvenTree/part/templates/part/category.html index 9e6a923dda..4797571fda 100644 --- a/InvenTree/part/templates/part/category.html +++ b/InvenTree/part/templates/part/category.html @@ -76,6 +76,13 @@ {% trans "Category Path" %} {{ category.pathstring }} + {% if category.default_keywords %} + + + {% trans "Keywords" %} + {{ category.default_keywords }} + + {% endif %} {% else %} @@ -98,13 +105,6 @@ {{ category.default_location.pathstring }} {% endif %} - {% if category.default_keywords %} - - - {% trans "Keywords" %} - {{ category.default_keywords }} - - {% endif %} {% trans "Subcategories" %} diff --git a/InvenTree/part/templates/part/part_base.html b/InvenTree/part/templates/part/part_base.html index 9619a55b38..581b796352 100644 --- a/InvenTree/part/templates/part/part_base.html +++ b/InvenTree/part/templates/part/part_base.html @@ -100,60 +100,64 @@ {% block details %} -

-
-
- {% if part.is_template %} -   - - {% endif %} - {% if part.assembly %} -   - - {% endif %} - {% if part.component %} -   - - {% endif %} - {% if part.trackable %} -   - - {% endif %} - {% if part.purchaseable %} -   - - {% endif %} - {% if part.salable %} -   - - {% endif %} - - {% if not part.active %} -   -
- - {% trans 'Inactive' %} -
- {% endif %} - - {% if part.virtual and part.active %} -   -
- - {% trans 'Virtual' %} -
- {% endif %} -
- - {% include "spacer.html" %} - -
-

- + + + diff --git a/InvenTree/stock/templates/stock/item_base.html b/InvenTree/stock/templates/stock/item_base.html index 111007cd71..37ff88073b 100644 --- a/InvenTree/stock/templates/stock/item_base.html +++ b/InvenTree/stock/templates/stock/item_base.html @@ -148,8 +148,6 @@ {% endif %} - -
{% setting_object 'STOCK_OWNERSHIP_CONTROL' as owner_control %}
+
+
+
+ {% if part.is_template %} +   + + {% endif %} + {% if part.assembly %} +   + + {% endif %} + {% if part.component %} +   + + {% endif %} + {% if part.trackable %} +   + + {% endif %} + {% if part.purchaseable %} +   + + {% endif %} + {% if part.salable %} +   + + {% endif %} + + {% if not part.active %} +   +
+ + {% trans 'Inactive' %} +
+ {% endif %} + + {% if part.virtual and part.active %} +   +
+ + {% trans 'Virtual' %} +
+ {% endif %} +
+
+ + {% include "spacer.html" %} + + +
+
{% trans "Part Name" %}