From c636f13ba8dd6d5dcfd768c560eeb164720b398a Mon Sep 17 00:00:00 2001 From: Oliver Date: Wed, 3 Nov 2021 11:44:42 +1100 Subject: [PATCH 1/2] Template fix for BOM upload --- .../part/bom_upload/upload_file.html | 91 +++++++++---------- 1 file changed, 44 insertions(+), 47 deletions(-) diff --git a/InvenTree/part/templates/part/bom_upload/upload_file.html b/InvenTree/part/templates/part/bom_upload/upload_file.html index c8add61f49..ab3b245010 100644 --- a/InvenTree/part/templates/part/bom_upload/upload_file.html +++ b/InvenTree/part/templates/part/bom_upload/upload_file.html @@ -8,58 +8,55 @@ {% include "sidebar_link.html" with url=url text="Return to BOM" icon="fa-undo" %} {% endblock %} -{% block page_content %} +{% block heading %} +{% trans "Upload Bill of Materials" %} +{% endblock %} -
-
- {% block heading %} -

{% trans "Upload Bill of Materials" %}

- {{ wizard.form.media }} - {% endblock %} +{% block actions %} +{% endblock %} + +{% block page_info %} +
+

{% blocktrans with step=wizard.steps.step1 count=wizard.steps.count %}Step {{step}} of {{count}}{% endblocktrans %} + {% if description %}- {{ description }}{% endif %}

+ +
+ {% csrf_token %} + {% load crispy_forms_tags %} + + {% block form_buttons_top %} + {% endblock form_buttons_top %} + + {% block form_alert %} +
+ {% trans "Requirements for BOM upload" %}: +
    +
  • {% trans "The BOM file must contain the required named columns as provided in the " %} {% trans "BOM Upload Template" %}
  • +
  • {% trans "Each part must already exist in the database" %}
  • +
-
- {% block details %} + {% endblock %} -

{% blocktrans with step=wizard.steps.step1 count=wizard.steps.count %}Step {{step}} of {{count}}{% endblocktrans %} - {% if description %}- {{ description }}{% endif %}

+ + {{ wizard.management_form }} + {% block form_content %} + {% crispy wizard.form %} + {% endblock form_content %} +
- - {% csrf_token %} - {% load crispy_forms_tags %} - - {% block form_buttons_top %} - {% endblock form_buttons_top %} - - {% block form_alert %} -
- {% trans "Requirements for BOM upload" %}: -
    -
  • {% trans "The BOM file must contain the required named columns as provided in the " %} {% trans "BOM Upload Template" %}
  • -
  • {% trans "Each part must already exist in the database" %}
  • -
-
- {% endblock %} - - - {{ wizard.management_form }} - {% block form_content %} - {% crispy wizard.form %} - {% endblock form_content %} -
- - {% block form_buttons_bottom %} - {% if wizard.steps.prev %} - - {% endif %} - - - {% endblock form_buttons_bottom %} - - {% endblock details %} -
- -{% endblock page_content %} + {% block form_buttons_bottom %} + {% if wizard.steps.prev %} + + {% endif %} + + + {% endblock form_buttons_bottom %} +
+{% endblock page_info %} {% block js_ready %} {{ block.super }} + +enableSidebar('bom-upload'); + {% endblock js_ready %} From b1c23e30f5fc83af8edbf63b4973ddd11679be4c Mon Sep 17 00:00:00 2001 From: Oliver Date: Wed, 3 Nov 2021 11:59:20 +1100 Subject: [PATCH 2/2] Fix CSS for user badges --- InvenTree/build/templates/build/detail.html | 2 +- InvenTree/order/templates/order/order_base.html | 4 ++-- InvenTree/order/templates/order/sales_order_base.html | 6 +++--- InvenTree/part/templates/part/detail.html | 2 +- InvenTree/stock/templates/stock/item_base.html | 2 +- InvenTree/stock/templates/stock/location_delete.html | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/InvenTree/build/templates/build/detail.html b/InvenTree/build/templates/build/detail.html index 9400eb6473..d53122cdd1 100644 --- a/InvenTree/build/templates/build/detail.html +++ b/InvenTree/build/templates/build/detail.html @@ -142,7 +142,7 @@ {% trans "Completed" %} {% if build.completion_date %} - {{ build.completion_date }}{% if build.completed_by %}{{ build.completed_by }}{% endif %} + {{ build.completion_date }}{% if build.completed_by %}{{ build.completed_by }}{% endif %} {% else %} {% trans "Build not complete" %} {% endif %} diff --git a/InvenTree/order/templates/order/order_base.html b/InvenTree/order/templates/order/order_base.html index 9e94b379f8..83a17a705a 100644 --- a/InvenTree/order/templates/order/order_base.html +++ b/InvenTree/order/templates/order/order_base.html @@ -123,7 +123,7 @@ src="{% static 'img/blank_image.png' %}" {% trans "Created" %} - {{ order.creation_date }}{{ order.created_by }} + {{ order.creation_date }}{{ order.created_by }} {% if order.issue_date %} @@ -143,7 +143,7 @@ src="{% static 'img/blank_image.png' %}" {% trans "Received" %} - {{ order.complete_date }}{{ order.received_by }} + {{ order.complete_date }}{{ order.received_by }} {% endif %} {% if order.responsible %} diff --git a/InvenTree/order/templates/order/sales_order_base.html b/InvenTree/order/templates/order/sales_order_base.html index 42a09e8ede..952319da10 100644 --- a/InvenTree/order/templates/order/sales_order_base.html +++ b/InvenTree/order/templates/order/sales_order_base.html @@ -128,7 +128,7 @@ src="{% static 'img/blank_image.png' %}" {% trans "Created" %} - {{ order.creation_date }}{{ order.created_by }} + {{ order.creation_date }}{{ order.created_by }} {% if order.target_date %} @@ -141,14 +141,14 @@ src="{% static 'img/blank_image.png' %}" {% trans "Shipped" %} - {{ order.shipment_date }}{{ order.shipped_by }} + {{ order.shipment_date }}{{ order.shipped_by }} {% endif %} {% if order.status == PurchaseOrderStatus.COMPLETE %} {% trans "Received" %} - {{ order.complete_date }}{{ order.received_by }} + {{ order.complete_date }}{{ order.received_by }} {% endif %} {% if order.responsible %} diff --git a/InvenTree/part/templates/part/detail.html b/InvenTree/part/templates/part/detail.html index 145b5bfb35..e45e7e14b8 100644 --- a/InvenTree/part/templates/part/detail.html +++ b/InvenTree/part/templates/part/detail.html @@ -64,7 +64,7 @@ {{ part.creation_date }} {% if part.creation_user %} - {{ part.creation_user }} + {{ part.creation_user }} {% endif %} diff --git a/InvenTree/stock/templates/stock/item_base.html b/InvenTree/stock/templates/stock/item_base.html index 5a58e2e04f..8da0db0296 100644 --- a/InvenTree/stock/templates/stock/item_base.html +++ b/InvenTree/stock/templates/stock/item_base.html @@ -393,7 +393,7 @@ {% trans "Last Stocktake" %} {% if item.stocktake_date %} - {{ item.stocktake_date }} {{ item.stocktake_user }} + {{ item.stocktake_date }} {{ item.stocktake_user }} {% else %} {% trans "No stocktake performed" %} {% endif %} diff --git a/InvenTree/stock/templates/stock/location_delete.html b/InvenTree/stock/templates/stock/location_delete.html index 22b4168173..9c560e58c5 100644 --- a/InvenTree/stock/templates/stock/location_delete.html +++ b/InvenTree/stock/templates/stock/location_delete.html @@ -36,7 +36,7 @@ If this location is deleted, these items will be moved to the top level 'Stock'
    {% for item in location.stock_items.all %} -
  • {{ item.part.full_name }} - {{ item.part.description }}{% decimal item.quantity %}
  • +
  • {{ item.part.full_name }} - {{ item.part.description }}{% decimal item.quantity %}
  • {% endfor %}
{% endif %}