diff --git a/InvenTree/part/templates/part/manufacturer.html b/InvenTree/part/templates/part/manufacturer.html deleted file mode 100644 index ba708d70e8..0000000000 --- a/InvenTree/part/templates/part/manufacturer.html +++ /dev/null @@ -1,84 +0,0 @@ -{% extends "part/part_base.html" %} -{% load static %} -{% load i18n %} -{% load inventree_extras %} - -{% block menubar %} -{% include 'part/navbar.html' with tab='manufacturers' %} -{% endblock %} - -{% block heading %} -{% trans "Part Manufacturers" %} -{% endblock %} - -{% block details %} - -
-
- -
- - -
-
-
- - -
- -{% endblock %} - -{% block js_load %} -{{ block.super }} -{% endblock %} -{% block js_ready %} - {{ block.super }} - - $('#manufacturer-create').click(function () { - launchModalForm( - "{% url 'manufacturer-part-create' %}", - { - reload: true, - data: { - part: {{ part.id }} - }, - secondary: [ - { - field: 'manufacturer', - label: '{% trans "New Manufacturer" %}', - title: '{% trans "Create new manufacturer" %}', - } - ] - }); - }); - - $("#manufacturer-part-delete").click(function() { - - var selections = $("#manufacturer-table").bootstrapTable("getSelections"); - - deleteManufacturerParts(selections, { - onSuccess: function() { - $("#manufacturer-table").bootstrapTable("refresh"); - } - }); - }); - - loadManufacturerPartTable( - "#manufacturer-table", - "{% url 'api-manufacturer-part-list' %}", - { - params: { - part: {{ part.id }}, - part_detail: true, - manufacturer_detail: true, - }, - } - ); - - linkButtonsToSelection($("#manufacturer-table"), ['#manufacturer-part-options']) - -{% endblock %} \ No newline at end of file diff --git a/InvenTree/part/templates/part/navbar.html b/InvenTree/part/templates/part/navbar.html index b4c943dcfa..6266675aa8 100644 --- a/InvenTree/part/templates/part/navbar.html +++ b/InvenTree/part/templates/part/navbar.html @@ -78,12 +78,6 @@ {% if part.purchaseable and roles.purchase_order.view %} -
  • - - - {% trans "Manufacturers" %} - -
  • @@ -109,7 +103,7 @@
  • - {% trans "Tests" %} + {% trans "Test Templates" %}
  • {% endif %} diff --git a/InvenTree/part/templates/part/supplier.html b/InvenTree/part/templates/part/supplier.html index c0486cc42a..28b6407b33 100644 --- a/InvenTree/part/templates/part/supplier.html +++ b/InvenTree/part/templates/part/supplier.html @@ -6,12 +6,13 @@ {% include 'part/navbar.html' with tab='suppliers' %} {% endblock %} + {% block heading %} {% trans "Part Suppliers" %} {% endblock %} {% block details %} -
    +
    - +
    {% endblock %} +{% block post_content_panel %} +
    +
    + +
    + + +
    +
    +
    +
    +
    +

    + {% trans "Part Manufacturers" %} +

    +
    +
    +
    +
    +
    + +{% endblock %} + {% block js_load %} {{ block.super }} {% endblock %} @@ -90,6 +118,49 @@ } ); - linkButtonsToSelection($("#supplier-table"), ['#supplier-part-options']) + linkButtonsToSelection($("#supplier-table"), ['#supplier-part-options']); + + loadManufacturerPartTable( + '#manufacturer-table', + "{% url 'api-manufacturer-part-list' %}", + { + params: { + part: {{ part.id }}, + part_detail: true, + manufacturer_detail: true, + }, + } + ); + + linkButtonsToSelection($("#manufacturer-table"), ['#manufacturer-part-options']); + + $("#manufacturer-part-delete").click(function() { + + var selections = $("#manufacturer-table").bootstrapTable("getSelections"); + + deleteManufacturerParts(selections, { + onSuccess: function() { + $("#manufacturer-table").bootstrapTable("refresh"); + } + }); + }); + + $('#manufacturer-create').click(function () { + launchModalForm( + "{% url 'manufacturer-part-create' %}", + { + reload: true, + data: { + part: {{ part.id }} + }, + secondary: [ + { + field: 'manufacturer', + label: '{% trans "New Manufacturer" %}', + title: '{% trans "Create new manufacturer" %}', + } + ] + }); + }); {% endblock %} \ No newline at end of file