From 10c3d101e822b30cf0cdf98ae1fa396d5833d246 Mon Sep 17 00:00:00 2001 From: Matthias Mair Date: Tue, 2 May 2023 12:03:52 +0200 Subject: [PATCH] Replace mklint with djlint (#4746) * remove markuplint * remove dedicated html step - will be done by pre-commit * add djlint for django template linting * Fix T003: Endblock should have name * Fix H013: Img tag should have an alt attribute * Fix H014: Found extra blank lines * Fix T003: Endblock should have name * Fix H013: Img tag should have an alt attribute * small fixes * Fix T001: Variables should be wrapped in a single whitespace * Fix T003: Endblock should have name * small fixes * fix form method * add entry to contributing * fix template changes * another fix * use current version --- .djlintrc | 3 + .github/workflows/qc_checks.yaml | 22 +- .markuplintrc | 9 - .pre-commit-config.yaml | 4 + CONTRIBUTING.md | 18 + .../build/templates/build/build_base.html | 15 +- InvenTree/build/templates/build/detail.html | 21 +- InvenTree/build/templates/build/index.html | 10 +- .../templates/company/company_base.html | 22 +- .../company/templates/company/detail.html | 6 +- .../company/templates/company/index.html | 10 +- .../templates/company/manufacturer_part.html | 19 +- .../templates/company/supplier_part.html | 28 +- .../label/templates/label/label_base.html | 6 +- .../templates/label/part/part_label.html | 9 +- .../label/part/part_label_code128.html | 9 +- .../label/templates/label/stockitem/qr.html | 9 +- .../templates/label/stocklocation/qr.html | 9 +- .../label/stocklocation/qr_and_text.html | 9 +- .../order/templates/order/order_base.html | 8 +- .../order/order_wizard/match_fields.html | 2 +- .../order/order_wizard/match_parts.html | 4 +- .../order/order_wizard/po_upload.html | 6 +- .../order/purchase_order_detail.html | 3 +- .../templates/order/purchase_orders.html | 12 +- .../templates/order/return_order_base.html | 10 +- .../templates/order/return_order_detail.html | 2 +- .../order/templates/order/return_orders.html | 7 +- .../templates/order/sales_order_base.html | 22 +- .../templates/order/sales_order_detail.html | 9 +- .../order/templates/order/sales_orders.html | 12 +- InvenTree/part/templates/part/category.html | 13 +- InvenTree/part/templates/part/copy_part.html | 2 +- .../part/templates/part/create_part.html | 2 +- InvenTree/part/templates/part/detail.html | 11 +- .../part/import_wizard/ajax_match_fields.html | 2 +- .../import_wizard/ajax_match_references.html | 2 +- .../part/import_wizard/ajax_part_upload.html | 2 +- .../part/import_wizard/match_fields.html | 2 +- .../part/import_wizard/match_references.html | 2 +- .../part/import_wizard/part_upload.html | 6 +- .../part/templates/part/part_app_base.html | 2 +- InvenTree/part/templates/part/part_base.html | 23 +- .../part/templates/part/part_pricing.html | 4 +- InvenTree/part/templates/part/part_thumb.html | 2 +- InvenTree/part/templates/part/prices.html | 1 - .../templates/part/pricing_javascript.html | 4 +- .../part/templates/part/select_image.html | 5 +- InvenTree/part/templates/part/upload_bom.html | 6 +- .../part/templates/part/variant_part.html | 2 +- .../inventree_bill_of_materials_report.html | 18 +- .../report/inventree_build_order_base.html | 14 +- .../report/inventree_order_report_base.html | 11 +- .../report/inventree_po_report_base.html | 7 +- .../report/inventree_report_base.html | 6 +- .../inventree_return_order_report_base.html | 2 +- .../report/inventree_so_report_base.html | 7 +- .../report/inventree_test_report_base.html | 18 +- InvenTree/stock/templates/stock/item.html | 6 +- .../stock/templates/stock/item_base.html | 14 +- .../stock/templates/stock/item_serialize.html | 2 +- InvenTree/stock/templates/stock/location.html | 13 +- .../stock/templates/stock/stock_app_base.html | 4 +- InvenTree/templates/403.html | 4 +- InvenTree/templates/403_csrf.html | 4 +- InvenTree/templates/404.html | 4 +- InvenTree/templates/500.html | 4 +- InvenTree/templates/503.html | 19 +- InvenTree/templates/InvenTree/index.html | 11 +- .../InvenTree/notifications/history.html | 8 +- .../InvenTree/notifications/inbox.html | 8 +- .../notifications/notifications.html | 12 +- InvenTree/templates/InvenTree/password.html | 2 +- InvenTree/templates/InvenTree/search.html | 8 +- .../templates/InvenTree/settings/barcode.html | 6 +- .../templates/InvenTree/settings/build.html | 6 +- .../InvenTree/settings/category.html | 8 +- .../templates/InvenTree/settings/global.html | 7 +- .../templates/InvenTree/settings/label.html | 6 +- .../templates/InvenTree/settings/login.html | 7 +- .../InvenTree/settings/mixins/urls.html | 6 +- .../InvenTree/settings/notifications.html | 2 +- .../templates/InvenTree/settings/part.html | 8 +- .../InvenTree/settings/part_stocktake.html | 4 +- .../templates/InvenTree/settings/plugin.html | 8 +- .../InvenTree/settings/plugin_details.html | 4 +- .../InvenTree/settings/plugin_settings.html | 15 +- .../templates/InvenTree/settings/po.html | 6 +- .../templates/InvenTree/settings/pricing.html | 4 +- .../InvenTree/settings/project_codes.html | 2 - .../templates/InvenTree/settings/report.html | 6 +- .../templates/InvenTree/settings/returns.html | 6 +- .../templates/InvenTree/settings/setting.html | 2 +- .../InvenTree/settings/setting_boolean.html | 2 +- .../InvenTree/settings/settings.html | 12 +- .../InvenTree/settings/settings_staff_js.html | 3 - .../templates/InvenTree/settings/so.html | 6 +- .../templates/InvenTree/settings/stock.html | 6 +- .../templates/InvenTree/settings/user.html | 18 +- .../InvenTree/settings/user_display.html | 10 +- .../InvenTree/settings/user_homepage.html | 6 +- .../InvenTree/settings/user_labels.html | 6 +- .../InvenTree/settings/user_reporting.html | 6 +- .../InvenTree/settings/user_search.html | 7 +- .../InvenTree/settings/user_settings.html | 6 +- InvenTree/templates/account/base.html | 12 +- .../templates/account/email_confirm.html | 5 +- InvenTree/templates/account/login.html | 8 +- InvenTree/templates/account/logout.html | 4 +- .../templates/account/password_reset.html | 6 +- .../account/password_reset_from_key.html | 6 +- InvenTree/templates/account/signup.html | 4 +- .../templates/account/signup_closed.html | 4 +- .../templates/allauth_2fa/authenticate.html | 2 +- .../templates/allauth_2fa/backup_tokens.html | 2 +- InvenTree/templates/allauth_2fa/remove.html | 2 +- InvenTree/templates/allauth_2fa/setup.html | 4 +- InvenTree/templates/barcode_data.html | 2 +- InvenTree/templates/base.html | 24 +- InvenTree/templates/email/email.html | 18 +- .../email/low_stock_notification.html | 1 - InvenTree/templates/hover_image.html | 4 +- InvenTree/templates/mail.html | 2 +- InvenTree/templates/modal_form.html | 8 +- InvenTree/templates/modals.html | 2 +- InvenTree/templates/navbar.html | 6 +- InvenTree/templates/page_base.html | 10 +- InvenTree/templates/panel.html | 12 +- .../patterns/wizard/match_fields.html | 2 +- InvenTree/templates/qr_code.html | 2 +- .../templates/registration/logged_out.html | 2 +- InvenTree/templates/sample/sample.html | 2 +- InvenTree/templates/skeleton.html | 22 +- .../socialaccount/authentication_error.html | 4 +- InvenTree/templates/socialaccount/login.html | 4 +- InvenTree/templates/socialaccount/signup.html | 4 +- .../socialaccount/snippets/provider_list.html | 12 +- InvenTree/templates/tel.html | 2 +- docs/_includes/img.html | 2 +- docs/_includes/overrides/404.html | 6 +- docs/_includes/overrides/home.html | 4 +- docs/_includes/overrides/main.html | 2 +- docs/_includes/splide_image.html | 4 +- package-lock.json | 2039 +---------------- package.json | 3 +- 145 files changed, 510 insertions(+), 2589 deletions(-) create mode 100644 .djlintrc delete mode 100644 .markuplintrc diff --git a/.djlintrc b/.djlintrc new file mode 100644 index 0000000000..58e7fe1c0d --- /dev/null +++ b/.djlintrc @@ -0,0 +1,3 @@ +{ + "ignore": "D018,H006,H008,H020,H021,H023,H025,H030,H031,T002" +} diff --git a/.github/workflows/qc_checks.yaml b/.github/workflows/qc_checks.yaml index 6084c28e55..ff8a7cc695 100644 --- a/.github/workflows/qc_checks.yaml +++ b/.github/workflows/qc_checks.yaml @@ -76,22 +76,6 @@ jobs: python InvenTree/manage.py prerender npx eslint InvenTree/InvenTree/static_i18n/i18n/*.js - html: - name: Style [HTML] - runs-on: ubuntu-20.04 - - needs: pep_style - - steps: - - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # pin@v3.1.0 - - name: Enviroment Setup - uses: ./.github/actions/setup - with: - npm: true - install: true - - name: Check HTML Files - run: npx markuplint **/templates/*.html - pre-commit: name: Style [pre-commit] runs-on: ubuntu-20.04 @@ -194,7 +178,7 @@ jobs: name: Tests - DB [SQLite] + Coverage runs-on: ubuntu-20.04 - needs: [ 'javascript', 'html', 'pre-commit' ] + needs: [ 'javascript', 'pre-commit' ] continue-on-error: true # continue if a step fails so that coverage gets pushed env: @@ -227,7 +211,7 @@ jobs: postgres: name: Tests - DB [PostgreSQL] runs-on: ubuntu-20.04 - needs: [ 'javascript', 'html', 'pre-commit' ] + needs: [ 'javascript', 'pre-commit' ] env: INVENTREE_DB_ENGINE: django.db.backends.postgresql @@ -271,7 +255,7 @@ jobs: name: Tests - DB [MySQL] runs-on: ubuntu-20.04 - needs: [ 'javascript', 'html', 'pre-commit' ] + needs: [ 'javascript', 'pre-commit' ] if: github.event_name == 'push' env: diff --git a/.markuplintrc b/.markuplintrc deleted file mode 100644 index 858d05f3b2..0000000000 --- a/.markuplintrc +++ /dev/null @@ -1,9 +0,0 @@ -{ - "overrides": { - "**/templates/*.html": { - "rules": { - "[[character-reference]]": false - } - } - } -} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9ed3e281f1..d8e11a1211 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -40,3 +40,7 @@ repos: name: pip-compile requirements.txt args: [requirements.in, -o, requirements.txt] files: ^requirements\.(in|txt)$ +- repo: https://github.com/Riverside-Healthcare/djLint + rev: v1.25.0 + hooks: + - id: djlint-django diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 1d417fdb62..0702815af2 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -128,6 +128,24 @@ The various github actions can be found in the `./github/workflows` directory Sumbitted Python code is automatically checked against PEP style guidelines. Locally you can run `invoke style` to ensure the style checks will pass, before submitting the PR. Please write docstrings for each function and class - we follow the [google doc-style](https://google.github.io/styleguide/pyguide.html#38-comments-and-docstrings) for python. Docstrings for general javascript code is encouraged! Docstyles are checked by `invoke style`. +### Django templates + +Django are checked by [djlint](https://github.com/Riverside-Healthcare/djlint) through pre-commit. + +The following rules out of the [default set](https://djlint.com/docs/linter/) are not applied: +```bash +D018: (Django) Internal links should use the {% url ... %} pattern +H006: Img tag should have height and width attributes +H008: Attributes should be double quoted +H021: Inline styles should be avoided +H023: Do not use entity references +H025: Tag seems to be an orphan +H030: Consider adding a meta description +H031: Consider adding meta keywords +T002: Double quotes should be used in tags +``` + + ## Documentation New features or updates to existing features should be accompanied by user documentation. diff --git a/InvenTree/build/templates/build/build_base.html b/InvenTree/build/templates/build/build_base.html index f0aff38766..fecc6638f6 100644 --- a/InvenTree/build/templates/build/build_base.html +++ b/InvenTree/build/templates/build/build_base.html @@ -7,7 +7,7 @@ {% block page_title %} {% inventree_title %} | {% trans "Build Order" %} - {{ build }} -{% endblock %} +{% endblock page_title %} {% block breadcrumbs %} @@ -25,7 +25,7 @@ src="{% static 'img/blank_image.png' %}" {% block heading %} {% trans "Build Order" %} {{ build }} -{% endblock %} +{% endblock heading %} {% block actions %} @@ -147,7 +147,7 @@ src="{% static 'img/blank_image.png' %}" {% endif %} {% endif %} -{% endblock %} +{% endblock details %} {% block details_right %} @@ -219,7 +219,7 @@ src="{% static 'img/blank_image.png' %}" {% endif %}
-{% endblock %} +{% endblock details_right %} {% block page_data %}

@@ -231,8 +231,7 @@ src="{% static 'img/blank_image.png' %}"

{{ build.title }}

- -{% endblock %} +{% endblock page_data %} {% block js_ready %} @@ -288,7 +287,7 @@ src="{% static 'img/blank_image.png' %}" $('#show-qr-code').click(function() { showQRDialog( '{% trans "Build Order QR Code" %}', - '{"build": {{ build.pk }}}' + '{"build": {{ build.pk }} }' ); }); @@ -312,4 +311,4 @@ src="{% static 'img/blank_image.png' %}" {% endif %} {% endif %} -{% endblock %} +{% endblock js_ready %} diff --git a/InvenTree/build/templates/build/detail.html b/InvenTree/build/templates/build/detail.html index 9e4d7c1afb..2e727b4014 100644 --- a/InvenTree/build/templates/build/detail.html +++ b/InvenTree/build/templates/build/detail.html @@ -6,7 +6,7 @@ {% block sidebar %} {% include "build/sidebar.html" %} -{% endblock %} +{% endblock sidebar %} {% block page_content %} @@ -22,12 +22,12 @@ {% trans "Description" %} - {{ build.title }}{% include "clip.html"%} + {{ build.title }}{% include "clip.html" %} {% trans "Part" %} - {{ build.part.full_name }}{% include "clip.html"%} + {{ build.part.full_name }}{% include "clip.html" %} @@ -38,7 +38,7 @@ {% trans "Stock Source" %} {% if build.take_from %} - {{ build.take_from }}{% include "clip.html"%} + {{ build.take_from }}{% include "clip.html" %} {% else %} {% trans "Stock can be taken from any available location." %} {% endif %} @@ -51,7 +51,7 @@ {% if build.destination %} {{ build.destination }} - {% include "clip.html"%} + {% include "clip.html" %} {% else %} {% trans "Destination location not specified" %} {% endif %} @@ -78,14 +78,14 @@ {% trans "Batch" %} - {{ build.batch }}{% include "clip.html"%} + {{ build.batch }}{% include "clip.html" %} {% endif %} {% if build.parent %} {% trans "Parent Build" %} - {{ build.parent }}{% include "clip.html"%} + {{ build.parent }}{% include "clip.html" %} {% endif %} {% if build.priority != 0 %} @@ -99,7 +99,7 @@ {% trans "Sales Order" %} - {{ build.sales_order }}{% include "clip.html"%} + {{ build.sales_order }}{% include "clip.html" %} {% endif %} {% if build.link %} @@ -319,8 +319,7 @@ - -{% endblock %} +{% endblock page_content %} {% block js_ready %} {{ block.super }} @@ -519,4 +518,4 @@ $('#allocate-selected-items').click(function() { enableSidebar('buildorder'); -{% endblock %} +{% endblock js_ready %} diff --git a/InvenTree/build/templates/build/index.html b/InvenTree/build/templates/build/index.html index 6f08348f44..5094c6a45a 100644 --- a/InvenTree/build/templates/build/index.html +++ b/InvenTree/build/templates/build/index.html @@ -6,11 +6,11 @@ {% block page_title %} {% inventree_title %} | {% trans "Build Orders" %} -{% endblock %} +{% endblock page_title %} {% block heading %} {% trans "Build Orders" %} -{% endblock %} +{% endblock heading %} {% block actions %} {% if roles.build.add %} @@ -18,7 +18,7 @@ {% trans "New Build Order" %} {% endif %} -{% endblock %} +{% endblock actions %} {% block page_info %} @@ -35,7 +35,7 @@ -{% endblock %} +{% endblock page_info %} {% block js_ready %} {{ block.super }} @@ -48,4 +48,4 @@ loadBuildTable($("#build-table"), { locale: '{{ request.LANGUAGE_CODE }}', }); -{% endblock %} +{% endblock js_ready %} diff --git a/InvenTree/company/templates/company/company_base.html b/InvenTree/company/templates/company/company_base.html index 2bf017b506..7953635671 100644 --- a/InvenTree/company/templates/company/company_base.html +++ b/InvenTree/company/templates/company/company_base.html @@ -6,11 +6,11 @@ {% block page_title %} {% inventree_title %} | {% trans "Company" %} - {{ company.name }} -{% endblock %} +{% endblock page_title %} {% block heading %} {% trans "Company" %}: {{ company.name }} -{% endblock %} +{% endblock heading %} {% block actions %} @@ -45,7 +45,7 @@ {% block thumbnail %}
- {% trans 'Part image' %}
-{% endblock %} +{% endblock thumbnail %} {% block details %} @@ -74,7 +74,7 @@ - + @@ -89,7 +89,7 @@
{%trans "Manufacturer" %}{% trans "Manufacturer" %} {% include "yesnolabel.html" with value=company.is_manufacturer %}
-{% endblock %} +{% endblock details %} {% block details_right %} @@ -99,7 +99,7 @@ {% trans "Website" %} - {{ company.website }}{% include "clip.html"%} + {{ company.website }}{% include "clip.html" %} {% endif %} @@ -117,7 +117,7 @@ {% trans "Address" %} - {{ company.address }}{% include "clip.html"%} + {{ company.address }}{% include "clip.html" %} {% endif %} {% if company.phone %} @@ -138,11 +138,11 @@ {% trans "Contact" %} - {{ company.contact }}{% include "clip.html"%} + {{ company.contact }}{% include "clip.html" %} {% endif %} -{% endblock %} +{% endblock details_right %} {% block js_ready %} {{ block.super }} @@ -262,4 +262,4 @@ }); } -{% endblock %} +{% endblock js_ready %} diff --git a/InvenTree/company/templates/company/detail.html b/InvenTree/company/templates/company/detail.html index 0f3bc6e203..513aaff775 100644 --- a/InvenTree/company/templates/company/detail.html +++ b/InvenTree/company/templates/company/detail.html @@ -5,7 +5,7 @@ {% block sidebar %} {% include 'company/sidebar.html' %} -{% endblock %} +{% endblock sidebar %} {% block page_content %} @@ -270,7 +270,7 @@ -{% endblock %} +{% endblock page_content %} {% block js_ready %} {{ block.super }} @@ -542,4 +542,4 @@ enableSidebar('company'); -{% endblock %} +{% endblock js_ready %} diff --git a/InvenTree/company/templates/company/index.html b/InvenTree/company/templates/company/index.html index f9790a9a1d..b255137114 100644 --- a/InvenTree/company/templates/company/index.html +++ b/InvenTree/company/templates/company/index.html @@ -6,11 +6,11 @@ {% block page_title %} {% inventree_title %} | {% trans "Supplier List" %} -{% endblock %} +{% endblock page_title %} {% block heading %} {{ title }} -{% endblock %} +{% endblock heading %} {% block actions %} {% if pagetype == 'manufacturers' and roles.purchase_order.add or pagetype == 'suppliers' and roles.purchase_order.add or pagetype == 'customers' and roles.sales_order.add %} @@ -18,7 +18,7 @@ {{ button_text }} {% endif %} -{% endblock %} +{% endblock actions %} {% block page_info %} @@ -32,7 +32,7 @@ -{% endblock %} +{% endblock page_info %} {% block js_ready %} {{ block.super }} @@ -59,4 +59,4 @@ } ); -{% endblock %} +{% endblock js_ready %} diff --git a/InvenTree/company/templates/company/manufacturer_part.html b/InvenTree/company/templates/company/manufacturer_part.html index 50663c620f..c26e828558 100644 --- a/InvenTree/company/templates/company/manufacturer_part.html +++ b/InvenTree/company/templates/company/manufacturer_part.html @@ -5,7 +5,7 @@ {% block page_title %} {% inventree_title %} | {% trans "Manufacturer Part" %} -{% endblock %} +{% endblock page_title %} {% block sidebar %} {% include "company/manufacturer_part_sidebar.html" %} @@ -48,7 +48,7 @@ {% endblock actions %} {% block thumbnail %} -{% trans 'Part image' %}{% trans "Internal Part" %} {% if part.part %} - {{ part.part.full_name }}{% include "clip.html"%} + {{ part.part.full_name }}{% include "clip.html" %} {% endif %} @@ -73,7 +73,7 @@ src="{% static 'img/blank_image.png' %}" {% trans "Description" %} - {{ part.description }}{% include "clip.html"%} + {{ part.description }}{% include "clip.html" %} {% endif %} @@ -90,7 +90,7 @@ src="{% static 'img/blank_image.png' %}" {% trans "Manufacturer" %} {% if part.manufacturer %} - {{ part.manufacturer.name }}{% include "clip.html"%} + {{ part.manufacturer.name }}{% include "clip.html" %} {% else %} {% trans "No manufacturer information available" %} {% endif %} @@ -99,7 +99,7 @@ src="{% static 'img/blank_image.png' %}" {% trans "MPN" %} - {{ part.MPN }}{% include "clip.html"%} + {{ part.MPN }}{% include "clip.html" %} {% if part.link %} @@ -191,8 +191,7 @@ src="{% static 'img/blank_image.png' %}" -{% endblock %} - +{% endblock page_content %} {% block js_ready %} {{ block.super }} @@ -325,7 +324,7 @@ $('#delete-part').click(function() { success: function() { {% if part.manufacturer %} window.location.href = "{% url 'company-detail' part.manufacturer.id %}"; - {% else%} + {% else %} window.location.href = "{% url 'index' %}"; {% endif %} } @@ -338,4 +337,4 @@ $('#delete-part').click(function() { enableSidebar('manufacturerpart'); -{% endblock %} +{% endblock js_ready %} diff --git a/InvenTree/company/templates/company/supplier_part.html b/InvenTree/company/templates/company/supplier_part.html index 90f85faed8..87fc1f0f10 100644 --- a/InvenTree/company/templates/company/supplier_part.html +++ b/InvenTree/company/templates/company/supplier_part.html @@ -81,13 +81,13 @@ {% endblock actions %} {% block thumbnail %} -{% trans 'Part image' %} -{% endblock %} +{% endblock thumbnail %} {% block details %} @@ -98,7 +98,7 @@ src="{% static 'img/blank_image.png' %}" {% trans "Internal Part" %} {% if part.part %} - {{ part.part.full_name }}{% include "clip.html"%} + {{ part.part.full_name }}{% include "clip.html" %} {% endif %} @@ -106,7 +106,7 @@ src="{% static 'img/blank_image.png' %}" {% trans "Description" %} - {{ part.description }}{% include "clip.html"%} + {{ part.description }}{% include "clip.html" %} {% endif %} {% if part.availability_updated %} @@ -129,7 +129,7 @@ src="{% static 'img/blank_image.png' %}" {% trans "Supplier" %} {% if part.supplier %} - {{ part.supplier.name }}{% include "clip.html"%} + {{ part.supplier.name }}{% include "clip.html" %} {% else %} {% trans "No supplier information available" %} {% endif %} @@ -138,28 +138,28 @@ src="{% static 'img/blank_image.png' %}" {% trans "SKU" %} - {{ part.SKU }}{% include "clip.html"%} + {{ part.SKU }}{% include "clip.html" %} {% if part.manufacturer_part.manufacturer %} {% trans "Manufacturer" %} - {{ part.manufacturer_part.manufacturer.name }}{% include "clip.html"%} + {{ part.manufacturer_part.manufacturer.name }}{% include "clip.html" %} {% endif %} {% if part.manufacturer_part.MPN %} {% trans "MPN" %} - {{ part.manufacturer_part.MPN }}{% include "clip.html"%} + {{ part.manufacturer_part.MPN }}{% include "clip.html" %} {% endif %} {% if part.packaging %} {% trans "Packaging" %} - {{ part.packaging }}{% include "clip.html"%} + {{ part.packaging }}{% include "clip.html" %} {% endif %} {% if part.pack_size != 1.0 %} @@ -173,7 +173,7 @@ src="{% static 'img/blank_image.png' %}" {% trans "Note" %} - {{ part.note }}{% include "clip.html"%} + {{ part.note }}{% include "clip.html" %} {% endif %} {% if part.link %} @@ -184,7 +184,7 @@ src="{% static 'img/blank_image.png' %}" {% endif %} -{% endblock %} +{% endblock details_right %} {% block page_content %} @@ -256,7 +256,7 @@ src="{% static 'img/blank_image.png' %}" -{% endblock %} +{% endblock page_content %} {% block js_ready %} {{ block.super }} @@ -266,7 +266,7 @@ src="{% static 'img/blank_image.png' %}" $("#show-qr-code").click(function() { showQRDialog( '{% trans "Supplier Part QR Code" %}', - '{"supplierpart": {{ part.pk }}}' + '{"supplierpart": {{ part.pk }} }' ); }); @@ -397,4 +397,4 @@ $('#delete-part').click(function() { enableSidebar('supplierpart'); -{% endblock %} +{% endblock js_ready %} diff --git a/InvenTree/label/templates/label/label_base.html b/InvenTree/label/templates/label/label_base.html index 79913c946f..6ee1c42575 100644 --- a/InvenTree/label/templates/label/label_base.html +++ b/InvenTree/label/templates/label/label_base.html @@ -10,7 +10,7 @@ {% endlocalize %} {% block margin %} margin: 0mm; - {% endblock %} + {% endblock margin %} } body { @@ -35,7 +35,7 @@ {% block style %} /* User-defined styles can go here */ - {% endblock %} + {% endblock style %} @@ -44,6 +44,6 @@
{% block content %} - {% endblock %} + {% endblock content %}
diff --git a/InvenTree/label/templates/label/part/part_label.html b/InvenTree/label/templates/label/part/part_label.html index ba7b3c148b..ef4af6be41 100644 --- a/InvenTree/label/templates/label/part/part_label.html +++ b/InvenTree/label/templates/label/part/part_label.html @@ -1,7 +1,6 @@ {% extends "label/label_base.html" %} -{% load l10n %} -{% load barcode %} +{% load l10n i18n barcode %} {% block style %} @@ -25,14 +24,14 @@ top: 2mm; } -{% endblock %} +{% endblock style %} {% block content %} - +{% trans 'QC Code' %}
{{ part.full_name }}
-{% endblock %} +{% endblock content %} diff --git a/InvenTree/label/templates/label/part/part_label_code128.html b/InvenTree/label/templates/label/part/part_label_code128.html index 088eed0555..982baf4422 100644 --- a/InvenTree/label/templates/label/part/part_label_code128.html +++ b/InvenTree/label/templates/label/part/part_label_code128.html @@ -1,7 +1,6 @@ {% extends "label/label_base.html" %} -{% load l10n %} -{% load barcode %} +{% load l10n i18n barcode %} {% block style %} @@ -25,14 +24,14 @@ top: 2mm; } -{% endblock %} +{% endblock style %} {% block content %} - +{% trans "QR code" %}
{{ part.full_name }}
-{% endblock %} +{% endblock content %} diff --git a/InvenTree/label/templates/label/stockitem/qr.html b/InvenTree/label/templates/label/stockitem/qr.html index ba0de3a4ec..3a67a7793d 100644 --- a/InvenTree/label/templates/label/stockitem/qr.html +++ b/InvenTree/label/templates/label/stockitem/qr.html @@ -1,7 +1,6 @@ {% extends "label/label_base.html" %} -{% load l10n %} -{% load barcode %} +{% load l10n i18n barcode %} {% block style %} @@ -15,9 +14,9 @@ {% endlocalize %} } -{% endblock %} +{% endblock style %} {% block content %} - -{% endblock %} +{% trans 'QC Code' %} +{% endblock content %} diff --git a/InvenTree/label/templates/label/stocklocation/qr.html b/InvenTree/label/templates/label/stocklocation/qr.html index ba0de3a4ec..3a67a7793d 100644 --- a/InvenTree/label/templates/label/stocklocation/qr.html +++ b/InvenTree/label/templates/label/stocklocation/qr.html @@ -1,7 +1,6 @@ {% extends "label/label_base.html" %} -{% load l10n %} -{% load barcode %} +{% load l10n i18n barcode %} {% block style %} @@ -15,9 +14,9 @@ {% endlocalize %} } -{% endblock %} +{% endblock style %} {% block content %} - -{% endblock %} +{% trans 'QC Code' %} +{% endblock content %} diff --git a/InvenTree/label/templates/label/stocklocation/qr_and_text.html b/InvenTree/label/templates/label/stocklocation/qr_and_text.html index 86466a44bd..aa18b3d332 100644 --- a/InvenTree/label/templates/label/stocklocation/qr_and_text.html +++ b/InvenTree/label/templates/label/stocklocation/qr_and_text.html @@ -1,7 +1,6 @@ {% extends "label/label_base.html" %} -{% load l10n %} -{% load barcode %} +{% load l10n i18n barcode %} {% block style %} @@ -25,14 +24,14 @@ top: 2mm; } -{% endblock %} +{% endblock style %} {% block content %} - +{% trans 'QR code' %}
{{ location.name }}
-{% endblock %} +{% endblock content %} diff --git a/InvenTree/order/templates/order/order_base.html b/InvenTree/order/templates/order/order_base.html index 6890ce7858..3c703bb2ae 100644 --- a/InvenTree/order/templates/order/order_base.html +++ b/InvenTree/order/templates/order/order_base.html @@ -108,7 +108,7 @@ src="{% static 'img/blank_image.png' %}" {% trans "Order Reference" %} - {{ order.reference }}{% include "clip.html"%} + {{ order.reference }}{% include "clip.html" %} @@ -140,7 +140,7 @@ src="{% static 'img/blank_image.png' %}" {% trans "Supplier" %} {% if order.supplier %} - {{ order.supplier.name }}{% include "clip.html"%} + {{ order.supplier.name }}{% include "clip.html" %} {% else %} {% trans "No suppplier information available" %} {% endif %} @@ -150,7 +150,7 @@ src="{% static 'img/blank_image.png' %}" {% trans "Supplier Reference" %} - {{ order.supplier_reference }}{% include "clip.html"%} + {{ order.supplier_reference }}{% include "clip.html" %} {% endif %} @@ -329,7 +329,7 @@ $("#export-order").click(function() { $('#show-qr-code').click(function() { showQRDialog( '{% trans "Purchase Order QR Code" %}', - '{"purchaseorder": {{ order.pk }}}' + '{"purchaseorder": {{ order.pk }} }' ); }); diff --git a/InvenTree/order/templates/order/order_wizard/match_fields.html b/InvenTree/order/templates/order/order_wizard/match_fields.html index 288ddb21eb..f1d7a71f74 100644 --- a/InvenTree/order/templates/order/order_wizard/match_fields.html +++ b/InvenTree/order/templates/order/order_wizard/match_fields.html @@ -96,4 +96,4 @@ $('.fieldselect').select2({ matcher: partialMatcher, }); -{% endblock %} +{% endblock js_ready %} diff --git a/InvenTree/order/templates/order/order_wizard/match_parts.html b/InvenTree/order/templates/order/order_wizard/match_parts.html index 4f22ac124d..5615dd986f 100644 --- a/InvenTree/order/templates/order/order_wizard/match_parts.html +++ b/InvenTree/order/templates/order/order_wizard/match_parts.html @@ -44,7 +44,7 @@ - {% comment %} Dummy row for javascript del_row method {% endcomment %} + {% comment %} Dummy row for javascript del_row method {% endcomment %} {% for row in rows %} @@ -123,4 +123,4 @@ $('.currencyselect').select2({ dropdownAutoWidth: true, }); -{% endblock %} +{% endblock js_ready %} diff --git a/InvenTree/order/templates/order/order_wizard/po_upload.html b/InvenTree/order/templates/order/order_wizard/po_upload.html index 6683fabdf1..b5d4b681bc 100644 --- a/InvenTree/order/templates/order/order_wizard/po_upload.html +++ b/InvenTree/order/templates/order/order_wizard/po_upload.html @@ -7,7 +7,7 @@ {% url "po-detail" order.id as url %} {% trans "Return to Orders" as text %} {% include "sidebar_item.html" with url=url text=text icon="fa-undo" %} -{% endblock %} +{% endblock sidebar %} {% block page_content %} {% trans "Upload File for Purchase Order" as header_text %} @@ -60,9 +60,9 @@ {% endwith %} -{% endblock %} +{% endblock page_content %} {% block js_ready %} {{ block.super }} -{% endblock %} +{% endblock js_ready %} diff --git a/InvenTree/order/templates/order/purchase_order_detail.html b/InvenTree/order/templates/order/purchase_order_detail.html index 0e5839c6b5..f6cf72643d 100644 --- a/InvenTree/order/templates/order/purchase_order_detail.html +++ b/InvenTree/order/templates/order/purchase_order_detail.html @@ -5,7 +5,6 @@ {% load i18n %} {% load static %} - {% block sidebar %} {% include 'order/po_sidebar.html' %} {% endblock sidebar %} @@ -264,4 +263,4 @@ loadOrderTotal( enableSidebar('purchaseorder'); -{% endblock %} +{% endblock js_ready %} diff --git a/InvenTree/order/templates/order/purchase_orders.html b/InvenTree/order/templates/order/purchase_orders.html index e60f015fa6..23b56baee1 100644 --- a/InvenTree/order/templates/order/purchase_orders.html +++ b/InvenTree/order/templates/order/purchase_orders.html @@ -6,11 +6,11 @@ {% block page_title %} {% inventree_title %} | {% trans "Purchase Orders" %} -{% endblock %} +{% endblock page_title %} {% block heading %} {% trans "Purchase Orders" %} -{% endblock %} +{% endblock heading %} {% block actions %} {% if roles.purchase_order.add %} @@ -18,7 +18,7 @@ {% trans "New Purchase Order" %} {% endif %} -{% endblock %} +{% endblock actions %} {% block page_info %} @@ -38,12 +38,12 @@ -{% endblock %} +{% endblock page_info %} {% block js_load %} {{ block.super }} -{% endblock %} +{% endblock js_load %} {% block js_ready %} {{ block.super }} @@ -56,4 +56,4 @@ loadPurchaseOrderTable("#purchase-order-table", { url: "{% url 'api-po-list' %}", }); -{% endblock %} +{% endblock js_ready %} diff --git a/InvenTree/order/templates/order/return_order_base.html b/InvenTree/order/templates/order/return_order_base.html index 990d5cd5c0..f908d3baf8 100644 --- a/InvenTree/order/templates/order/return_order_base.html +++ b/InvenTree/order/templates/order/return_order_base.html @@ -22,7 +22,7 @@ src="{{ order.customer.image.url }}" src="{% static 'img/blank_image.png' %}" {% endif %} /> -{% endblock thumbnail%} +{% endblock thumbnail %} {% block heading %} {% trans "Return Order" %} {{ order.reference }} @@ -100,7 +100,7 @@ src="{% static 'img/blank_image.png' %}" {% trans "Order Reference" %} - {{ order.reference }}{% include "clip.html"%} + {{ order.reference }}{% include "clip.html" %} @@ -130,14 +130,14 @@ src="{% static 'img/blank_image.png' %}" {% trans "Customer" %} - {{ order.customer.name }}{% include "clip.html"%} + {{ order.customer.name }}{% include "clip.html" %} {% endif %} {% if order.customer_reference %} {% trans "Customer Reference" %} - {{ order.customer_reference }}{% include "clip.html"%} + {{ order.customer_reference }}{% include "clip.html" %} {% endif %} {% if order.link %} @@ -255,7 +255,7 @@ $('#print-order-report').click(function() { $('#show-qr-code').click(function() { showQRDialog( '{% trans "Return Order QR Code" %}', - '{"returnorder": {{ order.pk }}}' + '{"returnorder": {{ order.pk }} }' ); }); diff --git a/InvenTree/order/templates/order/return_order_detail.html b/InvenTree/order/templates/order/return_order_detail.html index e57896ec41..56a943308f 100644 --- a/InvenTree/order/templates/order/return_order_detail.html +++ b/InvenTree/order/templates/order/return_order_detail.html @@ -6,7 +6,7 @@ {% load static %} {% block sidebar %} -{% include "order/return_order_sidebar.html" %} +{% include "order/return_order_sidebar.html" %} {% endblock sidebar %} {% block page_content %} diff --git a/InvenTree/order/templates/order/return_orders.html b/InvenTree/order/templates/order/return_orders.html index e364214c85..698b682be0 100644 --- a/InvenTree/order/templates/order/return_orders.html +++ b/InvenTree/order/templates/order/return_orders.html @@ -6,15 +6,14 @@ {% block page_title %} {% inventree_title %} | {% trans "Return Orders" %} -{% endblock %} +{% endblock page_title %} {% block breadcrumb_list %} -{% endblock %} +{% endblock breadcrumb_list %} {% block heading %} {% trans "Return Orders" %} -{% endblock %} - +{% endblock heading %} {% block actions %} {% if roles.return_order.add %} diff --git a/InvenTree/order/templates/order/sales_order_base.html b/InvenTree/order/templates/order/sales_order_base.html index c78d3e5391..c64c45d614 100644 --- a/InvenTree/order/templates/order/sales_order_base.html +++ b/InvenTree/order/templates/order/sales_order_base.html @@ -7,12 +7,12 @@ {% block page_title %} {% inventree_title %} | {% trans "Sales Order" %} -{% endblock %} +{% endblock page_title %} {% block breadcrumbs %} -{% endblock %} +{% endblock breadcrumbs %} {% block thumbnail %} -{% endblock %} +{% endblock thumbnail %} {% block heading %} {% trans "Sales Order" %} {{ order.reference }} -{% endblock %} +{% endblock heading %} {% block actions %} {% if user.is_staff and roles.sales_order.change %} @@ -105,7 +105,7 @@ src="{% static 'img/blank_image.png' %}" {% trans "Order Reference" %} - {{ order.reference }}{% include "clip.html"%} + {{ order.reference }}{% include "clip.html" %} @@ -134,7 +134,7 @@ src="{% static 'img/blank_image.png' %}" {% endif %} -{% endblock %} +{% endblock details %} {% block details_right %} @@ -143,14 +143,14 @@ src="{% static 'img/blank_image.png' %}" - + {% endif %} {% if order.customer_reference %} - + {% endif %} @@ -238,7 +238,7 @@ src="{% static 'img/blank_image.png' %}"
{% trans "Customer" %}{{ order.customer.name }}{% include "clip.html"%}{{ order.customer.name }}{% include "clip.html" %}
{% trans "Customer Reference" %}{{ order.customer_reference }}{% include "clip.html"%}{{ order.customer_reference }}{% include "clip.html" %}
-{% endblock %} +{% endblock details_right %} {% block js_ready %} {{ block.super }} @@ -304,7 +304,7 @@ $('#print-order-report').click(function() { $('#show-qr-code').click(function() { showQRDialog( '{% trans "Sales Order QR Code" %}', - '{"salesorder": {{ order.pk }}}' + '{"salesorder": {{ order.pk }} }' ); }); @@ -332,4 +332,4 @@ $('#export-order').click(function() { exportOrder('{% url "so-export" order.id %}'); }); -{% endblock %} +{% endblock js_ready %} diff --git a/InvenTree/order/templates/order/sales_order_detail.html b/InvenTree/order/templates/order/sales_order_detail.html index 055f85f046..ede1e30711 100644 --- a/InvenTree/order/templates/order/sales_order_detail.html +++ b/InvenTree/order/templates/order/sales_order_detail.html @@ -6,8 +6,8 @@ {% load static %} {% block sidebar %} -{% include "order/so_sidebar.html" %} -{% endblock %} +{% include "order/so_sidebar.html" %} +{% endblock sidebar %} {% block page_content %} {% settings_value "SALESORDER_EDIT_COMPLETED_ORDERS" as allow_extra_editing %} @@ -158,7 +158,7 @@ -{% endblock %} +{% endblock page_content %} {% block js_ready %} {{ block.super }} @@ -297,7 +297,6 @@ }); }); - loadOrderTotal( '#soTotalPrice', { @@ -307,4 +306,4 @@ enableSidebar('salesorder'); -{% endblock %} +{% endblock js_ready %} diff --git a/InvenTree/order/templates/order/sales_orders.html b/InvenTree/order/templates/order/sales_orders.html index 99e53f1a0e..86c64fbe54 100644 --- a/InvenTree/order/templates/order/sales_orders.html +++ b/InvenTree/order/templates/order/sales_orders.html @@ -6,14 +6,14 @@ {% block page_title %} {% inventree_title %} | {% trans "Sales Orders" %} -{% endblock %} +{% endblock page_title %} {% block breadcrumb_list %} -{% endblock %} +{% endblock breadcrumb_list %} {% block heading %} {% trans "Sales Orders" %} -{% endblock %} +{% endblock heading %} {% block actions %} {% if roles.sales_order.add %} @@ -21,7 +21,7 @@ {% trans "New Sales Order" %} {% endif %} -{% endblock %} +{% endblock actions %} {% block page_info %} @@ -40,7 +40,7 @@
-{% endblock %} +{% endblock page_info %} {% block js_ready %} {{ block.super }} @@ -53,4 +53,4 @@ $("#so-create").click(function() { createSalesOrder(); }); -{% endblock %} +{% endblock js_ready %} diff --git a/InvenTree/part/templates/part/category.html b/InvenTree/part/templates/part/category.html index 839ffe4233..2c36111310 100644 --- a/InvenTree/part/templates/part/category.html +++ b/InvenTree/part/templates/part/category.html @@ -5,7 +5,7 @@ {% block sidebar %} {% include 'part/category_sidebar.html' %} -{% endblock %} +{% endblock sidebar %} {% block breadcrumb_tree %} @@ -22,7 +22,7 @@ {% else %} {% trans "Parts" %} {% endif %} -{% endblock %} +{% endblock heading %} {% block actions %} {% if category and user.is_staff and roles.part_category.change %} @@ -69,7 +69,7 @@ {% endif %} {% endif %} -{% endblock %} +{% endblock actions %} {% block details_left %} @@ -245,11 +245,11 @@ -{% endblock %} +{% endblock page_content %} {% block js_load %} {{ block.super }} -{% endblock %} +{% endblock js_load %} {% block js_ready %} {{ block.super }} @@ -352,7 +352,6 @@ editCategory({{ category.pk }}); }); - $('#cat-delete').click(function() { deletePartCategory({{ category.pk }}, { {% if category.parent %} @@ -384,4 +383,4 @@ // Enable left-hand navigation sidebar enableSidebar('category'); -{% endblock %} +{% endblock js_ready %} diff --git a/InvenTree/part/templates/part/copy_part.html b/InvenTree/part/templates/part/copy_part.html index 49a45f5b3a..92f0c789aa 100644 --- a/InvenTree/part/templates/part/copy_part.html +++ b/InvenTree/part/templates/part/copy_part.html @@ -22,4 +22,4 @@ {% endif %} -{% endblock %} +{% endblock pre_form_content %} diff --git a/InvenTree/part/templates/part/create_part.html b/InvenTree/part/templates/part/create_part.html index 4aed2bbd48..998ec2ae6e 100644 --- a/InvenTree/part/templates/part/create_part.html +++ b/InvenTree/part/templates/part/create_part.html @@ -21,4 +21,4 @@ {% endif %} -{% endblock %} +{% endblock pre_form_content %} diff --git a/InvenTree/part/templates/part/detail.html b/InvenTree/part/templates/part/detail.html index 01831d62d5..c4018e3055 100644 --- a/InvenTree/part/templates/part/detail.html +++ b/InvenTree/part/templates/part/detail.html @@ -6,7 +6,7 @@ {% block sidebar %} {% include 'part/part_sidebar.html' %} -{% endblock %} +{% endblock sidebar %} {% block breadcrumb_tree %} @@ -431,11 +431,11 @@ -{% endblock %} +{% endblock page_content %} {% block js_load %} {{ block.super }} -{% endblock %} +{% endblock js_load %} {% block js_ready %} {{ block.super }} @@ -733,7 +733,7 @@ $('#new-variant').click(function() { duplicatePart( - {{ part.pk}}, + {{ part.pk }}, { variant: true, } @@ -757,7 +757,6 @@ }); }); - $("#part-order2").click(function() { inventreeGet( '{% url "api-part-detail" part.pk %}', @@ -926,4 +925,4 @@ } }); -{% endblock %} +{% endblock js_ready %} diff --git a/InvenTree/part/templates/part/import_wizard/ajax_match_fields.html b/InvenTree/part/templates/part/import_wizard/ajax_match_fields.html index 380fe0a12e..3d31911570 100644 --- a/InvenTree/part/templates/part/import_wizard/ajax_match_fields.html +++ b/InvenTree/part/templates/part/import_wizard/ajax_match_fields.html @@ -86,4 +86,4 @@ $('.fieldselect').select2({ matcher: partialMatcher, }); -{% endblock %} +{% endblock js_ready %} diff --git a/InvenTree/part/templates/part/import_wizard/ajax_match_references.html b/InvenTree/part/templates/part/import_wizard/ajax_match_references.html index 405a21e845..c773bb01a3 100644 --- a/InvenTree/part/templates/part/import_wizard/ajax_match_references.html +++ b/InvenTree/part/templates/part/import_wizard/ajax_match_references.html @@ -81,4 +81,4 @@ $('.currencyselect').select2({ dropdownAutoWidth: true, }); -{% endblock %} +{% endblock js_ready %} diff --git a/InvenTree/part/templates/part/import_wizard/ajax_part_upload.html b/InvenTree/part/templates/part/import_wizard/ajax_part_upload.html index 86303c1002..ad3dbf0df0 100644 --- a/InvenTree/part/templates/part/import_wizard/ajax_part_upload.html +++ b/InvenTree/part/templates/part/import_wizard/ajax_part_upload.html @@ -30,4 +30,4 @@ {% endif %} -{% endblock %} +{% endblock form %} diff --git a/InvenTree/part/templates/part/import_wizard/match_fields.html b/InvenTree/part/templates/part/import_wizard/match_fields.html index c1d802e9ee..77d364f445 100644 --- a/InvenTree/part/templates/part/import_wizard/match_fields.html +++ b/InvenTree/part/templates/part/import_wizard/match_fields.html @@ -96,4 +96,4 @@ $('.fieldselect').select2({ matcher: partialMatcher, }); -{% endblock %} +{% endblock js_ready %} diff --git a/InvenTree/part/templates/part/import_wizard/match_references.html b/InvenTree/part/templates/part/import_wizard/match_references.html index ece8211c1e..fff58924fa 100644 --- a/InvenTree/part/templates/part/import_wizard/match_references.html +++ b/InvenTree/part/templates/part/import_wizard/match_references.html @@ -88,4 +88,4 @@ $('.currencyselect').select2({ dropdownAutoWidth: true, }); -{% endblock %} +{% endblock js_ready %} diff --git a/InvenTree/part/templates/part/import_wizard/part_upload.html b/InvenTree/part/templates/part/import_wizard/part_upload.html index d32b2ea5bc..7c4050766f 100644 --- a/InvenTree/part/templates/part/import_wizard/part_upload.html +++ b/InvenTree/part/templates/part/import_wizard/part_upload.html @@ -7,7 +7,7 @@ {% url 'part-index' as url %} {% trans "Return to Parts" as text %} {% include "sidebar_link.html" with url=url text=text icon="fa-undo" %} -{% endblock %} +{% endblock sidebar %} {% block content %} {% trans "Import Parts from File" as header_text %} @@ -66,7 +66,7 @@ {% endif %} -{% endblock %} +{% endblock content %} {% block js_ready %} {{ block.super }} @@ -113,4 +113,4 @@ function downloadPartImportTemplate(options={}) { }); } -{% endblock %} +{% endblock js_ready %} diff --git a/InvenTree/part/templates/part/part_app_base.html b/InvenTree/part/templates/part/part_app_base.html index c7b38f9cc2..fbb06b2aef 100644 --- a/InvenTree/part/templates/part/part_app_base.html +++ b/InvenTree/part/templates/part/part_app_base.html @@ -11,7 +11,7 @@ {% else %} {% inventree_title %} | {% trans "Part List" %} {% endif %} -{% endblock %} +{% endblock page_title %} {% block breadcrumbs %} diff --git a/InvenTree/part/templates/part/part_base.html b/InvenTree/part/templates/part/part_base.html index 208dc8404a..5e26f6d020 100644 --- a/InvenTree/part/templates/part/part_base.html +++ b/InvenTree/part/templates/part/part_base.html @@ -6,15 +6,15 @@ {% block sidebar %} {% include "part/part_sidebar.html" %} -{% endblock %} +{% endblock sidebar %} {% block thumbnail %} {% include "part/part_thumb.html" %} -{% endblock %} +{% endblock thumbnail %} {% block heading %} {{ part.full_name }} -{% endblock %} +{% endblock heading %} {% block actions %} @@ -104,7 +104,7 @@ {% endif %} -{% endblock %} +{% endblock actions %} {% block details %} @@ -170,7 +170,7 @@ - + {% if part.variant_of %} @@ -269,7 +269,7 @@ - + {% endif %} {% settings_value "PART_ENABLE_REVISION" as show_revision %} @@ -277,7 +277,7 @@ - + {% endif %} {% if part.units %} @@ -298,7 +298,7 @@ - + {% endif %} {% include "barcode_data.html" with instance=part %} @@ -444,7 +444,7 @@ $("#show-qr-code").click(function() { showQRDialog( '{% trans "Part QR Code" %}', - '{"part": {{ part.pk }}}', + '{"part": {{ part.pk }} }', ); }); @@ -567,7 +567,6 @@ ) }); - function onSelectImage(response) { // Callback when the image-selection modal form is displayed // Populate the form with image data (requested via AJAX) @@ -591,7 +590,7 @@ title: 'Image', searchable: true, formatter: function(value, row, index, field) { - return "" + return "image" } } ], @@ -694,4 +693,4 @@ findStockItemBySerialNumber({{ part.pk }}); }); -{% endblock %} +{% endblock js_ready %} diff --git a/InvenTree/part/templates/part/part_pricing.html b/InvenTree/part/templates/part/part_pricing.html index 52c7e44525..18e1b7f7b4 100644 --- a/InvenTree/part/templates/part/part_pricing.html +++ b/InvenTree/part/templates/part/part_pricing.html @@ -10,7 +10,7 @@
{% trans "Description" %}{{ part.description }}{% include "clip.html"%}{{ part.description }}{% include "clip.html" %}
{% trans "IPN" %}{{ part.IPN }}{% include "clip.html"%}{{ part.IPN }}{% include "clip.html" %}
{% trans "Revision" %}{{ part.revision }}{% include "clip.html"%}{{ part.revision }}{% include "clip.html" %}
{% trans "Keywords" %}{{ part.keywords }}{% include "clip.html"%}{{ part.keywords }}{% include "clip.html" %}
- + @@ -124,4 +124,4 @@ {% endif %}
-{% endblock %} +{% endblock pre_form_content %} diff --git a/InvenTree/part/templates/part/part_thumb.html b/InvenTree/part/templates/part/part_thumb.html index d676e4ce9a..5cfd475d3c 100644 --- a/InvenTree/part/templates/part/part_thumb.html +++ b/InvenTree/part/templates/part/part_thumb.html @@ -17,7 +17,7 @@ {% endif %} - {% trans 'Part image' %} {% endif %} - {% if part.assembly and part.has_bom %}
diff --git a/InvenTree/part/templates/part/pricing_javascript.html b/InvenTree/part/templates/part/pricing_javascript.html index 7385d60b7c..94592b2af1 100644 --- a/InvenTree/part/templates/part/pricing_javascript.html +++ b/InvenTree/part/templates/part/pricing_javascript.html @@ -22,7 +22,7 @@ $('#part-pricing-refresh').click(function() { // Internal Pricebreaks {% if show_internal_price and roles.sales_order.view %} initPriceBreakSet($('#internal-price-break-table'), { - part_id: {{part.id}}, + part_id: {{ part.id }}, pb_human_name: 'internal price break', pb_url_slug: 'internal-price', pb_url: '{% url 'api-part-internal-price-list' %}', @@ -63,7 +63,7 @@ loadVariantPricingChart({ initPriceBreakSet( $('#price-break-table'), { - part_id: {{part.id}}, + part_id: {{ part.id }}, pb_human_name: 'sale price break', pb_url_slug: 'sale-price', pb_url: "{% url 'api-part-sale-price-list' %}", diff --git a/InvenTree/part/templates/part/select_image.html b/InvenTree/part/templates/part/select_image.html index c7506fe47e..e75a282c2f 100644 --- a/InvenTree/part/templates/part/select_image.html +++ b/InvenTree/part/templates/part/select_image.html @@ -4,8 +4,7 @@ {{ block.super }} - -{% endblock %} +{% endblock pre_form_content %} {% block form %}
@@ -18,4 +17,4 @@
{% trans 'Part' %}{{ part }}{{ part }}
{% trans 'Quantity' %}
-{% endblock %} +{% endblock form %} diff --git a/InvenTree/part/templates/part/upload_bom.html b/InvenTree/part/templates/part/upload_bom.html index 68ec20f5e2..542d6a4074 100644 --- a/InvenTree/part/templates/part/upload_bom.html +++ b/InvenTree/part/templates/part/upload_bom.html @@ -7,11 +7,11 @@ {% url "part-detail" part.id as url %} {% trans "Return to BOM" as text %} {% include "sidebar_link.html" with url=url text=text icon="fa-undo" %} -{% endblock %} +{% endblock sidebar %} {% block heading %} {% trans "Upload Bill of Materials" %} -{% endblock %} +{% endblock heading %} {% block actions %} -{% endblock %} +{% endblock sidebar %} {% block content %}
-{% endblock %} +{% endblock content %} {% block js_ready %} @@ -203,7 +203,6 @@ loadSimplePartTable("#table-stock-to-build", "{% url 'api-part-list' %}", { }); {% endif %} - {% if expiry %} {% if setting_stock_expired %} @@ -349,4 +348,4 @@ enableSidebar( } ); -{% endblock %} +{% endblock js_ready %} diff --git a/InvenTree/templates/InvenTree/notifications/history.html b/InvenTree/templates/InvenTree/notifications/history.html index 4623f7fc4f..adccdd88a1 100644 --- a/InvenTree/templates/InvenTree/notifications/history.html +++ b/InvenTree/templates/InvenTree/notifications/history.html @@ -3,17 +3,17 @@ {% load i18n %} {% load inventree_extras %} -{% block label %}history{% endblock %} +{% block label %}history{% endblock label %} {% block heading %} {% trans "Notification History" %} -{% endblock %} +{% endblock heading %} {% block actions %}
{% trans "Delete Notifications" %}
-{% endblock %} +{% endblock actions %} {% block content %} @@ -29,4 +29,4 @@ -{% endblock %} +{% endblock content %} diff --git a/InvenTree/templates/InvenTree/notifications/inbox.html b/InvenTree/templates/InvenTree/notifications/inbox.html index be994727b1..832807ae1e 100644 --- a/InvenTree/templates/InvenTree/notifications/inbox.html +++ b/InvenTree/templates/InvenTree/notifications/inbox.html @@ -3,17 +3,17 @@ {% load i18n %} {% load inventree_extras %} -{% block label %}inbox{% endblock %} +{% block label %}inbox{% endblock label %} {% block heading %} {% trans "Pending Notifications" %} -{% endblock %} +{% endblock heading %} {% block actions %}
{% trans "Mark all as read" %}
-{% endblock %} +{% endblock actions %} {% block content %} @@ -28,4 +28,4 @@ -{% endblock %} +{% endblock content %} diff --git a/InvenTree/templates/InvenTree/notifications/notifications.html b/InvenTree/templates/InvenTree/notifications/notifications.html index db9593cf23..7f95103a28 100644 --- a/InvenTree/templates/InvenTree/notifications/notifications.html +++ b/InvenTree/templates/InvenTree/notifications/notifications.html @@ -4,20 +4,20 @@ {% load inventree_extras %} {% block breadcrumb_list %} -{% endblock %} +{% endblock breadcrumb_list %} {% block page_title %} {% inventree_title %} | {% trans "Notifications" %} -{% endblock %} +{% endblock page_title %} {% block sidebar %} {% include "InvenTree/notifications/sidebar.html" %} -{% endblock %} +{% endblock sidebar %} {% block content %} {% include "InvenTree/notifications/inbox.html" %} {% include "InvenTree/notifications/history.html" %} -{% endblock %} +{% endblock content %} {% block js_ready %} {{ block.super }} @@ -29,7 +29,6 @@ function updateNotificationTables() { // this allows the global notification panel to update the tables window.updateNotifications = updateNotificationTables - loadNotificationTable("#inbox-table", { name: 'inbox', url: '{% url 'api-notifications-list' %}', @@ -59,7 +58,6 @@ loadNotificationTable("#history-table", { no_matches: function() { return '{% trans "No notification history found" %}'; }, }, true); - $('#history-delete').click(function() { var html = ` @@ -96,4 +94,4 @@ $("#history-table").on('click', '.notification-delete', function() { }); enableSidebar('notifications'); -{% endblock %} +{% endblock js_ready %} diff --git a/InvenTree/templates/InvenTree/password.html b/InvenTree/templates/InvenTree/password.html index 46bd097be7..4ff12bc1cc 100644 --- a/InvenTree/templates/InvenTree/password.html +++ b/InvenTree/templates/InvenTree/password.html @@ -4,4 +4,4 @@ {{ block.super }} -{% endblock %} +{% endblock pre_form_content %} diff --git a/InvenTree/templates/InvenTree/search.html b/InvenTree/templates/InvenTree/search.html index 4596fb9f7f..b25275b749 100644 --- a/InvenTree/templates/InvenTree/search.html +++ b/InvenTree/templates/InvenTree/search.html @@ -6,10 +6,10 @@ {% block page_title %} {% inventree_title %} | {% trans "Search Results" %} -{% endblock %} +{% endblock page_title %} {% block breadcrumb_list %} -{% endblock %} +{% endblock breadcrumb_list %} {% block content %} @@ -22,7 +22,7 @@
-{% endblock %} +{% endblock content %} {% block js_ready %} {{ block.super }} @@ -236,4 +236,4 @@ } ); -{% endblock %} +{% endblock js_ready %} diff --git a/InvenTree/templates/InvenTree/settings/barcode.html b/InvenTree/templates/InvenTree/settings/barcode.html index 6a9b74e3cf..3e6fb6835b 100644 --- a/InvenTree/templates/InvenTree/settings/barcode.html +++ b/InvenTree/templates/InvenTree/settings/barcode.html @@ -2,11 +2,11 @@ {% load i18n %} {% load inventree_extras %} -{% block label %}barcodes{% endblock %} +{% block label %}barcodes{% endblock label %} {% block heading %} {% trans "Barcode Settings" %} -{% endblock %} +{% endblock heading %} {% block content %} @@ -18,4 +18,4 @@ -{% endblock %} +{% endblock content %} diff --git a/InvenTree/templates/InvenTree/settings/build.html b/InvenTree/templates/InvenTree/settings/build.html index 5c168f4354..cee6d1c349 100644 --- a/InvenTree/templates/InvenTree/settings/build.html +++ b/InvenTree/templates/InvenTree/settings/build.html @@ -2,11 +2,11 @@ {% load i18n %} {% load inventree_extras %} -{% block label %}build-order{% endblock %} +{% block label %}build-order{% endblock label %} {% block heading %} {% trans "Build Order Settings" %} -{% endblock %} +{% endblock heading %} {% block content %} @@ -16,4 +16,4 @@ -{% endblock %} +{% endblock content %} diff --git a/InvenTree/templates/InvenTree/settings/category.html b/InvenTree/templates/InvenTree/settings/category.html index d6c5c872b0..9645faadb7 100644 --- a/InvenTree/templates/InvenTree/settings/category.html +++ b/InvenTree/templates/InvenTree/settings/category.html @@ -1,17 +1,17 @@ {% extends "panel.html" %} {% load i18n %} -{% block label %}category{% endblock %} +{% block label %}category{% endblock label %} {% block heading %} {% trans "Category Settings" %} -{% endblock %} +{% endblock heading %} {% block actions %} -{% endblock %} +{% endblock actions %} {% block content %} @@ -30,4 +30,4 @@
-{% endblock %} +{% endblock content %} diff --git a/InvenTree/templates/InvenTree/settings/global.html b/InvenTree/templates/InvenTree/settings/global.html index 901d0b2a66..8161b5d7fd 100644 --- a/InvenTree/templates/InvenTree/settings/global.html +++ b/InvenTree/templates/InvenTree/settings/global.html @@ -2,12 +2,11 @@ {% load i18n %} {% load inventree_extras %} -{% block label %}server{% endblock %} - +{% block label %}server{% endblock label %} {% block heading %} {% trans "Server Settings" %} -{% endblock %} +{% endblock heading %} {% block content %} @@ -34,4 +33,4 @@ -{% endblock %} +{% endblock content %} diff --git a/InvenTree/templates/InvenTree/settings/label.html b/InvenTree/templates/InvenTree/settings/label.html index 7d7dd8a5eb..a3e0aeef6c 100644 --- a/InvenTree/templates/InvenTree/settings/label.html +++ b/InvenTree/templates/InvenTree/settings/label.html @@ -2,11 +2,11 @@ {% load i18n %} {% load inventree_extras %} -{% block label %}labels{% endblock %} +{% block label %}labels{% endblock label %} {% block heading %} {% trans "Label Settings" %} -{% endblock %} +{% endblock heading %} {% block content %} @@ -17,4 +17,4 @@ -{% endblock %} +{% endblock content %} diff --git a/InvenTree/templates/InvenTree/settings/login.html b/InvenTree/templates/InvenTree/settings/login.html index a914c94036..2cdd7784f1 100644 --- a/InvenTree/templates/InvenTree/settings/login.html +++ b/InvenTree/templates/InvenTree/settings/login.html @@ -2,12 +2,11 @@ {% load i18n %} {% load inventree_extras %} -{% block label %}login{% endblock %} - +{% block label %}login{% endblock label %} {% block heading %} {% trans "Login Settings" %} -{% endblock %} +{% endblock heading %} {% block content %} @@ -41,4 +40,4 @@ -{% endblock %} +{% endblock content %} diff --git a/InvenTree/templates/InvenTree/settings/mixins/urls.html b/InvenTree/templates/InvenTree/settings/mixins/urls.html index 0a7b029762..8b1bf799e9 100644 --- a/InvenTree/templates/InvenTree/settings/mixins/urls.html +++ b/InvenTree/templates/InvenTree/settings/mixins/urls.html @@ -18,9 +18,9 @@ {% for key, entry in plugin.urlpatterns.reverse_dict.items %}{% if key %} - {{key}} - {{entry.1}} - {% trans 'Open in new tab' %} + {{ key }} + {{ entry.1 }} + {% trans 'Open in new tab' %} {% endif %}{% endfor %} diff --git a/InvenTree/templates/InvenTree/settings/notifications.html b/InvenTree/templates/InvenTree/settings/notifications.html index 96bf294362..90ae93f2b4 100644 --- a/InvenTree/templates/InvenTree/settings/notifications.html +++ b/InvenTree/templates/InvenTree/settings/notifications.html @@ -26,7 +26,7 @@ {{ method.name }} {% if method.plugin %} - + {{ method.plugin.slug }} {% endif %} diff --git a/InvenTree/templates/InvenTree/settings/part.html b/InvenTree/templates/InvenTree/settings/part.html index 20aa76c3f8..f79c508d92 100644 --- a/InvenTree/templates/InvenTree/settings/part.html +++ b/InvenTree/templates/InvenTree/settings/part.html @@ -1,11 +1,11 @@ {% extends "panel.html" %} {% load i18n %} -{% block label %}parts{% endblock %} +{% block label %}parts{% endblock label %} {% block heading %} {% trans "Part Settings" %} -{% endblock %} +{% endblock heading %} {% block content %} @@ -22,7 +22,7 @@ {% include "InvenTree/settings/setting.html" with key="PART_TEMPLATE" icon="fa-clone" %} {% include "InvenTree/settings/setting.html" with key="PART_ASSEMBLY" icon="fa-tools" %} - {% include "InvenTree/settings/setting.html" with key="PART_COMPONENT" icon="fa-th"%} + {% include "InvenTree/settings/setting.html" with key="PART_COMPONENT" icon="fa-th" %} {% include "InvenTree/settings/setting.html" with key="PART_TRACKABLE" icon="fa-directions" %} {% include "InvenTree/settings/setting.html" with key="PART_PURCHASEABLE" icon="fa-shopping-cart" %} {% include "InvenTree/settings/setting.html" with key="PART_SALABLE" icon="fa-dollar-sign" %} @@ -70,4 +70,4 @@
-{% endblock %} +{% endblock content %} diff --git a/InvenTree/templates/InvenTree/settings/part_stocktake.html b/InvenTree/templates/InvenTree/settings/part_stocktake.html index 3db0630358..ad9e563a93 100644 --- a/InvenTree/templates/InvenTree/settings/part_stocktake.html +++ b/InvenTree/templates/InvenTree/settings/part_stocktake.html @@ -1,11 +1,11 @@ {% extends "panel.html" %} {% load i18n %} -{% block label %}stocktake{% endblock %} +{% block label %}stocktake{% endblock label %} {% block heading %} {% trans "Stocktake Settings" %} -{% endblock %} +{% endblock heading %} {% block panel_content %} diff --git a/InvenTree/templates/InvenTree/settings/plugin.html b/InvenTree/templates/InvenTree/settings/plugin.html index 4776c9d1f0..923790ed7f 100644 --- a/InvenTree/templates/InvenTree/settings/plugin.html +++ b/InvenTree/templates/InvenTree/settings/plugin.html @@ -3,12 +3,11 @@ {% load inventree_extras %} {% load plugin_extras %} -{% block label %}plugin{% endblock %} - +{% block label %}plugin{% endblock label %} {% block heading %} {% trans "Plugin Settings" %} -{% endblock %} +{% endblock heading %} {% block content %} @@ -86,7 +85,6 @@ - {% plugin_errors as pl_errors %} {% if pl_errors %}
@@ -123,4 +121,4 @@
{% endif %} -{% endblock %} +{% endblock content %} diff --git a/InvenTree/templates/InvenTree/settings/plugin_details.html b/InvenTree/templates/InvenTree/settings/plugin_details.html index 6e76370f7b..f61bb775b1 100644 --- a/InvenTree/templates/InvenTree/settings/plugin_details.html +++ b/InvenTree/templates/InvenTree/settings/plugin_details.html @@ -21,7 +21,7 @@ {% if mixin_list %} {% for mixin in mixin_list %} - + {{ mixin.human_name }} {% endfor %} @@ -34,7 +34,7 @@ {% endif %} {% if plugin.is_sample %} - + {% trans "Sample" %} {% endif %} diff --git a/InvenTree/templates/InvenTree/settings/plugin_settings.html b/InvenTree/templates/InvenTree/settings/plugin_settings.html index 6a095ead2d..d83b408867 100644 --- a/InvenTree/templates/InvenTree/settings/plugin_settings.html +++ b/InvenTree/templates/InvenTree/settings/plugin_settings.html @@ -3,12 +3,11 @@ {% load inventree_extras %} {% load plugin_extras %} -{% block label %}plugin-{{plugin_key}}{% endblock %} - +{% block label %}plugin-{{ plugin_key }}{% endblock label %} {% block heading %} {% trans "Plugin" %}: {{ plugin.human_name }} -{% endblock %} +{% endblock heading %} {% block content %} @@ -123,14 +122,14 @@ {% settings_value "PLUGIN_CHECK_SIGNATURES" as signatures %} {% if signatures %} - + {% trans "Sign Status" %} - {% if plugin.package.verified %}{{ plugin.package.verified }}: {% endif%}{{ plugin.sign_state.msg }} + {% if plugin.package.verified %}{{ plugin.package.verified }}: {% endif %}{{ plugin.sign_state.msg }} - + {% trans "Sign Key" %} - {{ plugin.package.key }}{% include "clip.html" %} + {{ plugin.package.key }}{% include "clip.html" %} {% endif %} @@ -150,4 +149,4 @@ {% include 'InvenTree/settings/mixins/settings_content.html' %} -{% endblock %} +{% endblock content %} diff --git a/InvenTree/templates/InvenTree/settings/po.html b/InvenTree/templates/InvenTree/settings/po.html index 201d2e1a68..aaaba2bd06 100644 --- a/InvenTree/templates/InvenTree/settings/po.html +++ b/InvenTree/templates/InvenTree/settings/po.html @@ -1,11 +1,11 @@ {% extends "panel.html" %} {% load i18n %} -{% block label %}purchase-order{% endblock %} +{% block label %}purchase-order{% endblock label %} {% block heading %} {% trans "Purchase Order Settings" %} -{% endblock %} +{% endblock heading %} {% block content %} @@ -14,4 +14,4 @@ {% include "InvenTree/settings/setting.html" with key="PURCHASEORDER_EDIT_COMPLETED_ORDERS" icon='fa-edit' %}
-{% endblock %} +{% endblock content %} diff --git a/InvenTree/templates/InvenTree/settings/pricing.html b/InvenTree/templates/InvenTree/settings/pricing.html index 0c0ceece15..fbcf9ff9d4 100644 --- a/InvenTree/templates/InvenTree/settings/pricing.html +++ b/InvenTree/templates/InvenTree/settings/pricing.html @@ -1,11 +1,11 @@ {% extends "panel.html" %} {% load i18n %} -{% block label %}pricing{% endblock %} +{% block label %}pricing{% endblock label %} {% block heading %} {% trans "Pricing Settings" %} -{% endblock %} +{% endblock heading %} {% block panel_content %}
diff --git a/InvenTree/templates/InvenTree/settings/project_codes.html b/InvenTree/templates/InvenTree/settings/project_codes.html index cb9d972a3c..c4e762884d 100644 --- a/InvenTree/templates/InvenTree/settings/project_codes.html +++ b/InvenTree/templates/InvenTree/settings/project_codes.html @@ -7,8 +7,6 @@ {% block heading %}{% trans "Project Code Settings" %}{% endblock heading %} - - {% block content %} diff --git a/InvenTree/templates/InvenTree/settings/report.html b/InvenTree/templates/InvenTree/settings/report.html index 030d5fa48d..baf57c9bfc 100644 --- a/InvenTree/templates/InvenTree/settings/report.html +++ b/InvenTree/templates/InvenTree/settings/report.html @@ -2,11 +2,11 @@ {% load i18n %} {% load inventree_extras %} -{% block label %}reporting{% endblock %} +{% block label %}reporting{% endblock label %} {% block heading %} {% trans "Report Settings" %} -{% endblock %} +{% endblock heading %} {% block content %} @@ -20,4 +20,4 @@ -{% endblock %} +{% endblock content %} diff --git a/InvenTree/templates/InvenTree/settings/returns.html b/InvenTree/templates/InvenTree/settings/returns.html index 48092c0e7a..306bb95873 100644 --- a/InvenTree/templates/InvenTree/settings/returns.html +++ b/InvenTree/templates/InvenTree/settings/returns.html @@ -1,11 +1,11 @@ {% extends "panel.html" %} {% load i18n %} -{% block label %}return-order{% endblock %} +{% block label %}return-order{% endblock label %} {% block heading %} {% trans "Return Order Settings" %} -{% endblock %} +{% endblock heading %} {% block content %} @@ -17,4 +17,4 @@ -{% endblock %} +{% endblock content %} diff --git a/InvenTree/templates/InvenTree/settings/setting.html b/InvenTree/templates/InvenTree/settings/setting.html index 34f2a39173..13b0ea9c5e 100644 --- a/InvenTree/templates/InvenTree/settings/setting.html +++ b/InvenTree/templates/InvenTree/settings/setting.html @@ -45,7 +45,7 @@ pk='{{ setting.pk }}' setting='{{ setting.key.upper }}' {% if plugin %}plugin='{{ plugin.slug }}'{% endif %} - {% if user_setting or notification_setting %}user='{{request.user.id}}'{% endif %} + {% if user_setting or notification_setting %}user='{{ request.user.id }}'{% endif %} {% if notification_setting %} notification=true method='{{ setting.method }}' diff --git a/InvenTree/templates/InvenTree/settings/setting_boolean.html b/InvenTree/templates/InvenTree/settings/setting_boolean.html index c97b46bbcc..6f0d0c5ffd 100644 --- a/InvenTree/templates/InvenTree/settings/setting_boolean.html +++ b/InvenTree/templates/InvenTree/settings/setting_boolean.html @@ -4,7 +4,7 @@ fieldname='{{ setting.key.upper }}' pk='{{ setting.pk }}' setting='{{ setting.key.upper }}' - id='setting-value-{{setting.pk }}-{{ setting.typ }}' + id='setting-value-{{ setting.pk }}-{{ setting.typ }}' type='checkbox' {% if setting.as_bool %}checked=''{% endif %} {{ reference }} diff --git a/InvenTree/templates/InvenTree/settings/settings.html b/InvenTree/templates/InvenTree/settings/settings.html index 5b8937b673..b6e8e59eb3 100644 --- a/InvenTree/templates/InvenTree/settings/settings.html +++ b/InvenTree/templates/InvenTree/settings/settings.html @@ -6,15 +6,15 @@ {% load plugin_extras %} {% block breadcrumb_list %} -{% endblock %} +{% endblock breadcrumb_list %} {% block page_title %} {% inventree_title %} | {% trans "Settings" %} -{% endblock %} +{% endblock page_title %} {% block sidebar %} {% include "InvenTree/settings/sidebar.html" %} -{% endblock %} +{% endblock sidebar %} {% block content %} @@ -55,11 +55,11 @@ {% endif %} -{% endblock %} +{% endblock content %} {% block js_load %} {{ block.super }} -{% endblock %} +{% endblock js_load %} {% block js_ready %} {{ block.super }} @@ -78,4 +78,4 @@ enableSidebar('settings'); -{% endblock %} +{% endblock js_ready %} diff --git a/InvenTree/templates/InvenTree/settings/settings_staff_js.html b/InvenTree/templates/InvenTree/settings/settings_staff_js.html index 16e7e10731..2c3a984ccb 100644 --- a/InvenTree/templates/InvenTree/settings/settings_staff_js.html +++ b/InvenTree/templates/InvenTree/settings/settings_staff_js.html @@ -272,7 +272,6 @@ onPanelLoad('category', function() { }); } - // Initially load table with *all* categories loadTemplateTable(); @@ -303,7 +302,6 @@ onPanelLoad('category', function() { }); }); - // Javascript for the Part settings panel onPanelLoad('parts', function() { $("#param-table").inventreeTable({ @@ -405,7 +403,6 @@ onPanelLoad('parts', function() { }); }); - // Javascript for the Stocktake settings panel onPanelLoad('stocktake', function() { diff --git a/InvenTree/templates/InvenTree/settings/so.html b/InvenTree/templates/InvenTree/settings/so.html index f45cccd630..c97a47cc18 100644 --- a/InvenTree/templates/InvenTree/settings/so.html +++ b/InvenTree/templates/InvenTree/settings/so.html @@ -1,11 +1,11 @@ {% extends "panel.html" %} {% load i18n %} -{% block label %}sales-order{% endblock %} +{% block label %}sales-order{% endblock label %} {% block heading %} {% trans "Sales Order Settings" %} -{% endblock %} +{% endblock heading %} {% block content %} @@ -17,4 +17,4 @@ -{% endblock %} +{% endblock content %} diff --git a/InvenTree/templates/InvenTree/settings/stock.html b/InvenTree/templates/InvenTree/settings/stock.html index 2826b4429d..8beaac4620 100644 --- a/InvenTree/templates/InvenTree/settings/stock.html +++ b/InvenTree/templates/InvenTree/settings/stock.html @@ -1,11 +1,11 @@ {% extends "panel.html" %} {% load i18n %} -{% block label %}stock{% endblock %} +{% block label %}stock{% endblock label %} {% block heading %} {% trans "Stock Settings" %} -{% endblock %} +{% endblock heading %} {% block content %} @@ -24,4 +24,4 @@ -{% endblock %} +{% endblock content %} diff --git a/InvenTree/templates/InvenTree/settings/user.html b/InvenTree/templates/InvenTree/settings/user.html index 07d0dc77f1..ca1c1fdc18 100644 --- a/InvenTree/templates/InvenTree/settings/user.html +++ b/InvenTree/templates/InvenTree/settings/user.html @@ -6,11 +6,11 @@ {% load crispy_forms_tags %} {% load user_sessions i18n %} -{% block label %}account{% endblock %} +{% block label %}account{% endblock label %} {% block heading %} {% trans "Account Settings" %} -{% endblock %} +{% endblock heading %} {% block actions %} {% inventree_customize 'hide_password_reset' as hide_password_reset %} @@ -22,7 +22,7 @@
{% trans "Edit" %}
-{% endblock %} +{% endblock actions %} {% block content %} {% mail_configured as mail_conf %} @@ -60,9 +60,9 @@ {% for emailaddress in user.emailaddress_set.all %}
-
@@ -265,7 +265,7 @@
-{% endblock %} +{% endblock content %} {% block js_ready %} (function() { @@ -279,4 +279,4 @@ e.preventDefault(); }); } })(); -{% endblock %} +{% endblock js_ready %} diff --git a/InvenTree/templates/InvenTree/settings/user_display.html b/InvenTree/templates/InvenTree/settings/user_display.html index 5ca3b6e316..1e916b1e95 100644 --- a/InvenTree/templates/InvenTree/settings/user_display.html +++ b/InvenTree/templates/InvenTree/settings/user_display.html @@ -3,11 +3,11 @@ {% load i18n %} {% load inventree_extras %} -{% block label %}user-display{% endblock %} +{% block label %}user-display{% endblock label %} {% block heading %} {% trans "Display Settings" %} -{% endblock %} +{% endblock heading %} {% block content %} @@ -43,7 +43,7 @@ {% get_available_themes as themes %} {% get_user_color_theme request.user.username as user_theme %} {% for theme in themes %} - + {% endfor %}
@@ -76,7 +76,7 @@ {% define language.code as lang_code %} {% define locale_stats|keyvalue:lang_code as lang_translated %} {% if lang_translated > 10 or lang_code == 'en' or lang_code == LANGUAGE_CODE %}{% define True as use_lang %}{% else %}{% define False as use_lang %}{% endif %} - {% if ALL_LANG or use_lang %} + {% if ALL_LANG or use_lang %}
-{% endblock %} +{% endblock content %} diff --git a/InvenTree/templates/InvenTree/settings/user_homepage.html b/InvenTree/templates/InvenTree/settings/user_homepage.html index 2bc2c7d778..9265484d37 100644 --- a/InvenTree/templates/InvenTree/settings/user_homepage.html +++ b/InvenTree/templates/InvenTree/settings/user_homepage.html @@ -3,11 +3,11 @@ {% load i18n %} {% load inventree_extras %} -{% block label %}user-home{% endblock %} +{% block label %}user-home{% endblock label %} {% block heading %} {% trans "Home Page Settings" %} -{% endblock %} +{% endblock heading %} {% block content %} @@ -42,4 +42,4 @@ -{% endblock %} +{% endblock content %} diff --git a/InvenTree/templates/InvenTree/settings/user_labels.html b/InvenTree/templates/InvenTree/settings/user_labels.html index 85492a2b98..11e59975f0 100644 --- a/InvenTree/templates/InvenTree/settings/user_labels.html +++ b/InvenTree/templates/InvenTree/settings/user_labels.html @@ -3,11 +3,11 @@ {% load i18n %} {% load inventree_extras %} -{% block label %}user-labels{% endblock %} +{% block label %}user-labels{% endblock label %} {% block heading %} {% trans "Label Settings" %} -{% endblock %} +{% endblock heading %} {% block content %} @@ -20,4 +20,4 @@ -{% endblock %} +{% endblock content %} diff --git a/InvenTree/templates/InvenTree/settings/user_reporting.html b/InvenTree/templates/InvenTree/settings/user_reporting.html index 44c63a5d50..c04045ba15 100644 --- a/InvenTree/templates/InvenTree/settings/user_reporting.html +++ b/InvenTree/templates/InvenTree/settings/user_reporting.html @@ -3,11 +3,11 @@ {% load i18n %} {% load inventree_extras %} -{% block label %}user-reports{% endblock %} +{% block label %}user-reports{% endblock label %} {% block heading %} {% trans "Report Settings" %} -{% endblock %} +{% endblock heading %} {% block content %} @@ -21,4 +21,4 @@ -{% endblock %} +{% endblock content %} diff --git a/InvenTree/templates/InvenTree/settings/user_search.html b/InvenTree/templates/InvenTree/settings/user_search.html index aab1e2338a..96d52f966f 100644 --- a/InvenTree/templates/InvenTree/settings/user_search.html +++ b/InvenTree/templates/InvenTree/settings/user_search.html @@ -3,11 +3,11 @@ {% load i18n %} {% load inventree_extras %} -{% block label %}user-search{% endblock %} +{% block label %}user-search{% endblock label %} {% block heading %} {% trans "Search Settings" %} -{% endblock %} +{% endblock heading %} {% block content %} @@ -34,9 +34,8 @@ {% include "InvenTree/settings/setting.html" with key="SEARCH_PREVIEW_SHOW_RETURN_ORDERS" user_setting=True icon='fa-truck' %} {% include "InvenTree/settings/setting.html" with key="SEARCH_PREVIEW_EXCLUDE_INACTIVE_RETURN_ORDERS" user_setting=True icon='fa-eye-slash' %} - -{% endblock %} +{% endblock content %} diff --git a/InvenTree/templates/InvenTree/settings/user_settings.html b/InvenTree/templates/InvenTree/settings/user_settings.html index 80c01f6919..012d12c745 100644 --- a/InvenTree/templates/InvenTree/settings/user_settings.html +++ b/InvenTree/templates/InvenTree/settings/user_settings.html @@ -3,11 +3,11 @@ {% load i18n %} {% load inventree_extras %} -{% block label %}user-settings{% endblock %} +{% block label %}user-settings{% endblock label %} {% block heading %} {% trans "User Settings" %} -{% endblock %} +{% endblock heading %} {% block content %} @@ -17,4 +17,4 @@ -{% endblock %} +{% endblock content %} diff --git a/InvenTree/templates/account/base.html b/InvenTree/templates/account/base.html index fc56fbdeb4..079734dd39 100644 --- a/InvenTree/templates/account/base.html +++ b/InvenTree/templates/account/base.html @@ -40,13 +40,12 @@ - - {% inventree_title %} | {% block head_title %}{% endblock %} + {% inventree_title %} | {% block head_title %}{% endblock head_title %} {% block extra_head %} -{% endblock %} +{% endblock extra_head %} @@ -59,13 +58,12 @@ - @@ -60,4 +60,4 @@ {% include "socialaccount/snippets/login_extra.html" %} {% endif %} -{% endblock %} +{% endblock content %} diff --git a/InvenTree/templates/account/logout.html b/InvenTree/templates/account/logout.html index 37df8d7577..9ff5b5e8e1 100644 --- a/InvenTree/templates/account/logout.html +++ b/InvenTree/templates/account/logout.html @@ -2,7 +2,7 @@ {% load i18n %} -{% block head_title %}{% trans "Sign Out" %}{% endblock %} +{% block head_title %}{% trans "Sign Out" %}{% endblock head_title %} {% block content %}

{% trans "Sign Out" %}

@@ -28,4 +28,4 @@ -{% endblock %} +{% endblock content %} diff --git a/InvenTree/templates/account/password_reset.html b/InvenTree/templates/account/password_reset.html index 1eeb5c6179..61e2c5cf76 100644 --- a/InvenTree/templates/account/password_reset.html +++ b/InvenTree/templates/account/password_reset.html @@ -2,7 +2,7 @@ {% load i18n account crispy_forms_tags inventree_extras %} -{% block head_title %}{% trans "Password Reset" %}{% endblock %} +{% block head_title %}{% trans "Password Reset" %}{% endblock head_title %} {% block content %} @@ -17,7 +17,7 @@ {% if mail_conf and enable_pwd_forgot %}

{% trans "Forgotten your password? Enter your email address below, and we'll send you an email allowing you to reset it." %}

-
+ {% csrf_token %} {{ form|crispy }} @@ -27,4 +27,4 @@

{% trans "This function is currently disabled. Please contact an administrator." %}

{% endif %} -{% endblock %} +{% endblock content %} diff --git a/InvenTree/templates/account/password_reset_from_key.html b/InvenTree/templates/account/password_reset_from_key.html index c75543f67f..acb0eac5fe 100644 --- a/InvenTree/templates/account/password_reset_from_key.html +++ b/InvenTree/templates/account/password_reset_from_key.html @@ -1,7 +1,7 @@ {% extends "account/base.html" %} {% load i18n crispy_forms_tags %} -{% block head_title %}{% trans "Change Password" %}{% endblock %} +{% block head_title %}{% trans "Change Password" %}{% endblock head_title %} {% block content %}

{% if token_fail %}{% trans "Bad Token" %}{% else %}{% trans "Change Password" %}{% endif %}

@@ -11,7 +11,7 @@

{% blocktrans %}The password reset link was invalid, possibly because it has already been used. Please request a new password reset.{% endblocktrans %}

{% else %} {% if form %} - + {% csrf_token %} {{ form|crispy }}
@@ -22,4 +22,4 @@

{% trans 'Your password is now changed.' %}

{% endif %} {% endif %} -{% endblock %} +{% endblock content %} diff --git a/InvenTree/templates/account/signup.html b/InvenTree/templates/account/signup.html index 07aac91cab..d697c8f1b8 100644 --- a/InvenTree/templates/account/signup.html +++ b/InvenTree/templates/account/signup.html @@ -2,7 +2,7 @@ {% load i18n crispy_forms_tags inventree_extras %} -{% block head_title %}{% trans "Signup" %}{% endblock %} +{% block head_title %}{% trans "Signup" %}{% endblock head_title %} {% block content %} {% settings_value 'LOGIN_ENABLE_REG' as enable_reg %} @@ -38,4 +38,4 @@
{% endif %} -{% endblock %} +{% endblock content %} diff --git a/InvenTree/templates/account/signup_closed.html b/InvenTree/templates/account/signup_closed.html index 3ac9cf8896..a9b21c2911 100644 --- a/InvenTree/templates/account/signup_closed.html +++ b/InvenTree/templates/account/signup_closed.html @@ -2,7 +2,7 @@ {% load i18n %} -{% block head_title %}{% trans "Sign Up Closed" %}{% endblock %} +{% block head_title %}{% trans "Sign Up Closed" %}{% endblock head_title %} {% block content %}

{% trans "Sign Up Closed" %}

@@ -16,4 +16,4 @@ -{% endblock %} +{% endblock content %} diff --git a/InvenTree/templates/allauth_2fa/authenticate.html b/InvenTree/templates/allauth_2fa/authenticate.html index d28ef77f51..891d5ab5eb 100644 --- a/InvenTree/templates/allauth_2fa/authenticate.html +++ b/InvenTree/templates/allauth_2fa/authenticate.html @@ -13,4 +13,4 @@ {% trans 'Authenticate' %}
-{% endblock %} +{% endblock content %} diff --git a/InvenTree/templates/allauth_2fa/backup_tokens.html b/InvenTree/templates/allauth_2fa/backup_tokens.html index fac32e3e2c..35cc8c5b42 100644 --- a/InvenTree/templates/allauth_2fa/backup_tokens.html +++ b/InvenTree/templates/allauth_2fa/backup_tokens.html @@ -36,4 +36,4 @@ -{% endblock %} +{% endblock content %} diff --git a/InvenTree/templates/allauth_2fa/remove.html b/InvenTree/templates/allauth_2fa/remove.html index aab3915fa8..67c9c05286 100644 --- a/InvenTree/templates/allauth_2fa/remove.html +++ b/InvenTree/templates/allauth_2fa/remove.html @@ -24,4 +24,4 @@ {% trans "Return to Site" %} -{% endblock %} +{% endblock content %} diff --git a/InvenTree/templates/allauth_2fa/setup.html b/InvenTree/templates/allauth_2fa/setup.html index 027cef905d..1fd4635fc0 100644 --- a/InvenTree/templates/allauth_2fa/setup.html +++ b/InvenTree/templates/allauth_2fa/setup.html @@ -15,7 +15,7 @@

- +{% trans 'QC Code' %}

@@ -44,4 +44,4 @@ {% trans "Return to Site" %} -{% endblock %} +{% endblock content %} diff --git a/InvenTree/templates/barcode_data.html b/InvenTree/templates/barcode_data.html index 4e95bbd9d1..dd3845dcee 100644 --- a/InvenTree/templates/barcode_data.html +++ b/InvenTree/templates/barcode_data.html @@ -4,7 +4,7 @@ {% trans "Barcode Identifier" %} - {{ instance.barcode_hash}} + {{ instance.barcode_hash }} {% endif %} diff --git a/InvenTree/templates/base.html b/InvenTree/templates/base.html index 7dcf7ea7ba..0e395c3168 100644 --- a/InvenTree/templates/base.html +++ b/InvenTree/templates/base.html @@ -59,15 +59,15 @@ {% block head %} -{% endblock %} +{% endblock head %} {% block page_title %} {% inventree_title %} -{% endblock %} +{% endblock page_title %} @@ -84,7 +84,7 @@ @@ -107,28 +107,28 @@ {% endif %} - {% endblock %} + {% endblock alerts %} {% block breadcrumb_list %} - {% endblock %} + {% endblock breadcrumb_list %} {% block content %} - {% endblock %} + {% endblock content %} @@ -180,7 +180,7 @@ {% block js_load %} -{% endblock %} +{% endblock js_load %} {% block js %} -{% endblock %} +{% endblock js %} diff --git a/InvenTree/templates/email/email.html b/InvenTree/templates/email/email.html index 710203aed9..69058dd11e 100644 --- a/InvenTree/templates/email/email.html +++ b/InvenTree/templates/email/email.html @@ -8,36 +8,36 @@ {% block header_row %} -

{% block title %}{% endblock %}

+

{% block title %}{% endblock title %}

{% block subtitle %} - {% endblock %} - {% endblock %} + {% endblock subtitle %} + {% endblock header_row %} - {% endblock %} + {% endblock header %} {% block body %} {% block body_row %} - {% endblock %} + {% endblock body_row %} - {% endblock %} + {% endblock body %} {% block footer %} {% block footer_prefix %} - {% endblock %} + {% endblock footer_prefix %}

{% inventree_version shortstring=True %} - InvenTree Documentation

{% block footer_suffix %} - {% endblock %} + {% endblock footer_suffix %} - {% endblock %} + {% endblock footer %} diff --git a/InvenTree/templates/email/low_stock_notification.html b/InvenTree/templates/email/low_stock_notification.html index 01c475cd87..71d8bcaf9f 100644 --- a/InvenTree/templates/email/low_stock_notification.html +++ b/InvenTree/templates/email/low_stock_notification.html @@ -10,7 +10,6 @@ {% endif %} {% endblock title %} - {% block body %} {% trans "Part" %} diff --git a/InvenTree/templates/hover_image.html b/InvenTree/templates/hover_image.html index a1c8224f3c..d6925f1861 100644 --- a/InvenTree/templates/hover_image.html +++ b/InvenTree/templates/hover_image.html @@ -4,9 +4,9 @@ {% if hover %} {% endif %} - + {% trans "Image" %} {% if hover and image %} - + {% trans "Image" %} {% endif %} diff --git a/InvenTree/templates/mail.html b/InvenTree/templates/mail.html index fe4d213ebe..02f46e39fa 100644 --- a/InvenTree/templates/mail.html +++ b/InvenTree/templates/mail.html @@ -1 +1 @@ -{{ mail }}{% include "clip.html"%} +{{ mail }}{% include "clip.html" %} diff --git a/InvenTree/templates/modal_form.html b/InvenTree/templates/modal_form.html index b423c23ba5..5d7de520ce 100644 --- a/InvenTree/templates/modal_form.html +++ b/InvenTree/templates/modal_form.html @@ -14,7 +14,7 @@ {% block pre_form_content %} -{% endblock %} +{% endblock pre_form_content %} {% block form %}
@@ -22,13 +22,13 @@ {% load crispy_forms_tags %} {% block form_data %} - {% endblock %} + {% endblock form_data %} {% crispy form %}
-{% endblock %} +{% endblock form %} {% block post_form_content %} -{% endblock %} +{% endblock post_form_content %} diff --git a/InvenTree/templates/modals.html b/InvenTree/templates/modals.html index 31e94640ed..bf555de9b2 100644 --- a/InvenTree/templates/modals.html +++ b/InvenTree/templates/modals.html @@ -3,7 +3,7 @@ diff --git a/InvenTree/templates/navbar.html b/InvenTree/templates/navbar.html index 1be812c509..ccd60393c1 100644 --- a/InvenTree/templates/navbar.html +++ b/InvenTree/templates/navbar.html @@ -14,7 +14,7 @@