diff --git a/InvenTree/InvenTree/static/css/inventree.css b/InvenTree/InvenTree/static/css/inventree.css index a6bd2753b0..ddadd73ab7 100644 --- a/InvenTree/InvenTree/static/css/inventree.css +++ b/InvenTree/InvenTree/static/css/inventree.css @@ -229,16 +229,26 @@ /* Extra label styles */ +.label { + display: inline; + font-size: 75%; + line-height: 1; + padding-left: 4px; + padding-right: 4px; + text-align: center; + white-space: nowrap; + vertical-align: baseline; + border-radius: 5px; +} + .label-large { margin: 3px; - font-size: 100%; + font-size: 90%; border: 3px solid; border-radius: 15px; background: none; - padding-right: 10px; - padding-left: 10px; - padding-top: 5px; - padding-bottom: 5px; + padding: 3px; + border-radius: 10px; } .label-large-red { @@ -254,18 +264,7 @@ border-radius: 5px; } -.label { - display: inline; - font-size: 75%; - line-height: 1; - padding-left: 4px; - padding-right: 4px; - color: white; - text-align: center; - white-space: nowrap; - vertical-align: baseline; - border-radius: .25em; -} + .label-red { background: var(--label-red); diff --git a/InvenTree/part/templates/part/detail.html b/InvenTree/part/templates/part/detail.html index 65d47678e0..1b1da5f14d 100644 --- a/InvenTree/part/templates/part/detail.html +++ b/InvenTree/part/templates/part/detail.html @@ -11,6 +11,88 @@ {% block page_content %} +
+
+

{% trans "Part Details" %}

+
+
+ + + + + {% if part.IPN %} + + + + + + {% endif %} + + + + + + + + + + + {% if part.revision %} + + + + + + {% endif %} + {% if part.keywords %} + + + + + + {% endif %} + {% if part.link %} + + + + + + {% endif %} + + + + + + {% if part.trackable and part.getLatestSerialNumber %} + + + + + + {% endif %} + {% if part.default_location %} + + + + + + {% endif %} + {% if part.default_supplier %} + + + + + + {% endif %} +
{% trans "IPN" %}{{ part.IPN }}{% include "clip.html"%}
{% trans "Name" %}{{ part.name }}{% include "clip.html"%}
{% trans "Description" %}{{ part.description }}{% include "clip.html"%}
{% trans "Revision" %}{{ part.revision }}{% include "clip.html"%}
{% trans "Keywords" %}{{ part.keywords }}{% include "clip.html"%}
{% trans "External Link" %}{{ part.link }}{% include "clip.html"%}
{% trans "Creation Date" %} + {{ part.creation_date }} + {% if part.creation_user %} + {{ part.creation_user }} + {% endif %} +
{% trans "Latest Serial Number" %}{{ part.getLatestSerialNumber }}{% include "clip.html"%}
{% trans "Default Location" %}{{ part.default_location }}
{% trans "Default Supplier" %}{{ part.default_supplier }}
+
+
+

{% trans "Part Stock" %}

diff --git a/InvenTree/part/templates/part/navbar.html b/InvenTree/part/templates/part/navbar.html index 3ee444c3ba..95a7857c2c 100644 --- a/InvenTree/part/templates/part/navbar.html +++ b/InvenTree/part/templates/part/navbar.html @@ -11,6 +11,12 @@ +
  • + + + {% trans "Details" %} + +
  • diff --git a/InvenTree/part/templates/part/part_app_base.html b/InvenTree/part/templates/part/part_app_base.html index ec26dac282..a365fca6da 100644 --- a/InvenTree/part/templates/part/part_app_base.html +++ b/InvenTree/part/templates/part/part_app_base.html @@ -1,4 +1,4 @@ -{% extends "base.html" %} +{% extends "page_base.html" %} {% load static %} {% load i18n %} {% load inventree_extras %} diff --git a/InvenTree/part/templates/part/part_base.html b/InvenTree/part/templates/part/part_base.html index 84093820aa..2724d0ce9f 100644 --- a/InvenTree/part/templates/part/part_base.html +++ b/InvenTree/part/templates/part/part_base.html @@ -8,298 +8,210 @@ {% include "part/navbar.html" %} {% endblock %} -{% block content %} - -
    -
    - -

    {{ part.full_name }}

    -
    -
    -
    - {% include "part/part_thumb.html" %} -
    -

    -

    - - {% if user.is_staff and roles.part.change %} -   - {% endif %} - -
    - {% 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 %} -

    -

    - -
    - - - {% if barcodes %} - - - {% endif %} - {% if part.active %} - - {% if roles.stock.change %} - - {% endif %} - {% if part.purchaseable and roles.purchase_order.add %} - - {% endif %} - {% endif %} - - {% if roles.part.add or roles.part.change or roles.part.delete %} -
    - - -
    - {% endif %} -
    - -

    - - -

    -
    -
    -
    - {% if part.variant_of %} -
    - {% object_link 'part-detail' part.variant_of.id part.variant_of.full_name as link %} - {% blocktrans %}This part is a variant of {{link}}{% endblocktrans %} -
    - {% endif %} -
    -
    -
    - - - - - - - - - - - - - {% if on_order > 0 %} - - - - - - {% endif %} - {% if required_build_order_quantity > 0 %} - - - - - {% endif %} - {% if required_sales_order_quantity > 0 %} - - - - - {% endif %} - {% if allocated > 0 %} - - - - - - {% endif %} - - {% if not part.is_template %} - {% if part.assembly %} - - - - - - - - - - {% if quantity_being_built > 0 %} - - - - - - {% endif %} - {% endif %} - {% endif %} -

    {% trans "Available Stock" %}

    {% decimal available %}{% if part.units %} {{ part.units }}{% endif %}

    {% trans "In Stock" %}{% include "part/stock_count.html" %}
    {% trans "On Order" %}{% decimal on_order %}
    {% trans "Required for Build Orders" %}{% decimal required_build_order_quantity %} -
    {% trans "Required for Sales Orders" %}{% decimal required_sales_order_quantity %} -
    {% trans "Allocated to Orders" %}{% decimal allocated %}

    -

    {% trans "Build Status" %}

    -
    {% trans "Can Build" %}{% decimal part.can_build %}
    {% trans "Building" %}{% decimal quantity_being_built %}
    -
    -
    -
    - -
    -
    - - - - {% if part.IPN %} - - - - - - {% endif %} - - - - - - - - - - - {% if part.revision %} - - - - - - {% endif %} - {% if part.keywords %} - - - - - - {% endif %} - {% if part.link %} - - - - - - {% endif %} - - - - - - {% if part.trackable and part.getLatestSerialNumber %} - - - - - - {% endif %} - {% if part.default_location %} - - - - - - {% endif %} - {% if part.default_supplier %} - - - - - - {% endif %} -
    {% trans "IPN" %}{{ part.IPN }}{% include "clip.html"%}
    {% trans "Name" %}{{ part.name }}{% include "clip.html"%}
    {% trans "Description" %}{{ part.description }}{% include "clip.html"%}
    {% trans "Revision" %}{{ part.revision }}{% include "clip.html"%}
    {% trans "Keywords" %}{{ part.keywords }}{% include "clip.html"%}
    {% trans "External Link" %}{{ part.link }}{% include "clip.html"%}
    {% trans "Creation Date" %} - {{ part.creation_date }} - {% if part.creation_user %} - {{ part.creation_user }} - {% endif %} -
    {% trans "Latest Serial Number" %}{{ part.getLatestSerialNumber }}{% include "clip.html"%}
    {% trans "Default Location" %}{{ part.default_location }}
    {% trans "Default Supplier" %}{{ part.default_supplier }}
    -
    -
    - - -
  • - -{% block page_content %} +{% block thumbnail %} +{% include "part/part_thumb.html" %} {% endblock %} +{% block details %} + +

    + {{ part.full_name }} + + {% if user.is_staff and roles.part.change %} +   + {% endif %} +

    + +

    +
    + {% 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 %} +
    +

    + + +
    + + + {% if barcodes %} + + + {% endif %} + {% if part.active %} + + {% if roles.stock.change %} + + {% endif %} + {% if part.purchaseable and roles.purchase_order.add %} + + {% endif %} + {% endif %} + + {% if roles.part.add or roles.part.change or roles.part.delete %} +
    + + +
    + {% endif %} + +
    + + +
    + {% if part.variant_of %} +
    + {% object_link 'part-detail' part.variant_of.id part.variant_of.full_name as link %} + {% blocktrans %}This part is a variant of {{link}}{% endblocktrans %} +
    + {% endif %} +
    + + +{% endblock %} + +{% block details_right %} + + + + + + + + + + + + + {% if on_order > 0 %} + + + + + + {% endif %} + {% if required_build_order_quantity > 0 %} + + + + + {% endif %} + {% if required_sales_order_quantity > 0 %} + + + + + {% endif %} + {% if allocated > 0 %} + + + + + + {% endif %} + + {% if not part.is_template %} + {% if part.assembly %} + + + + + + + + + + {% if quantity_being_built > 0 %} + + + + + + {% endif %} + {% endif %} + {% endif %} +

    {% trans "Available Stock" %}

    {% decimal available %}{% if part.units %} {{ part.units }}{% endif %}

    {% trans "In Stock" %}{% include "part/stock_count.html" %}
    {% trans "On Order" %}{% decimal on_order %}
    {% trans "Required for Build Orders" %}{% decimal required_build_order_quantity %} +
    {% trans "Required for Sales Orders" %}{% decimal required_sales_order_quantity %} +
    {% trans "Allocated to Orders" %}{% decimal allocated %}

    +

    {% trans "Build Status" %}

    +
    {% trans "Can Build" %}{% decimal part.can_build %}
    {% trans "Building" %}{% decimal quantity_being_built %}
    {% endblock %} {% block js_ready %} diff --git a/InvenTree/part/templates/part/part_thumb.html b/InvenTree/part/templates/part/part_thumb.html index ff5ef3e0de..0f3fea9487 100644 --- a/InvenTree/part/templates/part/part_thumb.html +++ b/InvenTree/part/templates/part/part_thumb.html @@ -4,25 +4,22 @@ {% settings_value "INVENTREE_DOWNLOAD_FROM_URL" as allow_download %} -
    -
    -
    - -
    - {% if roles.part.change %} -
    -
    - - - {% if allow_download %} - - {% endif %} -
    -
    - {% endif %} -
    \ No newline at end of file +
    + +
    +{% if roles.part.change %} +
    +
    + + + {% if allow_download %} + + {% endif %} +
    +
    +{% endif %} \ No newline at end of file