diff --git a/InvenTree/part/templates/part/category.html b/InvenTree/part/templates/part/category.html index 4dcd599d22..7bb40506d9 100644 --- a/InvenTree/part/templates/part/category.html +++ b/InvenTree/part/templates/part/category.html @@ -4,107 +4,109 @@ {% block content %} -
-
- {% if category %} -

- {{ category.name }} - {% if user.is_staff and roles.part_category.change %} - +
+
+
+ {% if category %} +

+ {{ category.name }} + {% if user.is_staff and roles.part_category.change %} + + {% endif %} +

+

{{ category.description }}

+ {% else %} +

{% trans "Part Categories" %}

+

{% trans "All parts" %}

{% endif %} -

-

{{ category.description }}

- {% else %} -

{% trans "Part Categories" %}

-

{% trans "All parts" %}

- {% endif %} -

-

- {% if roles.part_category.add %} - +

+

+ {% if roles.part_category.add %} + + {% endif %} + {% if category %} + {% if roles.part_category.change %} + + {% endif %} + {% if roles.part_category.delete %} + + {% endif %} + {% endif %} +
+

+
+
+ {% if category %} +

{% trans "Category Details" %}

+ + + + + + + + + + + + + {% if category.default_location %} + + + + + {% endif %} - {% if category %} - {% if roles.part_category.change %} - + {% if category.default_keywords %} + + + + + {% endif %} - {% if roles.part_category.delete %} - - {% endif %} - {% endif %} - -

+ + + + + + + + + + +
{% trans "Category Path" %}{{ category.pathstring }}
{% trans "Category Description" %}{{ category.description }}
{% trans "Default Location" %}{{ category.default_location.pathstring }}
{% trans "Keywords" %}{{ category.default_keywords }}
{% trans "Subcategories" %}{{ category.children.count }}
{% trans "Parts (Including subcategories)" %}{{ category.partcount }}
+ {% else %} +

{% trans "Category Details" %}

+ + + + + + + + + + + + +
{% trans "Part Categories" %}{{ category_count }}
{% trans "Parts" %}{{ part_count }}
+ {% endif %} +
-
- {% if category %} -

{% trans "Category Details" %}

- - - - - - - - - - - - - {% if category.default_location %} - - - - - - {% endif %} - {% if category.default_keywords %} - - - - - - {% endif %} - - - - - - - - - - -
{% trans "Category Path" %}{{ category.pathstring }}
{% trans "Category Description" %}{{ category.description }}
{% trans "Default Location" %}{{ category.default_location.pathstring }}
{% trans "Keywords" %}{{ category.default_keywords }}
{% trans "Subcategories" %}{{ category.children.count }}
{% trans "Parts (Including subcategories)" %}{{ category.partcount }}
- {% else %} -

{% trans "Category Details" %}

- - - - - - - - - - - - -
{% trans "Part Categories" %}{{ category_count }}
{% trans "Parts" %}{{ part_count }}
- {% endif %} -
-
-{% if category and category.children.all|length > 0 %} -{% include "part/subcategories.html" with children=category.children.all collapse_id="categories" %} -{% elif children|length > 0 %} -{% include "part/subcategories.html" with children=children collapse_id="categories" %} -{% endif %} -
+ {% if category and category.children.all|length > 0 %} + {% include "part/subcategories.html" with children=category.children.all collapse_id="categories" %} + {% elif children|length > 0 %} + {% include "part/subcategories.html" with children=children collapse_id="categories" %} + {% endif %} + +
@@ -132,19 +134,38 @@
+
+
+

+ {% block heading %} + + {% endblock %} +

+
+
+ {% block details %} + + {% endblock %} +
+
+ {% block category_tables %} - -
{% endblock category_tables %} {% endblock %} {% block js_load %} {{ block.super }} {% endblock %} + {% block js_ready %} {{ block.super }} +enableRightNavbar({ + minWidth: '50px', +}); + + if (inventreeLoadInt("show-part-cats") == 1) { $("#collapse-item-categories").collapse('show'); } diff --git a/InvenTree/part/templates/part/category_navbar.html b/InvenTree/part/templates/part/category_navbar.html new file mode 100644 index 0000000000..9374ecaaf1 --- /dev/null +++ b/InvenTree/part/templates/part/category_navbar.html @@ -0,0 +1,24 @@ +{% load i18n %} + + \ No newline at end of file diff --git a/InvenTree/part/templates/part/category_parametric.html b/InvenTree/part/templates/part/category_parametric.html index 3cf4f37a20..250530309e 100644 --- a/InvenTree/part/templates/part/category_parametric.html +++ b/InvenTree/part/templates/part/category_parametric.html @@ -2,9 +2,15 @@ {% load static %} {% load i18n %} -{% block category_tables %} +{% block menubar %} +{% include 'part/category_navbar.html' with tab='parameters' %} +{% endblock %} -{% include 'part/category_tabs.html' with tab='parametric-table' %} +{% block heading %} +{% trans "Part Parameters" %} +{% endblock %} + +{% block details %}
diff --git a/InvenTree/part/templates/part/category_partlist.html b/InvenTree/part/templates/part/category_partlist.html index 302fdd3a02..e78254c541 100644 --- a/InvenTree/part/templates/part/category_partlist.html +++ b/InvenTree/part/templates/part/category_partlist.html @@ -2,11 +2,15 @@ {% load static %} {% load i18n %} -{% block category_tables %} - -{% include 'part/category_tabs.html' with tab='part-list' %} - - -
- +{% block menubar %} +{% include 'part/category_navbar.html' with tab='parts' %} +{% endblock %} + +{% block heading %} +{% trans "Parts" %} +{% endblock %} + +{% block details %} + +
{% endblock %} diff --git a/InvenTree/part/templates/part/category_tabs.html b/InvenTree/part/templates/part/category_tabs.html deleted file mode 100644 index b5d8d3c214..0000000000 --- a/InvenTree/part/templates/part/category_tabs.html +++ /dev/null @@ -1,11 +0,0 @@ -{% load i18n %} -{% load inventree_extras %} - -