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
This commit is contained in:
Matthias Mair 2023-05-02 12:03:52 +02:00 committed by GitHub
parent 09fabff551
commit 10c3d101e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
145 changed files with 510 additions and 2589 deletions

3
.djlintrc Normal file
View File

@ -0,0 +1,3 @@
{
"ignore": "D018,H006,H008,H020,H021,H023,H025,H030,H031,T002"
}

View File

@ -76,22 +76,6 @@ jobs:
python InvenTree/manage.py prerender python InvenTree/manage.py prerender
npx eslint InvenTree/InvenTree/static_i18n/i18n/*.js 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: pre-commit:
name: Style [pre-commit] name: Style [pre-commit]
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
@ -194,7 +178,7 @@ jobs:
name: Tests - DB [SQLite] + Coverage name: Tests - DB [SQLite] + Coverage
runs-on: ubuntu-20.04 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 continue-on-error: true # continue if a step fails so that coverage gets pushed
env: env:
@ -227,7 +211,7 @@ jobs:
postgres: postgres:
name: Tests - DB [PostgreSQL] name: Tests - DB [PostgreSQL]
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
needs: [ 'javascript', 'html', 'pre-commit' ] needs: [ 'javascript', 'pre-commit' ]
env: env:
INVENTREE_DB_ENGINE: django.db.backends.postgresql INVENTREE_DB_ENGINE: django.db.backends.postgresql
@ -271,7 +255,7 @@ jobs:
name: Tests - DB [MySQL] name: Tests - DB [MySQL]
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
needs: [ 'javascript', 'html', 'pre-commit' ] needs: [ 'javascript', 'pre-commit' ]
if: github.event_name == 'push' if: github.event_name == 'push'
env: env:

View File

@ -1,9 +0,0 @@
{
"overrides": {
"**/templates/*.html": {
"rules": {
"[[character-reference]]": false
}
}
}
}

View File

@ -40,3 +40,7 @@ repos:
name: pip-compile requirements.txt name: pip-compile requirements.txt
args: [requirements.in, -o, requirements.txt] args: [requirements.in, -o, requirements.txt]
files: ^requirements\.(in|txt)$ files: ^requirements\.(in|txt)$
- repo: https://github.com/Riverside-Healthcare/djLint
rev: v1.25.0
hooks:
- id: djlint-django

View File

@ -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. 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`. 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 ## Documentation
New features or updates to existing features should be accompanied by user documentation. New features or updates to existing features should be accompanied by user documentation.

View File

@ -7,7 +7,7 @@
{% block page_title %} {% block page_title %}
{% inventree_title %} | {% trans "Build Order" %} - {{ build }} {% inventree_title %} | {% trans "Build Order" %} - {{ build }}
{% endblock %} {% endblock page_title %}
{% block breadcrumbs %} {% block breadcrumbs %}
<li class='breadcrumb-item'><a href='{% url "build-index" %}'>{% trans "Build Orders" %}</a></li> <li class='breadcrumb-item'><a href='{% url "build-index" %}'>{% trans "Build Orders" %}</a></li>
@ -25,7 +25,7 @@ src="{% static 'img/blank_image.png' %}"
{% block heading %} {% block heading %}
{% trans "Build Order" %} {{ build }} {% trans "Build Order" %} {{ build }}
{% endblock %} {% endblock heading %}
{% block actions %} {% block actions %}
<!-- Admin Display --> <!-- Admin Display -->
@ -147,7 +147,7 @@ src="{% static 'img/blank_image.png' %}"
{% endif %} {% endif %}
{% endif %} {% endif %}
</div> </div>
{% endblock %} {% endblock details %}
{% block details_right %} {% block details_right %}
<table class='table table-striped table-condensed'> <table class='table table-striped table-condensed'>
@ -219,7 +219,7 @@ src="{% static 'img/blank_image.png' %}"
</tr> </tr>
{% endif %} {% endif %}
</table> </table>
{% endblock %} {% endblock details_right %}
{% block page_data %} {% block page_data %}
<h3> <h3>
@ -231,8 +231,7 @@ src="{% static 'img/blank_image.png' %}"
<hr> <hr>
<p>{{ build.title }}</p> <p>{{ build.title }}</p>
{% endblock page_data %}
{% endblock %}
{% block js_ready %} {% block js_ready %}
@ -288,7 +287,7 @@ src="{% static 'img/blank_image.png' %}"
$('#show-qr-code').click(function() { $('#show-qr-code').click(function() {
showQRDialog( showQRDialog(
'{% trans "Build Order QR Code" %}', '{% trans "Build Order QR Code" %}',
'{"build": {{ build.pk }}}' '{"build": {{ build.pk }} }'
); );
}); });
@ -312,4 +311,4 @@ src="{% static 'img/blank_image.png' %}"
{% endif %} {% endif %}
{% endif %} {% endif %}
{% endblock %} {% endblock js_ready %}

View File

@ -6,7 +6,7 @@
{% block sidebar %} {% block sidebar %}
{% include "build/sidebar.html" %} {% include "build/sidebar.html" %}
{% endblock %} {% endblock sidebar %}
{% block page_content %} {% block page_content %}
@ -22,12 +22,12 @@
<tr> <tr>
<td><span class='fas fa-info'></span></td> <td><span class='fas fa-info'></span></td>
<td>{% trans "Description" %}</td> <td>{% trans "Description" %}</td>
<td>{{ build.title }}{% include "clip.html"%}</td> <td>{{ build.title }}{% include "clip.html" %}</td>
</tr> </tr>
<tr> <tr>
<td><span class='fas fa-shapes'></span></td> <td><span class='fas fa-shapes'></span></td>
<td>{% trans "Part" %}</td> <td>{% trans "Part" %}</td>
<td><a href="{% url 'part-detail' build.part.id %}?display=build-orders">{{ build.part.full_name }}</a>{% include "clip.html"%}</td> <td><a href="{% url 'part-detail' build.part.id %}?display=build-orders">{{ build.part.full_name }}</a>{% include "clip.html" %}</td>
</tr> </tr>
<tr> <tr>
<td></td> <td></td>
@ -38,7 +38,7 @@
<td>{% trans "Stock Source" %}</td> <td>{% trans "Stock Source" %}</td>
<td> <td>
{% if build.take_from %} {% if build.take_from %}
<a href="{% url 'stock-location-detail' build.take_from.id %}">{{ build.take_from }}</a>{% include "clip.html"%} <a href="{% url 'stock-location-detail' build.take_from.id %}">{{ build.take_from }}</a>{% include "clip.html" %}
{% else %} {% else %}
<em>{% trans "Stock can be taken from any available location." %}</em> <em>{% trans "Stock can be taken from any available location." %}</em>
{% endif %} {% endif %}
@ -51,7 +51,7 @@
{% if build.destination %} {% if build.destination %}
<a href="{% url 'stock-location-detail' build.destination.id %}"> <a href="{% url 'stock-location-detail' build.destination.id %}">
{{ build.destination }} {{ build.destination }}
</a>{% include "clip.html"%} </a>{% include "clip.html" %}
{% else %} {% else %}
<em>{% trans "Destination location not specified" %}</em> <em>{% trans "Destination location not specified" %}</em>
{% endif %} {% endif %}
@ -78,14 +78,14 @@
<tr> <tr>
<td><span class='fas fa-layer-group'></span></td> <td><span class='fas fa-layer-group'></span></td>
<td>{% trans "Batch" %}</td> <td>{% trans "Batch" %}</td>
<td>{{ build.batch }}{% include "clip.html"%}</td> <td>{{ build.batch }}{% include "clip.html" %}</td>
</tr> </tr>
{% endif %} {% endif %}
{% if build.parent %} {% if build.parent %}
<tr> <tr>
<td><span class='fas fa-sitemap'></span></td> <td><span class='fas fa-sitemap'></span></td>
<td>{% trans "Parent Build" %}</td> <td>{% trans "Parent Build" %}</td>
<td><a href="{% url 'build-detail' build.parent.id %}">{{ build.parent }}</a>{% include "clip.html"%}</td> <td><a href="{% url 'build-detail' build.parent.id %}">{{ build.parent }}</a>{% include "clip.html" %}</td>
</tr> </tr>
{% endif %} {% endif %}
{% if build.priority != 0 %} {% if build.priority != 0 %}
@ -99,7 +99,7 @@
<tr> <tr>
<td><span class='fas fa-dolly'></span></td> <td><span class='fas fa-dolly'></span></td>
<td>{% trans "Sales Order" %}</td> <td>{% trans "Sales Order" %}</td>
<td><a href="{% url 'so-detail' build.sales_order.id %}">{{ build.sales_order }}</a>{% include "clip.html"%}</td> <td><a href="{% url 'so-detail' build.sales_order.id %}">{{ build.sales_order }}</a>{% include "clip.html" %}</td>
</tr> </tr>
{% endif %} {% endif %}
{% if build.link %} {% if build.link %}
@ -319,8 +319,7 @@
</div> </div>
</div> </div>
{% endblock page_content %}
{% endblock %}
{% block js_ready %} {% block js_ready %}
{{ block.super }} {{ block.super }}
@ -519,4 +518,4 @@ $('#allocate-selected-items').click(function() {
enableSidebar('buildorder'); enableSidebar('buildorder');
{% endblock %} {% endblock js_ready %}

View File

@ -6,11 +6,11 @@
{% block page_title %} {% block page_title %}
{% inventree_title %} | {% trans "Build Orders" %} {% inventree_title %} | {% trans "Build Orders" %}
{% endblock %} {% endblock page_title %}
{% block heading %} {% block heading %}
{% trans "Build Orders" %} {% trans "Build Orders" %}
{% endblock %} {% endblock heading %}
{% block actions %} {% block actions %}
{% if roles.build.add %} {% if roles.build.add %}
@ -18,7 +18,7 @@
<span class='fas fa-tools'></span> {% trans "New Build Order" %} <span class='fas fa-tools'></span> {% trans "New Build Order" %}
</button> </button>
{% endif %} {% endif %}
{% endblock %} {% endblock actions %}
{% block page_info %} {% block page_info %}
@ -35,7 +35,7 @@
</table> </table>
</div> </div>
{% endblock %} {% endblock page_info %}
{% block js_ready %} {% block js_ready %}
{{ block.super }} {{ block.super }}
@ -48,4 +48,4 @@ loadBuildTable($("#build-table"), {
locale: '{{ request.LANGUAGE_CODE }}', locale: '{{ request.LANGUAGE_CODE }}',
}); });
{% endblock %} {% endblock js_ready %}

View File

@ -6,11 +6,11 @@
{% block page_title %} {% block page_title %}
{% inventree_title %} | {% trans "Company" %} - {{ company.name }} {% inventree_title %} | {% trans "Company" %} - {{ company.name }}
{% endblock %} {% endblock page_title %}
{% block heading %} {% block heading %}
{% trans "Company" %}: {{ company.name }} {% trans "Company" %}: {{ company.name }}
{% endblock %} {% endblock heading %}
{% block actions %} {% block actions %}
<!-- Admin View --> <!-- Admin View -->
@ -45,7 +45,7 @@
{% block thumbnail %} {% block thumbnail %}
<div class='dropzone part-thumb-container' id='company-thumb'> <div class='dropzone part-thumb-container' id='company-thumb'>
<img class="part-thumb" id='company-image' <img class="part-thumb" id='company-image' alt="{% trans 'Part image' %}"
{% if company.image %} {% if company.image %}
src="{{ company.image.preview.url }}" src="{{ company.image.preview.url }}"
{% else %} {% else %}
@ -62,7 +62,7 @@
</div> </div>
</div> </div>
</div> </div>
{% endblock %} {% endblock thumbnail %}
{% block details %} {% block details %}
<table class='table table-striped table-condensed'> <table class='table table-striped table-condensed'>
@ -74,7 +74,7 @@
</tr> </tr>
<tr> <tr>
<td><span class='fas fa-industry'></span></td> <td><span class='fas fa-industry'></span></td>
<td>{%trans "Manufacturer" %}</td> <td>{% trans "Manufacturer" %}</td>
<td>{% include "yesnolabel.html" with value=company.is_manufacturer %}</td> <td>{% include "yesnolabel.html" with value=company.is_manufacturer %}</td>
</tr> </tr>
<tr> <tr>
@ -89,7 +89,7 @@
</tr> </tr>
</table> </table>
{% endblock %} {% endblock details %}
{% block details_right %} {% block details_right %}
@ -99,7 +99,7 @@
<tr> <tr>
<td><span class='fas fa-globe'></span></td> <td><span class='fas fa-globe'></span></td>
<td>{% trans "Website" %}</td> <td>{% trans "Website" %}</td>
<td><a href="{{ company.website }}">{{ company.website }}</a>{% include "clip.html"%}</td> <td><a href="{{ company.website }}">{{ company.website }}</a>{% include "clip.html" %}</td>
</tr> </tr>
{% endif %} {% endif %}
<tr> <tr>
@ -117,7 +117,7 @@
<tr> <tr>
<td><span class='fas fa-map-marked-alt'></span></td> <td><span class='fas fa-map-marked-alt'></span></td>
<td>{% trans "Address" %}</td> <td>{% trans "Address" %}</td>
<td>{{ company.address }}{% include "clip.html"%}</td> <td>{{ company.address }}{% include "clip.html" %}</td>
</tr> </tr>
{% endif %} {% endif %}
{% if company.phone %} {% if company.phone %}
@ -138,11 +138,11 @@
<tr> <tr>
<td><span class='fas fa-user'></span></td> <td><span class='fas fa-user'></span></td>
<td>{% trans "Contact" %}</td> <td>{% trans "Contact" %}</td>
<td>{{ company.contact }}{% include "clip.html"%}</td> <td>{{ company.contact }}{% include "clip.html" %}</td>
</tr> </tr>
{% endif %} {% endif %}
</table> </table>
{% endblock %} {% endblock details_right %}
{% block js_ready %} {% block js_ready %}
{{ block.super }} {{ block.super }}
@ -262,4 +262,4 @@
}); });
} }
{% endblock %} {% endblock js_ready %}

View File

@ -5,7 +5,7 @@
{% block sidebar %} {% block sidebar %}
{% include 'company/sidebar.html' %} {% include 'company/sidebar.html' %}
{% endblock %} {% endblock sidebar %}
{% block page_content %} {% block page_content %}
@ -270,7 +270,7 @@
</div> </div>
</div> </div>
{% endblock %} {% endblock page_content %}
{% block js_ready %} {% block js_ready %}
{{ block.super }} {{ block.super }}
@ -542,4 +542,4 @@
enableSidebar('company'); enableSidebar('company');
{% endblock %} {% endblock js_ready %}

View File

@ -6,11 +6,11 @@
{% block page_title %} {% block page_title %}
{% inventree_title %} | {% trans "Supplier List" %} {% inventree_title %} | {% trans "Supplier List" %}
{% endblock %} {% endblock page_title %}
{% block heading %} {% block heading %}
{{ title }} {{ title }}
{% endblock %} {% endblock heading %}
{% block actions %} {% 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 %} {% 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 @@
<span class='fas fa-plus-circle'></span> {{ button_text }} <span class='fas fa-plus-circle'></span> {{ button_text }}
</button> </button>
{% endif %} {% endif %}
{% endblock %} {% endblock actions %}
{% block page_info %} {% block page_info %}
@ -32,7 +32,7 @@
</table> </table>
</div> </div>
{% endblock %} {% endblock page_info %}
{% block js_ready %} {% block js_ready %}
{{ block.super }} {{ block.super }}
@ -59,4 +59,4 @@
} }
); );
{% endblock %} {% endblock js_ready %}

View File

@ -5,7 +5,7 @@
{% block page_title %} {% block page_title %}
{% inventree_title %} | {% trans "Manufacturer Part" %} {% inventree_title %} | {% trans "Manufacturer Part" %}
{% endblock %} {% endblock page_title %}
{% block sidebar %} {% block sidebar %}
{% include "company/manufacturer_part_sidebar.html" %} {% include "company/manufacturer_part_sidebar.html" %}
@ -48,7 +48,7 @@
{% endblock actions %} {% endblock actions %}
{% block thumbnail %} {% block thumbnail %}
<img class='part-thumb' <img class='part-thumb' alt="{% trans 'Part image' %}"
{% if part.part.image %} {% if part.part.image %}
src='{{ part.part.image.preview.url }}' src='{{ part.part.image.preview.url }}'
{% else %} {% else %}
@ -65,7 +65,7 @@ src="{% static 'img/blank_image.png' %}"
<td>{% trans "Internal Part" %}</td> <td>{% trans "Internal Part" %}</td>
<td> <td>
{% if part.part %} {% if part.part %}
<a href="{% url 'part-detail' part.part.id %}?display=part-suppliers">{{ part.part.full_name }}</a>{% include "clip.html"%} <a href="{% url 'part-detail' part.part.id %}?display=part-suppliers">{{ part.part.full_name }}</a>{% include "clip.html" %}
{% endif %} {% endif %}
</td> </td>
</tr> </tr>
@ -73,7 +73,7 @@ src="{% static 'img/blank_image.png' %}"
<tr> <tr>
<td></td> <td></td>
<td>{% trans "Description" %}</td> <td>{% trans "Description" %}</td>
<td>{{ part.description }}{% include "clip.html"%}</td> <td>{{ part.description }}{% include "clip.html" %}</td>
</tr> </tr>
{% endif %} {% endif %}
</table> </table>
@ -90,7 +90,7 @@ src="{% static 'img/blank_image.png' %}"
<td>{% trans "Manufacturer" %}</td> <td>{% trans "Manufacturer" %}</td>
<td> <td>
{% if part.manufacturer %} {% if part.manufacturer %}
<a href="{% url 'company-detail' part.manufacturer.id %}">{{ part.manufacturer.name }}</a>{% include "clip.html"%} <a href="{% url 'company-detail' part.manufacturer.id %}">{{ part.manufacturer.name }}</a>{% include "clip.html" %}
{% else %} {% else %}
<em>{% trans "No manufacturer information available" %}</em> <em>{% trans "No manufacturer information available" %}</em>
{% endif %} {% endif %}
@ -99,7 +99,7 @@ src="{% static 'img/blank_image.png' %}"
<tr> <tr>
<td><span class='fas fa-hashtag'></span></td> <td><span class='fas fa-hashtag'></span></td>
<td>{% trans "MPN" %}</td> <td>{% trans "MPN" %}</td>
<td>{{ part.MPN }}{% include "clip.html"%}</td> <td>{{ part.MPN }}{% include "clip.html" %}</td>
</tr> </tr>
{% if part.link %} {% if part.link %}
<tr> <tr>
@ -191,8 +191,7 @@ src="{% static 'img/blank_image.png' %}"
</div> </div>
</div> </div>
{% endblock %} {% endblock page_content %}
{% block js_ready %} {% block js_ready %}
{{ block.super }} {{ block.super }}
@ -325,7 +324,7 @@ $('#delete-part').click(function() {
success: function() { success: function() {
{% if part.manufacturer %} {% if part.manufacturer %}
window.location.href = "{% url 'company-detail' part.manufacturer.id %}"; window.location.href = "{% url 'company-detail' part.manufacturer.id %}";
{% else%} {% else %}
window.location.href = "{% url 'index' %}"; window.location.href = "{% url 'index' %}";
{% endif %} {% endif %}
} }
@ -338,4 +337,4 @@ $('#delete-part').click(function() {
enableSidebar('manufacturerpart'); enableSidebar('manufacturerpart');
{% endblock %} {% endblock js_ready %}

View File

@ -81,13 +81,13 @@
{% endblock actions %} {% endblock actions %}
{% block thumbnail %} {% block thumbnail %}
<img class='part-thumb' <img class='part-thumb' alt="{% trans 'Part image' %}"
{% if part.part.image %} {% if part.part.image %}
src='{{ part.part.image.preview.url }}' src='{{ part.part.image.preview.url }}'
{% else %} {% else %}
src="{% static 'img/blank_image.png' %}" src="{% static 'img/blank_image.png' %}"
{% endif %}/> {% endif %}/>
{% endblock %} {% endblock thumbnail %}
{% block details %} {% block details %}
@ -98,7 +98,7 @@ src="{% static 'img/blank_image.png' %}"
<td>{% trans "Internal Part" %}</td> <td>{% trans "Internal Part" %}</td>
<td> <td>
{% if part.part %} {% if part.part %}
<a href="{% url 'part-detail' part.part.id %}?display=part-suppliers">{{ part.part.full_name }}</a>{% include "clip.html"%} <a href="{% url 'part-detail' part.part.id %}?display=part-suppliers">{{ part.part.full_name }}</a>{% include "clip.html" %}
{% endif %} {% endif %}
</td> </td>
</tr> </tr>
@ -106,7 +106,7 @@ src="{% static 'img/blank_image.png' %}"
<tr> <tr>
<td></td> <td></td>
<td>{% trans "Description" %}</td> <td>{% trans "Description" %}</td>
<td>{{ part.description }}{% include "clip.html"%}</td> <td>{{ part.description }}{% include "clip.html" %}</td>
</tr> </tr>
{% endif %} {% endif %}
{% if part.availability_updated %} {% if part.availability_updated %}
@ -129,7 +129,7 @@ src="{% static 'img/blank_image.png' %}"
<td><span class='fas fa-building'></span></td> <td><span class='fas fa-building'></span></td>
<td>{% trans "Supplier" %}</td> <td>{% trans "Supplier" %}</td>
<td>{% if part.supplier %} <td>{% if part.supplier %}
<a href="{% url 'company-detail' part.supplier.id %}">{{ part.supplier.name }}</a>{% include "clip.html"%} <a href="{% url 'company-detail' part.supplier.id %}">{{ part.supplier.name }}</a>{% include "clip.html" %}
{% else %} {% else %}
<em>{% trans "No supplier information available" %}</em> <em>{% trans "No supplier information available" %}</em>
{% endif %} {% endif %}
@ -138,28 +138,28 @@ src="{% static 'img/blank_image.png' %}"
<tr> <tr>
<td><span class='fas fa-hashtag'></span></td> <td><span class='fas fa-hashtag'></span></td>
<td>{% trans "SKU" %}</td> <td>{% trans "SKU" %}</td>
<td>{{ part.SKU }}{% include "clip.html"%}</tr> <td>{{ part.SKU }}{% include "clip.html" %}</tr>
</tr> </tr>
{% if part.manufacturer_part.manufacturer %} {% if part.manufacturer_part.manufacturer %}
<tr> <tr>
<td><span class='fas fa-industry'></span></td> <td><span class='fas fa-industry'></span></td>
<td>{% trans "Manufacturer" %}</td> <td>{% trans "Manufacturer" %}</td>
<td><a href="{% url 'company-detail' part.manufacturer_part.manufacturer.id %}"> <td><a href="{% url 'company-detail' part.manufacturer_part.manufacturer.id %}">
{{ part.manufacturer_part.manufacturer.name }}</a>{% include "clip.html"%}</td> {{ part.manufacturer_part.manufacturer.name }}</a>{% include "clip.html" %}</td>
</tr> </tr>
{% endif %} {% endif %}
{% if part.manufacturer_part.MPN %} {% if part.manufacturer_part.MPN %}
<tr> <tr>
<td><span class='fas fa-hashtag'></span></td> <td><span class='fas fa-hashtag'></span></td>
<td>{% trans "MPN" %}</td> <td>{% trans "MPN" %}</td>
<td><a href="{% url 'manufacturer-part-detail' part.manufacturer_part.id %}">{{ part.manufacturer_part.MPN }}</a>{% include "clip.html"%}</td> <td><a href="{% url 'manufacturer-part-detail' part.manufacturer_part.id %}">{{ part.manufacturer_part.MPN }}</a>{% include "clip.html" %}</td>
</tr> </tr>
{% endif %} {% endif %}
{% if part.packaging %} {% if part.packaging %}
<tr> <tr>
<td><span class='fas fa-cube'></span></td> <td><span class='fas fa-cube'></span></td>
<td>{% trans "Packaging" %}</td> <td>{% trans "Packaging" %}</td>
<td>{{ part.packaging }}{% include "clip.html"%}</td> <td>{{ part.packaging }}{% include "clip.html" %}</td>
</tr> </tr>
{% endif %} {% endif %}
{% if part.pack_size != 1.0 %} {% if part.pack_size != 1.0 %}
@ -173,7 +173,7 @@ src="{% static 'img/blank_image.png' %}"
<tr> <tr>
<td><span class='fas fa-sticky-note'></span></td> <td><span class='fas fa-sticky-note'></span></td>
<td>{% trans "Note" %}</td> <td>{% trans "Note" %}</td>
<td>{{ part.note }}{% include "clip.html"%}</td> <td>{{ part.note }}{% include "clip.html" %}</td>
</tr> </tr>
{% endif %} {% endif %}
{% if part.link %} {% if part.link %}
@ -184,7 +184,7 @@ src="{% static 'img/blank_image.png' %}"
</tr> </tr>
{% endif %} {% endif %}
</table> </table>
{% endblock %} {% endblock details_right %}
{% block page_content %} {% block page_content %}
@ -256,7 +256,7 @@ src="{% static 'img/blank_image.png' %}"
</div> </div>
</div> </div>
{% endblock %} {% endblock page_content %}
{% block js_ready %} {% block js_ready %}
{{ block.super }} {{ block.super }}
@ -266,7 +266,7 @@ src="{% static 'img/blank_image.png' %}"
$("#show-qr-code").click(function() { $("#show-qr-code").click(function() {
showQRDialog( showQRDialog(
'{% trans "Supplier Part QR Code" %}', '{% trans "Supplier Part QR Code" %}',
'{"supplierpart": {{ part.pk }}}' '{"supplierpart": {{ part.pk }} }'
); );
}); });
@ -397,4 +397,4 @@ $('#delete-part').click(function() {
enableSidebar('supplierpart'); enableSidebar('supplierpart');
{% endblock %} {% endblock js_ready %}

View File

@ -10,7 +10,7 @@
{% endlocalize %} {% endlocalize %}
{% block margin %} {% block margin %}
margin: 0mm; margin: 0mm;
{% endblock %} {% endblock margin %}
} }
body { body {
@ -35,7 +35,7 @@
{% block style %} {% block style %}
/* User-defined styles can go here */ /* User-defined styles can go here */
{% endblock %} {% endblock style %}
</style> </style>
</head> </head>
@ -44,6 +44,6 @@
<div class='content'> <div class='content'>
{% block content %} {% block content %}
<!-- Label data rendered here! --> <!-- Label data rendered here! -->
{% endblock %} {% endblock content %}
</div> </div>
</body> </body>

View File

@ -1,7 +1,6 @@
{% extends "label/label_base.html" %} {% extends "label/label_base.html" %}
{% load l10n %} {% load l10n i18n barcode %}
{% load barcode %}
{% block style %} {% block style %}
@ -25,14 +24,14 @@
top: 2mm; top: 2mm;
} }
{% endblock %} {% endblock style %}
{% block content %} {% block content %}
<img class='qr' src='{% qrcode qr_data %}'> <img class='qr' alt="{% trans 'QC Code' %}" src='{% qrcode qr_data %}'>
<div class='part'> <div class='part'>
{{ part.full_name }} {{ part.full_name }}
</div> </div>
{% endblock %} {% endblock content %}

View File

@ -1,7 +1,6 @@
{% extends "label/label_base.html" %} {% extends "label/label_base.html" %}
{% load l10n %} {% load l10n i18n barcode %}
{% load barcode %}
{% block style %} {% block style %}
@ -25,14 +24,14 @@
top: 2mm; top: 2mm;
} }
{% endblock %} {% endblock style %}
{% block content %} {% block content %}
<img class='qr' src='{% barcode qr_data %}'> <img class='qr' alt='{% trans "QR code" %}' src='{% barcode qr_data %}'>
<div class='part'> <div class='part'>
{{ part.full_name }} {{ part.full_name }}
</div> </div>
{% endblock %} {% endblock content %}

View File

@ -1,7 +1,6 @@
{% extends "label/label_base.html" %} {% extends "label/label_base.html" %}
{% load l10n %} {% load l10n i18n barcode %}
{% load barcode %}
{% block style %} {% block style %}
@ -15,9 +14,9 @@
{% endlocalize %} {% endlocalize %}
} }
{% endblock %} {% endblock style %}
{% block content %} {% block content %}
<img class='qr' src='{% qrcode qr_data %}'> <img class='qr' alt="{% trans 'QC Code' %}" src='{% qrcode qr_data %}'>
{% endblock %} {% endblock content %}

View File

@ -1,7 +1,6 @@
{% extends "label/label_base.html" %} {% extends "label/label_base.html" %}
{% load l10n %} {% load l10n i18n barcode %}
{% load barcode %}
{% block style %} {% block style %}
@ -15,9 +14,9 @@
{% endlocalize %} {% endlocalize %}
} }
{% endblock %} {% endblock style %}
{% block content %} {% block content %}
<img class='qr' src='{% qrcode qr_data %}'> <img class='qr' alt="{% trans 'QC Code' %}" src='{% qrcode qr_data %}'>
{% endblock %} {% endblock content %}

View File

@ -1,7 +1,6 @@
{% extends "label/label_base.html" %} {% extends "label/label_base.html" %}
{% load l10n %} {% load l10n i18n barcode %}
{% load barcode %}
{% block style %} {% block style %}
@ -25,14 +24,14 @@
top: 2mm; top: 2mm;
} }
{% endblock %} {% endblock style %}
{% block content %} {% block content %}
<img class='qr' src='{% qrcode qr_data %}'> <img class='qr' alt="{% trans 'QR code' %}" src='{% qrcode qr_data %}'>
<div class='loc'> <div class='loc'>
{{ location.name }} {{ location.name }}
</div> </div>
{% endblock %} {% endblock content %}

View File

@ -108,7 +108,7 @@ src="{% static 'img/blank_image.png' %}"
<tr> <tr>
<td><span class='fas fa-hashtag'></span></td> <td><span class='fas fa-hashtag'></span></td>
<td>{% trans "Order Reference" %}</td> <td>{% trans "Order Reference" %}</td>
<td>{{ order.reference }}{% include "clip.html"%}</td> <td>{{ order.reference }}{% include "clip.html" %}</td>
</tr> </tr>
<tr> <tr>
<td><span class='fas fa-info-circle'></span></td> <td><span class='fas fa-info-circle'></span></td>
@ -140,7 +140,7 @@ src="{% static 'img/blank_image.png' %}"
<td>{% trans "Supplier" %}</td> <td>{% trans "Supplier" %}</td>
<td> <td>
{% if order.supplier %} {% if order.supplier %}
<a href="{% url 'company-detail' order.supplier.id %}">{{ order.supplier.name }}</a>{% include "clip.html"%} <a href="{% url 'company-detail' order.supplier.id %}">{{ order.supplier.name }}</a>{% include "clip.html" %}
{% else %} {% else %}
<em>{% trans "No suppplier information available" %}</em> <em>{% trans "No suppplier information available" %}</em>
{% endif %} {% endif %}
@ -150,7 +150,7 @@ src="{% static 'img/blank_image.png' %}"
<tr> <tr>
<td><span class='fas fa-hashtag'></span></td> <td><span class='fas fa-hashtag'></span></td>
<td>{% trans "Supplier Reference" %}</td> <td>{% trans "Supplier Reference" %}</td>
<td>{{ order.supplier_reference }}{% include "clip.html"%}</td> <td>{{ order.supplier_reference }}{% include "clip.html" %}</td>
</tr> </tr>
{% endif %} {% endif %}
<tr> <tr>
@ -329,7 +329,7 @@ $("#export-order").click(function() {
$('#show-qr-code').click(function() { $('#show-qr-code').click(function() {
showQRDialog( showQRDialog(
'{% trans "Purchase Order QR Code" %}', '{% trans "Purchase Order QR Code" %}',
'{"purchaseorder": {{ order.pk }}}' '{"purchaseorder": {{ order.pk }} }'
); );
}); });

View File

@ -96,4 +96,4 @@ $('.fieldselect').select2({
matcher: partialMatcher, matcher: partialMatcher,
}); });
{% endblock %} {% endblock js_ready %}

View File

@ -44,7 +44,7 @@
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr></tr> {% comment %} Dummy row for javascript del_row method {% endcomment %} <tr>{% comment %} Dummy row for javascript del_row method {% endcomment %}</tr>
{% for row in rows %} {% for row in rows %}
<tr {% if row.errors %} style='background: #ffeaea;'{% endif %} part-select='#select_part_{{ row.index }}'> <tr {% if row.errors %} style='background: #ffeaea;'{% endif %} part-select='#select_part_{{ row.index }}'>
<td> <td>
@ -123,4 +123,4 @@ $('.currencyselect').select2({
dropdownAutoWidth: true, dropdownAutoWidth: true,
}); });
{% endblock %} {% endblock js_ready %}

View File

@ -7,7 +7,7 @@
{% url "po-detail" order.id as url %} {% url "po-detail" order.id as url %}
{% trans "Return to Orders" as text %} {% trans "Return to Orders" as text %}
{% include "sidebar_item.html" with url=url text=text icon="fa-undo" %} {% include "sidebar_item.html" with url=url text=text icon="fa-undo" %}
{% endblock %} {% endblock sidebar %}
{% block page_content %} {% block page_content %}
{% trans "Upload File for Purchase Order" as header_text %} {% trans "Upload File for Purchase Order" as header_text %}
@ -60,9 +60,9 @@
</div> </div>
</div> </div>
{% endwith %} {% endwith %}
{% endblock %} {% endblock page_content %}
{% block js_ready %} {% block js_ready %}
{{ block.super }} {{ block.super }}
{% endblock %} {% endblock js_ready %}

View File

@ -5,7 +5,6 @@
{% load i18n %} {% load i18n %}
{% load static %} {% load static %}
{% block sidebar %} {% block sidebar %}
{% include 'order/po_sidebar.html' %} {% include 'order/po_sidebar.html' %}
{% endblock sidebar %} {% endblock sidebar %}
@ -264,4 +263,4 @@ loadOrderTotal(
enableSidebar('purchaseorder'); enableSidebar('purchaseorder');
{% endblock %} {% endblock js_ready %}

View File

@ -6,11 +6,11 @@
{% block page_title %} {% block page_title %}
{% inventree_title %} | {% trans "Purchase Orders" %} {% inventree_title %} | {% trans "Purchase Orders" %}
{% endblock %} {% endblock page_title %}
{% block heading %} {% block heading %}
{% trans "Purchase Orders" %} {% trans "Purchase Orders" %}
{% endblock %} {% endblock heading %}
{% block actions %} {% block actions %}
{% if roles.purchase_order.add %} {% if roles.purchase_order.add %}
@ -18,7 +18,7 @@
<span class='fas fa-plus-circle'></span> {% trans "New Purchase Order" %} <span class='fas fa-plus-circle'></span> {% trans "New Purchase Order" %}
</button> </button>
{% endif %} {% endif %}
{% endblock %} {% endblock actions %}
{% block page_info %} {% block page_info %}
@ -38,12 +38,12 @@
</div> </div>
{% endblock %} {% endblock page_info %}
{% block js_load %} {% block js_load %}
{{ block.super }} {{ block.super }}
{% endblock %} {% endblock js_load %}
{% block js_ready %} {% block js_ready %}
{{ block.super }} {{ block.super }}
@ -56,4 +56,4 @@ loadPurchaseOrderTable("#purchase-order-table", {
url: "{% url 'api-po-list' %}", url: "{% url 'api-po-list' %}",
}); });
{% endblock %} {% endblock js_ready %}

View File

@ -22,7 +22,7 @@ src="{{ order.customer.image.url }}"
src="{% static 'img/blank_image.png' %}" src="{% static 'img/blank_image.png' %}"
{% endif %} {% endif %}
/> />
{% endblock thumbnail%} {% endblock thumbnail %}
{% block heading %} {% block heading %}
{% trans "Return Order" %} {{ order.reference }} {% trans "Return Order" %} {{ order.reference }}
@ -100,7 +100,7 @@ src="{% static 'img/blank_image.png' %}"
<tr> <tr>
<td><span class='fas fa-hashtag'></span></td> <td><span class='fas fa-hashtag'></span></td>
<td>{% trans "Order Reference" %}</td> <td>{% trans "Order Reference" %}</td>
<td>{{ order.reference }}{% include "clip.html"%}</td> <td>{{ order.reference }}{% include "clip.html" %}</td>
</tr> </tr>
<tr> <tr>
<td><span class='fas fa-info-circle'></span></td> <td><span class='fas fa-info-circle'></span></td>
@ -130,14 +130,14 @@ src="{% static 'img/blank_image.png' %}"
<tr> <tr>
<td><span class='fas fa-building'></span></td> <td><span class='fas fa-building'></span></td>
<td>{% trans "Customer" %}</td> <td>{% trans "Customer" %}</td>
<td><a href="{% url 'company-detail' order.customer.id %}">{{ order.customer.name }}</a>{% include "clip.html"%}</td> <td><a href="{% url 'company-detail' order.customer.id %}">{{ order.customer.name }}</a>{% include "clip.html" %}</td>
</tr> </tr>
{% endif %} {% endif %}
{% if order.customer_reference %} {% if order.customer_reference %}
<tr> <tr>
<td><span class='fas fa-hashtag'></span></td> <td><span class='fas fa-hashtag'></span></td>
<td>{% trans "Customer Reference" %}</td> <td>{% trans "Customer Reference" %}</td>
<td>{{ order.customer_reference }}{% include "clip.html"%}</td> <td>{{ order.customer_reference }}{% include "clip.html" %}</td>
</tr> </tr>
{% endif %} {% endif %}
{% if order.link %} {% if order.link %}
@ -255,7 +255,7 @@ $('#print-order-report').click(function() {
$('#show-qr-code').click(function() { $('#show-qr-code').click(function() {
showQRDialog( showQRDialog(
'{% trans "Return Order QR Code" %}', '{% trans "Return Order QR Code" %}',
'{"returnorder": {{ order.pk }}}' '{"returnorder": {{ order.pk }} }'
); );
}); });

View File

@ -6,15 +6,14 @@
{% block page_title %} {% block page_title %}
{% inventree_title %} | {% trans "Return Orders" %} {% inventree_title %} | {% trans "Return Orders" %}
{% endblock %} {% endblock page_title %}
{% block breadcrumb_list %} {% block breadcrumb_list %}
{% endblock %} {% endblock breadcrumb_list %}
{% block heading %} {% block heading %}
{% trans "Return Orders" %} {% trans "Return Orders" %}
{% endblock %} {% endblock heading %}
{% block actions %} {% block actions %}
{% if roles.return_order.add %} {% if roles.return_order.add %}

View File

@ -7,12 +7,12 @@
{% block page_title %} {% block page_title %}
{% inventree_title %} | {% trans "Sales Order" %} {% inventree_title %} | {% trans "Sales Order" %}
{% endblock %} {% endblock page_title %}
{% block breadcrumbs %} {% block breadcrumbs %}
<li class='breadcrumb-item'><a href='{% url "sales-order-index" %}'>{% trans "Sales Orders" %}</a></li> <li class='breadcrumb-item'><a href='{% url "sales-order-index" %}'>{% trans "Sales Orders" %}</a></li>
<li class="breadcrumb-item active" aria-current="page"><a href='{% url "so-detail" order.id %}'>{{ order }}</a></li> <li class="breadcrumb-item active" aria-current="page"><a href='{% url "so-detail" order.id %}'>{{ order }}</a></li>
{% endblock %} {% endblock breadcrumbs %}
{% block thumbnail %} {% block thumbnail %}
<img class='part-thumb' <img class='part-thumb'
@ -22,11 +22,11 @@ src="{{ order.customer.image.url }}"
src="{% static 'img/blank_image.png' %}" src="{% static 'img/blank_image.png' %}"
{% endif %} {% endif %}
/> />
{% endblock %} {% endblock thumbnail %}
{% block heading %} {% block heading %}
{% trans "Sales Order" %} {{ order.reference }} {% trans "Sales Order" %} {{ order.reference }}
{% endblock %} {% endblock heading %}
{% block actions %} {% block actions %}
{% if user.is_staff and roles.sales_order.change %} {% if user.is_staff and roles.sales_order.change %}
@ -105,7 +105,7 @@ src="{% static 'img/blank_image.png' %}"
<tr> <tr>
<td><span class='fas fa-hashtag'></span></td> <td><span class='fas fa-hashtag'></span></td>
<td>{% trans "Order Reference" %}</td> <td>{% trans "Order Reference" %}</td>
<td>{{ order.reference }}{% include "clip.html"%}</td> <td>{{ order.reference }}{% include "clip.html" %}</td>
</tr> </tr>
<tr> <tr>
<td><span class='fas fa-info-circle'></span></td> <td><span class='fas fa-info-circle'></span></td>
@ -134,7 +134,7 @@ src="{% static 'img/blank_image.png' %}"
{% endif %} {% endif %}
</div> </div>
{% endblock %} {% endblock details %}
{% block details_right %} {% block details_right %}
<table class='table table-striped table-condensed'> <table class='table table-striped table-condensed'>
@ -143,14 +143,14 @@ src="{% static 'img/blank_image.png' %}"
<tr> <tr>
<td><span class='fas fa-building'></span></td> <td><span class='fas fa-building'></span></td>
<td>{% trans "Customer" %}</td> <td>{% trans "Customer" %}</td>
<td><a href="{% url 'company-detail' order.customer.id %}">{{ order.customer.name }}</a>{% include "clip.html"%}</td> <td><a href="{% url 'company-detail' order.customer.id %}">{{ order.customer.name }}</a>{% include "clip.html" %}</td>
</tr> </tr>
{% endif %} {% endif %}
{% if order.customer_reference %} {% if order.customer_reference %}
<tr> <tr>
<td><span class='fas fa-hashtag'></span></td> <td><span class='fas fa-hashtag'></span></td>
<td>{% trans "Customer Reference" %}</td> <td>{% trans "Customer Reference" %}</td>
<td>{{ order.customer_reference }}{% include "clip.html"%}</td> <td>{{ order.customer_reference }}{% include "clip.html" %}</td>
</tr> </tr>
{% endif %} {% endif %}
<tr> <tr>
@ -238,7 +238,7 @@ src="{% static 'img/blank_image.png' %}"
</td> </td>
</tr> </tr>
</table> </table>
{% endblock %} {% endblock details_right %}
{% block js_ready %} {% block js_ready %}
{{ block.super }} {{ block.super }}
@ -304,7 +304,7 @@ $('#print-order-report').click(function() {
$('#show-qr-code').click(function() { $('#show-qr-code').click(function() {
showQRDialog( showQRDialog(
'{% trans "Sales Order QR Code" %}', '{% 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 %}'); exportOrder('{% url "so-export" order.id %}');
}); });
{% endblock %} {% endblock js_ready %}

View File

@ -7,7 +7,7 @@
{% block sidebar %} {% block sidebar %}
{% include "order/so_sidebar.html" %} {% include "order/so_sidebar.html" %}
{% endblock %} {% endblock sidebar %}
{% block page_content %} {% block page_content %}
{% settings_value "SALESORDER_EDIT_COMPLETED_ORDERS" as allow_extra_editing %} {% settings_value "SALESORDER_EDIT_COMPLETED_ORDERS" as allow_extra_editing %}
@ -158,7 +158,7 @@
</div> </div>
</div> </div>
{% endblock %} {% endblock page_content %}
{% block js_ready %} {% block js_ready %}
{{ block.super }} {{ block.super }}
@ -297,7 +297,6 @@
}); });
}); });
loadOrderTotal( loadOrderTotal(
'#soTotalPrice', '#soTotalPrice',
{ {
@ -307,4 +306,4 @@
enableSidebar('salesorder'); enableSidebar('salesorder');
{% endblock %} {% endblock js_ready %}

View File

@ -6,14 +6,14 @@
{% block page_title %} {% block page_title %}
{% inventree_title %} | {% trans "Sales Orders" %} {% inventree_title %} | {% trans "Sales Orders" %}
{% endblock %} {% endblock page_title %}
{% block breadcrumb_list %} {% block breadcrumb_list %}
{% endblock %} {% endblock breadcrumb_list %}
{% block heading %} {% block heading %}
{% trans "Sales Orders" %} {% trans "Sales Orders" %}
{% endblock %} {% endblock heading %}
{% block actions %} {% block actions %}
{% if roles.sales_order.add %} {% if roles.sales_order.add %}
@ -21,7 +21,7 @@
<span class='fas fa-plus-circle'></span> {% trans "New Sales Order" %} <span class='fas fa-plus-circle'></span> {% trans "New Sales Order" %}
</button> </button>
{% endif %} {% endif %}
{% endblock %} {% endblock actions %}
{% block page_info %} {% block page_info %}
@ -40,7 +40,7 @@
<div id='sales-order-calendar'></div> <div id='sales-order-calendar'></div>
</div> </div>
{% endblock %} {% endblock page_info %}
{% block js_ready %} {% block js_ready %}
{{ block.super }} {{ block.super }}
@ -53,4 +53,4 @@ $("#so-create").click(function() {
createSalesOrder(); createSalesOrder();
}); });
{% endblock %} {% endblock js_ready %}

View File

@ -5,7 +5,7 @@
{% block sidebar %} {% block sidebar %}
{% include 'part/category_sidebar.html' %} {% include 'part/category_sidebar.html' %}
{% endblock %} {% endblock sidebar %}
{% block breadcrumb_tree %} {% block breadcrumb_tree %}
<div id="breadcrumb-tree"></div> <div id="breadcrumb-tree"></div>
@ -22,7 +22,7 @@
{% else %} {% else %}
{% trans "Parts" %} {% trans "Parts" %}
{% endif %} {% endif %}
{% endblock %} {% endblock heading %}
{% block actions %} {% block actions %}
{% if category and user.is_staff and roles.part_category.change %} {% if category and user.is_staff and roles.part_category.change %}
@ -69,7 +69,7 @@
</div> </div>
{% endif %} {% endif %}
{% endif %} {% endif %}
{% endblock %} {% endblock actions %}
{% block details_left %} {% block details_left %}
<table class='table table-striped table-condensed'> <table class='table table-striped table-condensed'>
@ -245,11 +245,11 @@
</div> </div>
</div> </div>
{% endblock %} {% endblock page_content %}
{% block js_load %} {% block js_load %}
{{ block.super }} {{ block.super }}
{% endblock %} {% endblock js_load %}
{% block js_ready %} {% block js_ready %}
{{ block.super }} {{ block.super }}
@ -352,7 +352,6 @@
editCategory({{ category.pk }}); editCategory({{ category.pk }});
}); });
$('#cat-delete').click(function() { $('#cat-delete').click(function() {
deletePartCategory({{ category.pk }}, { deletePartCategory({{ category.pk }}, {
{% if category.parent %} {% if category.parent %}
@ -384,4 +383,4 @@
// Enable left-hand navigation sidebar // Enable left-hand navigation sidebar
enableSidebar('category'); enableSidebar('category');
{% endblock %} {% endblock js_ready %}

View File

@ -22,4 +22,4 @@
</ul> </ul>
{% endif %} {% endif %}
{% endblock %} {% endblock pre_form_content %}

View File

@ -21,4 +21,4 @@
</div> </div>
{% endif %} {% endif %}
{% endblock %} {% endblock pre_form_content %}

View File

@ -6,7 +6,7 @@
{% block sidebar %} {% block sidebar %}
{% include 'part/part_sidebar.html' %} {% include 'part/part_sidebar.html' %}
{% endblock %} {% endblock sidebar %}
{% block breadcrumb_tree %} {% block breadcrumb_tree %}
<div id="breadcrumb-tree"></div> <div id="breadcrumb-tree"></div>
@ -431,11 +431,11 @@
</div> </div>
</div> </div>
{% endblock %} {% endblock page_content %}
{% block js_load %} {% block js_load %}
{{ block.super }} {{ block.super }}
{% endblock %} {% endblock js_load %}
{% block js_ready %} {% block js_ready %}
{{ block.super }} {{ block.super }}
@ -733,7 +733,7 @@
$('#new-variant').click(function() { $('#new-variant').click(function() {
duplicatePart( duplicatePart(
{{ part.pk}}, {{ part.pk }},
{ {
variant: true, variant: true,
} }
@ -757,7 +757,6 @@
}); });
}); });
$("#part-order2").click(function() { $("#part-order2").click(function() {
inventreeGet( inventreeGet(
'{% url "api-part-detail" part.pk %}', '{% url "api-part-detail" part.pk %}',
@ -926,4 +925,4 @@
} }
}); });
{% endblock %} {% endblock js_ready %}

View File

@ -86,4 +86,4 @@ $('.fieldselect').select2({
matcher: partialMatcher, matcher: partialMatcher,
}); });
{% endblock %} {% endblock js_ready %}

View File

@ -81,4 +81,4 @@ $('.currencyselect').select2({
dropdownAutoWidth: true, dropdownAutoWidth: true,
}); });
{% endblock %} {% endblock js_ready %}

View File

@ -30,4 +30,4 @@
</div> </div>
{% endif %} {% endif %}
</div> </div>
{% endblock %} {% endblock form %}

View File

@ -96,4 +96,4 @@ $('.fieldselect').select2({
matcher: partialMatcher, matcher: partialMatcher,
}); });
{% endblock %} {% endblock js_ready %}

View File

@ -88,4 +88,4 @@ $('.currencyselect').select2({
dropdownAutoWidth: true, dropdownAutoWidth: true,
}); });
{% endblock %} {% endblock js_ready %}

View File

@ -7,7 +7,7 @@
{% url 'part-index' as url %} {% url 'part-index' as url %}
{% trans "Return to Parts" as text %} {% trans "Return to Parts" as text %}
{% include "sidebar_link.html" with url=url text=text icon="fa-undo" %} {% include "sidebar_link.html" with url=url text=text icon="fa-undo" %}
{% endblock %} {% endblock sidebar %}
{% block content %} {% block content %}
{% trans "Import Parts from File" as header_text %} {% trans "Import Parts from File" as header_text %}
@ -66,7 +66,7 @@
{% endif %} {% endif %}
</div> </div>
</div> </div>
{% endblock %} {% endblock content %}
{% block js_ready %} {% block js_ready %}
{{ block.super }} {{ block.super }}
@ -113,4 +113,4 @@ function downloadPartImportTemplate(options={}) {
}); });
} }
{% endblock %} {% endblock js_ready %}

View File

@ -11,7 +11,7 @@
{% else %} {% else %}
{% inventree_title %} | {% trans "Part List" %} {% inventree_title %} | {% trans "Part List" %}
{% endif %} {% endif %}
{% endblock %} {% endblock page_title %}
{% block breadcrumbs %} {% block breadcrumbs %}
<a href='#' id='breadcrumb-tree-toggle' class="breadcrumb-item"><span class="fas fa-bars"></span></a> <a href='#' id='breadcrumb-tree-toggle' class="breadcrumb-item"><span class="fas fa-bars"></span></a>

View File

@ -6,15 +6,15 @@
{% block sidebar %} {% block sidebar %}
{% include "part/part_sidebar.html" %} {% include "part/part_sidebar.html" %}
{% endblock %} {% endblock sidebar %}
{% block thumbnail %} {% block thumbnail %}
{% include "part/part_thumb.html" %} {% include "part/part_thumb.html" %}
{% endblock %} {% endblock thumbnail %}
{% block heading %} {% block heading %}
{{ part.full_name }} {{ part.full_name }}
{% endblock %} {% endblock heading %}
{% block actions %} {% block actions %}
<!-- Admin View --> <!-- Admin View -->
@ -104,7 +104,7 @@
</ul> </ul>
</div> </div>
{% endif %} {% endif %}
{% endblock %} {% endblock actions %}
{% block details %} {% block details %}
@ -170,7 +170,7 @@
<tr> <tr>
<td><span class='fas fa-info-circle'></span></td> <td><span class='fas fa-info-circle'></span></td>
<td>{% trans "Description" %}</td> <td>{% trans "Description" %}</td>
<td>{{ part.description }}{% include "clip.html"%}</td> <td>{{ part.description }}{% include "clip.html" %}</td>
</tr> </tr>
{% if part.variant_of %} {% if part.variant_of %}
@ -269,7 +269,7 @@
<tr> <tr>
<td><span class='fas fa-tag'></span></td> <td><span class='fas fa-tag'></span></td>
<td>{% trans "IPN" %}</td> <td>{% trans "IPN" %}</td>
<td>{{ part.IPN }}{% include "clip.html"%}</td> <td>{{ part.IPN }}{% include "clip.html" %}</td>
</tr> </tr>
{% endif %} {% endif %}
{% settings_value "PART_ENABLE_REVISION" as show_revision %} {% settings_value "PART_ENABLE_REVISION" as show_revision %}
@ -277,7 +277,7 @@
<tr> <tr>
<td><span class='fas fa-code-branch'></span></td> <td><span class='fas fa-code-branch'></span></td>
<td>{% trans "Revision" %}</td> <td>{% trans "Revision" %}</td>
<td>{{ part.revision }}{% include "clip.html"%}</td> <td>{{ part.revision }}{% include "clip.html" %}</td>
</tr> </tr>
{% endif %} {% endif %}
{% if part.units %} {% if part.units %}
@ -298,7 +298,7 @@
<tr> <tr>
<td><span class='fas fa-key'></span></td> <td><span class='fas fa-key'></span></td>
<td>{% trans "Keywords" %}</td> <td>{% trans "Keywords" %}</td>
<td>{{ part.keywords }}{% include "clip.html"%}</td> <td>{{ part.keywords }}{% include "clip.html" %}</td>
</tr> </tr>
{% endif %} {% endif %}
{% include "barcode_data.html" with instance=part %} {% include "barcode_data.html" with instance=part %}
@ -444,7 +444,7 @@
$("#show-qr-code").click(function() { $("#show-qr-code").click(function() {
showQRDialog( showQRDialog(
'{% trans "Part QR Code" %}', '{% trans "Part QR Code" %}',
'{"part": {{ part.pk }}}', '{"part": {{ part.pk }} }',
); );
}); });
@ -567,7 +567,6 @@
) )
}); });
function onSelectImage(response) { function onSelectImage(response) {
// Callback when the image-selection modal form is displayed // Callback when the image-selection modal form is displayed
// Populate the form with image data (requested via AJAX) // Populate the form with image data (requested via AJAX)
@ -591,7 +590,7 @@
title: 'Image', title: 'Image',
searchable: true, searchable: true,
formatter: function(value, row, index, field) { formatter: function(value, row, index, field) {
return "<img src='/media/" + value + "' class='grid-image'/>" return "<img src='/media/" + value + "' alt='image' class='grid-image'/>"
} }
} }
], ],
@ -694,4 +693,4 @@
findStockItemBySerialNumber({{ part.pk }}); findStockItemBySerialNumber({{ part.pk }});
}); });
{% endblock %} {% endblock js_ready %}

View File

@ -124,4 +124,4 @@
</div> </div>
{% endif %} {% endif %}
<hr> <hr>
{% endblock %} {% endblock pre_form_content %}

View File

@ -17,7 +17,7 @@
</div> </div>
</div> </div>
{% endif %} {% endif %}
<img class="part-thumb" id='part-image' <img class="part-thumb" id='part-image' alt="{% trans 'Part image' %}"
{% if part.image %} {% if part.image %}
src="{{ part.image.preview.url }}" src="{{ part.image.preview.url }}"
{% else %} {% else %}

View File

@ -233,7 +233,6 @@
</div> </div>
{% endif %} {% endif %}
{% if part.assembly and part.has_bom %} {% if part.assembly and part.has_bom %}
<a class="anchor" id="bom-cost"></a> <a class="anchor" id="bom-cost"></a>
<div class='panel-heading'> <div class='panel-heading'>

View File

@ -22,7 +22,7 @@ $('#part-pricing-refresh').click(function() {
// Internal Pricebreaks // Internal Pricebreaks
{% if show_internal_price and roles.sales_order.view %} {% if show_internal_price and roles.sales_order.view %}
initPriceBreakSet($('#internal-price-break-table'), { initPriceBreakSet($('#internal-price-break-table'), {
part_id: {{part.id}}, part_id: {{ part.id }},
pb_human_name: 'internal price break', pb_human_name: 'internal price break',
pb_url_slug: 'internal-price', pb_url_slug: 'internal-price',
pb_url: '{% url 'api-part-internal-price-list' %}', pb_url: '{% url 'api-part-internal-price-list' %}',
@ -63,7 +63,7 @@ loadVariantPricingChart({
initPriceBreakSet( initPriceBreakSet(
$('#price-break-table'), $('#price-break-table'),
{ {
part_id: {{part.id}}, part_id: {{ part.id }},
pb_human_name: 'sale price break', pb_human_name: 'sale price break',
pb_url_slug: 'sale-price', pb_url_slug: 'sale-price',
pb_url: "{% url 'api-part-sale-price-list' %}", pb_url: "{% url 'api-part-sale-price-list' %}",

View File

@ -4,8 +4,7 @@
{{ block.super }} {{ block.super }}
{% endblock pre_form_content %}
{% endblock %}
{% block form %} {% block form %}
<form method='post' action='' class='js-modal-form' enctype='multipart/form-data'> <form method='post' action='' class='js-modal-form' enctype='multipart/form-data'>
@ -18,4 +17,4 @@
</table> </table>
</form> </form>
{% endblock %} {% endblock form %}

View File

@ -7,11 +7,11 @@
{% url "part-detail" part.id as url %} {% url "part-detail" part.id as url %}
{% trans "Return to BOM" as text %} {% trans "Return to BOM" as text %}
{% include "sidebar_link.html" with url=url text=text icon="fa-undo" %} {% include "sidebar_link.html" with url=url text=text icon="fa-undo" %}
{% endblock %} {% endblock sidebar %}
{% block heading %} {% block heading %}
{% trans "Upload Bill of Materials" %} {% trans "Upload Bill of Materials" %}
{% endblock %} {% endblock heading %}
{% block actions %} {% block actions %}
<!-- <!--
@ -28,7 +28,7 @@
<button type='button' class='btn btn-success' id='bom-submit' style='display: none;'> <button type='button' class='btn btn-success' id='bom-submit' style='display: none;'>
<span class='fas fa-sign-in-alt' id='bom-submit-icon'></span> {% trans "Submit BOM Data" %} <span class='fas fa-sign-in-alt' id='bom-submit-icon'></span> {% trans "Submit BOM Data" %}
</button> </button>
{% endblock %} {% endblock actions %}
{% block page_info %} {% block page_info %}
<div class='panel-content'> <div class='panel-content'>

View File

@ -10,4 +10,4 @@
{% trans "Create a new variant part from this template" %} {% trans "Create a new variant part from this template" %}
</div> </div>
{% endblock %} {% endblock pre_form_content %}

View File

@ -8,15 +8,15 @@
{% block page_margin %} {% block page_margin %}
margin: 2cm; margin: 2cm;
margin-top: 4cm; margin-top: 4cm;
{% endblock %} {% endblock page_margin %}
{% block bottom_left %} {% block bottom_left %}
content: "v{{report_revision}} - {{ date.isoformat }}"; content: "v{{ report_revision }} - {{ date.isoformat }}";
{% endblock %} {% endblock bottom_left %}
{% block bottom_center %} {% block bottom_center %}
content: "{% inventree_version shortstring=True %}"; content: "{% inventree_version shortstring=True %}";
{% endblock %} {% endblock bottom_center %}
{% block style %} {% block style %}
@ -90,7 +90,7 @@ table td.expand {
display: inline; display: inline;
} }
{% endblock %} {% endblock style %}
{% block header_content %} {% block header_content %}
@ -100,7 +100,7 @@ table td.expand {
<h3>{% trans "Bill of Materials" %}</h3> <h3>{% trans "Bill of Materials" %}</h3>
</div> </div>
{% endblock %} {% endblock header_content %}
{% block page_content %} {% block page_content %}
@ -123,7 +123,7 @@ table td.expand {
</td> </td>
<td> <td>
<div class='part-logo'> <div class='part-logo'>
<img src='{% part_image part %}' class='part-logo'> <img src='{% part_image part %}' alt='{% trans "Image" %}' class='part-logo'>
</div> </div>
</td> </td>
</tr> </tr>
@ -145,7 +145,7 @@ table td.expand {
<tr> <tr>
<td> <td>
<div class='thumb-container'> <div class='thumb-container'>
<img src='{% part_image line.sub_part %}' class='part-thumb'> <img src='{% part_image line.sub_part %}' alt='{% trans "Image" %}' class='part-thumb'>
</div> </div>
<div class='part-text'> <div class='part-text'>
{{ line.sub_part.full_name }} {{ line.sub_part.full_name }}
@ -159,4 +159,4 @@ table td.expand {
</tbody> </tbody>
</table> </table>
{% endblock %} {% endblock page_content %}

View File

@ -9,7 +9,7 @@
{% block page_margin %} {% block page_margin %}
margin: 2cm; margin: 2cm;
margin-top: 4cm; margin-top: 4cm;
{% endblock %} {% endblock page_margin %}
{% block style %} {% block style %}
@ -71,11 +71,11 @@ margin-top: 4cm;
border-bottom: 1px solid #555; border-bottom: 1px solid #555;
} }
{% endblock %} {% endblock style %}
{% block bottom_left %} {% block bottom_left %}
content: "v{{report_revision}} - {{ date.isoformat }}"; content: "v{{ report_revision }} - {{ date.isoformat }}";
{% endblock %} {% endblock bottom_left %}
{% block header_content %} {% block header_content %}
<img class='logo' src="{% logo_image %}" alt="logo" width="150"> <img class='logo' src="{% logo_image %}" alt="logo" width="150">
@ -89,13 +89,13 @@ content: "v{{report_revision}} - {{ date.isoformat }}";
</div> </div>
<hr> <hr>
{% endblock %} {% endblock header_content %}
{% block page_content %} {% block page_content %}
<div class='details'> <div class='details'>
<div class='details-image'> <div class='details-image'>
<img class='part-image' src="{% part_image part %}"> <img class='part-image' alt="{% trans 'Part image' %}" src="{% part_image part %}">
</div> </div>
<div class='details-container'> <div class='details-container'>
@ -175,4 +175,4 @@ content: "v{{report_revision}} - {{ date.isoformat }}";
{{ build.notes|markdownify }} {{ build.notes|markdownify }}
{% endif %} {% endif %}
{% endblock %} {% endblock page_content %}

View File

@ -9,15 +9,15 @@
{% block page_margin %} {% block page_margin %}
margin: 2cm; margin: 2cm;
margin-top: 4cm; margin-top: 4cm;
{% endblock %} {% endblock page_margin %}
{% block bottom_left %} {% block bottom_left %}
content: "v{{report_revision}} - {{ date.isoformat }}"; content: "v{{ report_revision }} - {{ date.isoformat }}";
{% endblock %} {% endblock bottom_left %}
{% block bottom_center %} {% block bottom_center %}
content: "{% inventree_version shortstring=True %}"; content: "{% inventree_version shortstring=True %}";
{% endblock %} {% endblock bottom_center %}
{% block style %} {% block style %}
@ -36,7 +36,6 @@ content: "{% inventree_version shortstring=True %}";
display: inline; display: inline;
} }
.part-thumb { .part-thumb {
max-width: 32px; max-width: 32px;
max-height: 32px; max-height: 32px;
@ -67,4 +66,4 @@ table td.expand {
width: 99% width: 99%
} }
{% endblock %} {% endblock style %}

View File

@ -15,7 +15,7 @@
{% if supplier %}{{ supplier.name }}{% else %}{% trans "Supplier was deleted" %}{% endif %} {% if supplier %}{{ supplier.name }}{% else %}{% trans "Supplier was deleted" %}{% endif %}
</div> </div>
{% endblock %} {% endblock header_content %}
{% block page_content %} {% block page_content %}
@ -37,7 +37,7 @@
<tr> <tr>
<td> <td>
<div class='thumb-container'> <div class='thumb-container'>
<img src='{% part_image line.part.part %}' class='part-thumb'> <img src='{% part_image line.part.part %}' class='part-thumb' alt="{% trans 'Part image' %}">
</div> </div>
<div class='part-text'> <div class='part-text'>
{{ line.part.part.full_name }} {{ line.part.part.full_name }}
@ -77,5 +77,4 @@
</tbody> </tbody>
</table> </table>
{% endblock page_content %}
{% endblock %}

View File

@ -91,17 +91,17 @@
<div class='header'> <div class='header'>
{% block header_content %} {% block header_content %}
{% endblock %} {% endblock header_content %}
</div> </div>
<div class='content'> <div class='content'>
{% block page_content %} {% block page_content %}
{% endblock %} {% endblock page_content %}
</div> </div>
<div class='footer'> <div class='footer'>
{% block footer_content %} {% block footer_content %}
{% endblock %} {% endblock footer_content %}
</div> </div>
</body> </body>

View File

@ -32,7 +32,7 @@
<tr> <tr>
<td> <td>
<div class='thumb-container'> <div class='thumb-container'>
<img src='{% part_image line.item.part %}' class='part-thumb'> <img src='{% part_image line.item.part %}' alt='{% trans "Image" %}' class='part-thumb'>
</div> </div>
<div class='part-text'> <div class='part-text'>
{{ line.item.part.full_name }} {{ line.item.part.full_name }}

View File

@ -15,7 +15,7 @@
{{ customer.name }} {{ customer.name }}
</div> </div>
{% endblock %} {% endblock header_content %}
{% block page_content %} {% block page_content %}
@ -37,7 +37,7 @@
<tr> <tr>
<td> <td>
<div class='thumb-container'> <div class='thumb-container'>
<img src='{% part_image line.part %}' class='part-thumb'> <img src='{% part_image line.part %}' alt='{% trans "Part image" %}' class='part-thumb'>
</div> </div>
<div class='part-text'> <div class='part-text'>
{{ line.part.full_name }} {{ line.part.full_name }}
@ -76,5 +76,4 @@
</tbody> </tbody>
</table> </table>
{% endblock page_content %}
{% endblock %}

View File

@ -11,15 +11,15 @@
{% block bottom_left %} {% block bottom_left %}
content: "{{ date.isoformat }}"; content: "{{ date.isoformat }}";
{% endblock %} {% endblock bottom_left %}
{% block bottom_center %} {% block bottom_center %}
content: "{% inventree_version shortstring=True %}"; content: "{% inventree_version shortstring=True %}";
{% endblock %} {% endblock bottom_center %}
{% block top_center %} {% block top_center %}
content: "{% trans 'Stock Item Test Report' %}"; content: "{% trans 'Stock Item Test Report' %}";
{% endblock %} {% endblock top_center %}
.test-row { .test-row {
padding: 3px; padding: 3px;
@ -63,11 +63,11 @@ content: "{% trans 'Stock Item Test Report' %}";
height: 4cm; height: 4cm;
} }
{% endblock %} {% endblock style %}
{% block pre_page_content %} {% block pre_page_content %}
{% endblock %} {% endblock pre_page_content %}
{% block page_content %} {% block page_content %}
@ -81,7 +81,7 @@ content: "{% trans 'Stock Item Test Report' %}";
<p><em>Stock Item ID: {{ stock_item.pk }}</em></p> <p><em>Stock Item ID: {{ stock_item.pk }}</em></p>
</div> </div>
<div class='img-right'> <div class='img-right'>
<img class='part-img' src="{% part_image part %}"> <img class='part-img' alt='{% trans "Part image" %}' src="{% part_image part %}">
<hr> <hr>
<h4> <h4>
{% if stock_item.is_serialized %} {% if stock_item.is_serialized %}
@ -160,7 +160,7 @@ content: "{% trans 'Stock Item Test Report' %}";
{% for sub_item in installed_items %} {% for sub_item in installed_items %}
<tr> <tr>
<td> <td>
<img src='{% part_image sub_item.part %}' class='part-img' style='max-width: 24px; max-height: 24px;'> <img src='{% part_image sub_item.part %}' class='part-img' alt='{% trans "Part image" %}' style='max-width: 24px; max-height: 24px;'>
{{ sub_item.part.full_name }} {{ sub_item.part.full_name }}
</td> </td>
<td> <td>
@ -177,8 +177,8 @@ content: "{% trans 'Stock Item Test Report' %}";
{% endif %} {% endif %}
{% endblock %} {% endblock page_content %}
{% block post_page_content %} {% block post_page_content %}
{% endblock %} {% endblock post_page_content %}

View File

@ -7,7 +7,7 @@
{% block sidebar %} {% block sidebar %}
{% include "stock/stock_sidebar.html" %} {% include "stock/stock_sidebar.html" %}
{% endblock %} {% endblock sidebar %}
{% block page_content %} {% block page_content %}
@ -165,7 +165,7 @@
</div> </div>
</div> </div>
{% endblock %} {% endblock page_content %}
{% block js_ready %} {% block js_ready %}
{{ block.super }} {{ block.super }}
@ -334,4 +334,4 @@
enableSidebar('stockitem'); enableSidebar('stockitem');
{% endblock %} {% endblock js_ready %}

View File

@ -8,19 +8,19 @@
{% block page_title %} {% block page_title %}
{% inventree_title %} | {% trans "Stock Item" %} - {{ item }} {% inventree_title %} | {% trans "Stock Item" %} - {{ item }}
{% endblock %} {% endblock page_title %}
{% block breadcrumbs %} {% block breadcrumbs %}
<a href='#' id='breadcrumb-tree-toggle' class="breadcrumb-item"><span class="fas fa-bars"></span></a> <a href='#' id='breadcrumb-tree-toggle' class="breadcrumb-item"><span class="fas fa-bars"></span></a>
{% include 'stock/loc_link.html' with location=item.location %} {% include 'stock/loc_link.html' with location=item.location %}
{% endblock %} {% endblock breadcrumbs %}
{% block breadcrumb_tree %} {% block breadcrumb_tree %}
<div id="breadcrumb-tree"></div> <div id="breadcrumb-tree"></div>
{% endblock breadcrumb_tree %} {% endblock breadcrumb_tree %}
{% block heading %} {% block heading %}
{% trans "Stock Item" %}: {{ item.part.full_name}} {% trans "Stock Item" %}: {{ item.part.full_name }}
{% endblock heading %} {% endblock heading %}
{% block actions %} {% block actions %}
@ -131,7 +131,7 @@
{% endblock actions %} {% endblock actions %}
{% block thumbnail %} {% block thumbnail %}
<img class='part-thumb' {% if item.part.image %}src="{{ item.part.image.preview.url }}"{% else %}src="{% static 'img/blank_image.png' %}"{% endif %}/> <img class='part-thumb' alt='{% trans "Image" %}' {% if item.part.image %}src="{{ item.part.image.preview.url }}"{% else %}src="{% static 'img/blank_image.png' %}"{% endif %}/>
{% endblock thumbnail %} {% endblock thumbnail %}
{% block details %} {% block details %}
@ -446,11 +446,9 @@
{% endif %} {% endif %}
</tr> </tr>
</table> </table>
{% endblock details_right %} {% endblock details_right %}
{% block js_ready %} {% block js_ready %}
{{ block.super }} {{ block.super }}
@ -531,7 +529,7 @@ $('#stock-edit-status').click(function () {
$("#show-qr-code").click(function() { $("#show-qr-code").click(function() {
showQRDialog( showQRDialog(
'{% trans "Stock Item QR Code" %}', '{% trans "Stock Item QR Code" %}',
'{"stockitem": {{ item.pk }}}', '{"stockitem": {{ item.pk }} }',
); );
}); });
@ -704,4 +702,4 @@ enableBreadcrumbTree({
} }
}); });
{% endblock %} {% endblock js_ready %}

View File

@ -5,4 +5,4 @@
{% trans "Create serialized items from this stock item." %} {% trans "Create serialized items from this stock item." %}
<br> <br>
{% trans "Select quantity to serialize, and unique serial numbers." %} {% trans "Select quantity to serialize, and unique serial numbers." %}
{% endblock %} {% endblock pre_form_content %}

View File

@ -6,7 +6,7 @@
{% block sidebar %} {% block sidebar %}
{% include "stock/location_sidebar.html" %} {% include "stock/location_sidebar.html" %}
{% endblock %} {% endblock sidebar %}
{% block breadcrumb_tree %} {% block breadcrumb_tree %}
<div id="breadcrumb-tree"></div> <div id="breadcrumb-tree"></div>
@ -23,7 +23,7 @@
{% else %} {% else %}
{% trans "Stock" %} {% trans "Stock" %}
{% endif %} {% endif %}
{% endblock %} {% endblock heading %}
{% block actions %} {% block actions %}
@ -111,7 +111,7 @@
{% endif %} {% endif %}
{% endif %} {% endif %}
{% endif %} {% endif %}
{% endblock %} {% endblock actions %}
{% block details_left %} {% block details_left %}
<table class='table table-striped table-condensed'> <table class='table table-striped table-condensed'>
@ -230,7 +230,7 @@
</div> </div>
</div> </div>
{% endblock %} {% endblock page_content %}
{% block js_ready %} {% block js_ready %}
{{ block.super }} {{ block.super }}
@ -375,7 +375,7 @@
$('#show-qr-code').click(function() { $('#show-qr-code').click(function() {
showQRDialog( showQRDialog(
'{% trans "Stock Location QR Code" %}', '{% trans "Stock Location QR Code" %}',
'{"stocklocation": {{ location.pk }}}' '{"stocklocation": {{ location.pk }} }'
); );
}); });
@ -396,7 +396,6 @@
}); });
}); });
{% endif %} {% endif %}
{% endif %} {% endif %}
@ -446,4 +445,4 @@
defaultIcon: global_settings.STOCK_LOCATION_DEFAULT_ICON, defaultIcon: global_settings.STOCK_LOCATION_DEFAULT_ICON,
}); });
{% endblock %} {% endblock js_ready %}

View File

@ -9,13 +9,13 @@
{% else %} {% else %}
{% inventree_title %} | {% trans "Stock" %} {% inventree_title %} | {% trans "Stock" %}
{% endif %} {% endif %}
{% endblock %} {% endblock page_title %}
{% block sidenav %} {% block sidenav %}
<div id='stock-tree'> <div id='stock-tree'>
{% trans "Loading..." %} {% trans "Loading..." %}
</div> </div>
{% endblock %} {% endblock sidenav %}
{% block breadcrumbs %} {% block breadcrumbs %}
<a href='#' id='breadcrumb-tree-toggle' class="breadcrumb-item"><span class="fas fa-bars"></span></a> <a href='#' id='breadcrumb-tree-toggle' class="breadcrumb-item"><span class="fas fa-bars"></span></a>

View File

@ -4,7 +4,7 @@
{% block page_title %} {% block page_title %}
{% inventree_title %} | {% trans "Permission Denied" %} {% inventree_title %} | {% trans "Permission Denied" %}
{% endblock %} {% endblock page_title %}
{% block content %} {% block content %}
@ -16,4 +16,4 @@
</div> </div>
</div> </div>
{% endblock %} {% endblock content %}

View File

@ -5,7 +5,7 @@
{% block page_title %} {% block page_title %}
{% inventree_title %} | {% trans "Permission Denied" %} {% inventree_title %} | {% trans "Permission Denied" %}
{% endblock %} {% endblock page_title %}
{% block content %} {% block content %}
<h3>{% trans "Authentication Failure" %}</h3> <h3>{% trans "Authentication Failure" %}</h3>
@ -20,4 +20,4 @@
</a> </a>
</div> </div>
{% endblock %} {% endblock content %}

View File

@ -4,7 +4,7 @@
{% block page_title %} {% block page_title %}
{% inventree_title %} | {% trans "Page Not Found" %} {% inventree_title %} | {% trans "Page Not Found" %}
{% endblock %} {% endblock page_title %}
{% block content %} {% block content %}
@ -16,4 +16,4 @@
</div> </div>
</div> </div>
{% endblock %} {% endblock content %}

View File

@ -4,7 +4,7 @@
{% block page_title %} {% block page_title %}
{% inventree_title %} | {% trans "Internal Server Error" %} {% inventree_title %} | {% trans "Internal Server Error" %}
{% endblock %} {% endblock page_title %}
{% block content %} {% block content %}
@ -17,4 +17,4 @@
</div> </div>
</div> </div>
{% endblock %} {% endblock content %}

View File

@ -5,13 +5,13 @@
{% block head %} {% block head %}
<meta http-equiv="refresh" content="30"> <meta http-equiv="refresh" content="30">
{% endblock %} {% endblock head %}
{% block page_title %} {% block page_title %}
{% trans 'Site is in Maintenance' %} {% trans 'Site is in Maintenance' %}
{% endblock %} {% endblock page_title %}
{% block body_class %}login-screen' style='background: url({% inventree_splash %}); background-size: cover;{% endblock %} {% block body_class %}login-screen' style='background: url({% inventree_splash %}); background-size: cover;{% endblock body_class %}
{% block body %} {% block body %}
@ -23,30 +23,29 @@
<div class='main body-wrapper login-screen d-flex'> <div class='main body-wrapper login-screen d-flex'>
<div class='login-container'> <div class='login-container'>
<div class="row"> <div class="row">
<div class='container-fluid'> <div class='container-fluid'>
<div class='clearfix content-heading login-header d-flex flex-wrap'> <div class='clearfix content-heading login-header d-flex flex-wrap'>
<img class="pull-left" src="{% inventree_logo %}" width="60" height="60"/> <img class="pull-left" alt='{% trans "Image" %}' src="{% inventree_logo %}" width="60" height="60"/>
{% include "spacer.html" %} {% include "spacer.html" %}
<span class='float-right'><h3>{% block body_title %}{% trans 'Site is in Maintenance' %}{% endblock %}</h3></span> <span class='float-right'><h3>{% block body_title %}{% trans 'Site is in Maintenance' %}{% endblock body_title %}</h3></span>
</div> </div>
</div> </div>
<div class='container-fluid'> <div class='container-fluid'>
<hr> <hr>
{% block content %} {% block content %}
{% trans 'The site is currently in maintenance and should be up again soon!' %} {% trans 'The site is currently in maintenance and should be up again soon!' %}
{% endblock %} {% endblock content %}
</div> </div>
</div> </div>
</div> </div>
{% block extra_body %} {% block extra_body %}
{% endblock %} {% endblock extra_body %}
</div> </div>
{% endblock %} {% endblock body %}
{% block js_base %} {% block js_base %}
<script type='text/javascript'> <script type='text/javascript'>
@ -67,6 +66,6 @@ $(document).ready(function () {
inventreeDocReady(); inventreeDocReady();
}); });
</script> </script>
{% endblock %} {% endblock js_base %}
</body> </body>
</html> </html>

View File

@ -5,21 +5,21 @@
{% block page_title %} {% block page_title %}
{% inventree_title %} | {% trans "Index" %} {% inventree_title %} | {% trans "Index" %}
{% endblock %} {% endblock page_title %}
{% block breadcrumb_list %} {% block breadcrumb_list %}
{% endblock %} {% endblock breadcrumb_list %}
{% block sidebar %} {% block sidebar %}
<!-- Sidebar data is filled dynamically for the index page--> <!-- Sidebar data is filled dynamically for the index page-->
{% endblock %} {% endblock sidebar %}
{% block content %} {% block content %}
<div id='detail-panels'> <div id='detail-panels'>
</div> </div>
{% endblock %} {% endblock content %}
{% block js_ready %} {% block js_ready %}
@ -203,7 +203,6 @@ loadSimplePartTable("#table-stock-to-build", "{% url 'api-part-list' %}", {
}); });
{% endif %} {% endif %}
{% if expiry %} {% if expiry %}
{% if setting_stock_expired %} {% if setting_stock_expired %}
@ -349,4 +348,4 @@ enableSidebar(
} }
); );
{% endblock %} {% endblock js_ready %}

View File

@ -3,17 +3,17 @@
{% load i18n %} {% load i18n %}
{% load inventree_extras %} {% load inventree_extras %}
{% block label %}history{% endblock %} {% block label %}history{% endblock label %}
{% block heading %} {% block heading %}
{% trans "Notification History" %} {% trans "Notification History" %}
{% endblock %} {% endblock heading %}
{% block actions %} {% block actions %}
<div class='btn btn-danger' type='button' id='history-delete' title='{% trans "Delete Notifications" %}'> <div class='btn btn-danger' type='button' id='history-delete' title='{% trans "Delete Notifications" %}'>
<span class='fas fa-trash-alt'></span> {% trans "Delete Notifications" %} <span class='fas fa-trash-alt'></span> {% trans "Delete Notifications" %}
</div> </div>
{% endblock %} {% endblock actions %}
{% block content %} {% block content %}
@ -29,4 +29,4 @@
</table> </table>
</div> </div>
{% endblock %} {% endblock content %}

View File

@ -3,17 +3,17 @@
{% load i18n %} {% load i18n %}
{% load inventree_extras %} {% load inventree_extras %}
{% block label %}inbox{% endblock %} {% block label %}inbox{% endblock label %}
{% block heading %} {% block heading %}
{% trans "Pending Notifications" %} {% trans "Pending Notifications" %}
{% endblock %} {% endblock heading %}
{% block actions %} {% block actions %}
<div class='btn btn-outline-secondary' type='button' id='mark-all' title='{% trans "Mark all as read" %}'> <div class='btn btn-outline-secondary' type='button' id='mark-all' title='{% trans "Mark all as read" %}'>
<span class='fa fa-bookmark'></span> {% trans "Mark all as read" %} <span class='fa fa-bookmark'></span> {% trans "Mark all as read" %}
</div> </div>
{% endblock %} {% endblock actions %}
{% block content %} {% block content %}
@ -28,4 +28,4 @@
</table> </table>
</div> </div>
{% endblock %} {% endblock content %}

View File

@ -4,20 +4,20 @@
{% load inventree_extras %} {% load inventree_extras %}
{% block breadcrumb_list %} {% block breadcrumb_list %}
{% endblock %} {% endblock breadcrumb_list %}
{% block page_title %} {% block page_title %}
{% inventree_title %} | {% trans "Notifications" %} {% inventree_title %} | {% trans "Notifications" %}
{% endblock %} {% endblock page_title %}
{% block sidebar %} {% block sidebar %}
{% include "InvenTree/notifications/sidebar.html" %} {% include "InvenTree/notifications/sidebar.html" %}
{% endblock %} {% endblock sidebar %}
{% block content %} {% block content %}
{% include "InvenTree/notifications/inbox.html" %} {% include "InvenTree/notifications/inbox.html" %}
{% include "InvenTree/notifications/history.html" %} {% include "InvenTree/notifications/history.html" %}
{% endblock %} {% endblock content %}
{% block js_ready %} {% block js_ready %}
{{ block.super }} {{ block.super }}
@ -29,7 +29,6 @@ function updateNotificationTables() {
// this allows the global notification panel to update the tables // this allows the global notification panel to update the tables
window.updateNotifications = updateNotificationTables window.updateNotifications = updateNotificationTables
loadNotificationTable("#inbox-table", { loadNotificationTable("#inbox-table", {
name: 'inbox', name: 'inbox',
url: '{% url 'api-notifications-list' %}', url: '{% url 'api-notifications-list' %}',
@ -59,7 +58,6 @@ loadNotificationTable("#history-table", {
no_matches: function() { return '{% trans "No notification history found" %}'; }, no_matches: function() { return '{% trans "No notification history found" %}'; },
}, true); }, true);
$('#history-delete').click(function() { $('#history-delete').click(function() {
var html = ` var html = `
@ -96,4 +94,4 @@ $("#history-table").on('click', '.notification-delete', function() {
}); });
enableSidebar('notifications'); enableSidebar('notifications');
{% endblock %} {% endblock js_ready %}

View File

@ -4,4 +4,4 @@
{{ block.super }} {{ block.super }}
{% endblock %} {% endblock pre_form_content %}

View File

@ -6,10 +6,10 @@
{% block page_title %} {% block page_title %}
{% inventree_title %} | {% trans "Search Results" %} {% inventree_title %} | {% trans "Search Results" %}
{% endblock %} {% endblock page_title %}
{% block breadcrumb_list %} {% block breadcrumb_list %}
{% endblock %} {% endblock breadcrumb_list %}
{% block content %} {% block content %}
@ -22,7 +22,7 @@
<div id='detail-panels'> <div id='detail-panels'>
</div> </div>
{% endblock %} {% endblock content %}
{% block js_ready %} {% block js_ready %}
{{ block.super }} {{ block.super }}
@ -236,4 +236,4 @@
} }
); );
{% endblock %} {% endblock js_ready %}

View File

@ -2,11 +2,11 @@
{% load i18n %} {% load i18n %}
{% load inventree_extras %} {% load inventree_extras %}
{% block label %}barcodes{% endblock %} {% block label %}barcodes{% endblock label %}
{% block heading %} {% block heading %}
{% trans "Barcode Settings" %} {% trans "Barcode Settings" %}
{% endblock %} {% endblock heading %}
{% block content %} {% block content %}
@ -18,4 +18,4 @@
</tbody> </tbody>
</table> </table>
{% endblock %} {% endblock content %}

View File

@ -2,11 +2,11 @@
{% load i18n %} {% load i18n %}
{% load inventree_extras %} {% load inventree_extras %}
{% block label %}build-order{% endblock %} {% block label %}build-order{% endblock label %}
{% block heading %} {% block heading %}
{% trans "Build Order Settings" %} {% trans "Build Order Settings" %}
{% endblock %} {% endblock heading %}
{% block content %} {% block content %}
@ -16,4 +16,4 @@
</tbody> </tbody>
</table> </table>
{% endblock %} {% endblock content %}

View File

@ -1,17 +1,17 @@
{% extends "panel.html" %} {% extends "panel.html" %}
{% load i18n %} {% load i18n %}
{% block label %}category{% endblock %} {% block label %}category{% endblock label %}
{% block heading %} {% block heading %}
{% trans "Category Settings" %} {% trans "Category Settings" %}
{% endblock %} {% endblock heading %}
{% block actions %} {% block actions %}
<button class='btn btn-success' id='new-cat-param'> <button class='btn btn-success' id='new-cat-param'>
<div class='fas fa-plus-circle'></div> {% trans "New Parameter" %} <div class='fas fa-plus-circle'></div> {% trans "New Parameter" %}
</button> </button>
{% endblock %} {% endblock actions %}
{% block content %} {% block content %}
@ -30,4 +30,4 @@
<table class='table table-striped table-condensed' id='cat-param-table' data-toolbar='#cat-param-buttons'> <table class='table table-striped table-condensed' id='cat-param-table' data-toolbar='#cat-param-buttons'>
</table> </table>
{% endblock %} {% endblock content %}

View File

@ -2,12 +2,11 @@
{% load i18n %} {% load i18n %}
{% load inventree_extras %} {% load inventree_extras %}
{% block label %}server{% endblock %} {% block label %}server{% endblock label %}
{% block heading %} {% block heading %}
{% trans "Server Settings" %} {% trans "Server Settings" %}
{% endblock %} {% endblock heading %}
{% block content %} {% block content %}
@ -34,4 +33,4 @@
</tbody> </tbody>
</table> </table>
{% endblock %} {% endblock content %}

View File

@ -2,11 +2,11 @@
{% load i18n %} {% load i18n %}
{% load inventree_extras %} {% load inventree_extras %}
{% block label %}labels{% endblock %} {% block label %}labels{% endblock label %}
{% block heading %} {% block heading %}
{% trans "Label Settings" %} {% trans "Label Settings" %}
{% endblock %} {% endblock heading %}
{% block content %} {% block content %}
@ -17,4 +17,4 @@
</tbody> </tbody>
</table> </table>
{% endblock %} {% endblock content %}

View File

@ -2,12 +2,11 @@
{% load i18n %} {% load i18n %}
{% load inventree_extras %} {% load inventree_extras %}
{% block label %}login{% endblock %} {% block label %}login{% endblock label %}
{% block heading %} {% block heading %}
{% trans "Login Settings" %} {% trans "Login Settings" %}
{% endblock %} {% endblock heading %}
{% block content %} {% block content %}
@ -41,4 +40,4 @@
</tbody> </tbody>
</table> </table>
{% endblock %} {% endblock content %}

View File

@ -18,9 +18,9 @@
<tbody> <tbody>
{% for key, entry in plugin.urlpatterns.reverse_dict.items %}{% if key %} {% for key, entry in plugin.urlpatterns.reverse_dict.items %}{% if key %}
<tr> <tr>
<td>{{key}}</td> <td>{{ key }}</td>
<td>{{entry.1}}</td> <td>{{ entry.1 }}</td>
<td><a class="btn btn-primary btn-small" href="/{{ base }}{{entry.1}}" target="_blank">{% trans 'Open in new tab' %}</a></td> <td><a class="btn btn-primary btn-small" href="/{{ base }}{{ entry.1 }}" target="_blank">{% trans 'Open in new tab' %}</a></td>
</tr> </tr>
{% endif %}{% endfor %} {% endif %}{% endfor %}
</tbody> </tbody>

View File

@ -26,7 +26,7 @@
<td> <td>
{{ method.name }} {{ method.name }}
{% if method.plugin %} {% if method.plugin %}
<a class='sidebar-selector' id='select-plugin-{{method.plugin.slug}}' data-bs-parent="#sidebar"> <a class='sidebar-selector' id='select-plugin-{{ method.plugin.slug }}' data-bs-parent="#sidebar">
<span class='badge bg-dark badge-right rounded-pill'>{{ method.plugin.slug }}</span> <span class='badge bg-dark badge-right rounded-pill'>{{ method.plugin.slug }}</span>
</a> </a>
{% endif %} {% endif %}

View File

@ -1,11 +1,11 @@
{% extends "panel.html" %} {% extends "panel.html" %}
{% load i18n %} {% load i18n %}
{% block label %}parts{% endblock %} {% block label %}parts{% endblock label %}
{% block heading %} {% block heading %}
{% trans "Part Settings" %} {% trans "Part Settings" %}
{% endblock %} {% endblock heading %}
{% block content %} {% block content %}
@ -22,7 +22,7 @@
<tr><td colspan='5'></td></tr> <tr><td colspan='5'></td></tr>
{% include "InvenTree/settings/setting.html" with key="PART_TEMPLATE" icon="fa-clone" %} {% 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_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_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_PURCHASEABLE" icon="fa-shopping-cart" %}
{% include "InvenTree/settings/setting.html" with key="PART_SALABLE" icon="fa-dollar-sign" %} {% include "InvenTree/settings/setting.html" with key="PART_SALABLE" icon="fa-dollar-sign" %}
@ -70,4 +70,4 @@
<table class='table table-striped table-condensed' id='param-table' data-toolbar='#param-buttons'> <table class='table table-striped table-condensed' id='param-table' data-toolbar='#param-buttons'>
</table> </table>
{% endblock %} {% endblock content %}

View File

@ -1,11 +1,11 @@
{% extends "panel.html" %} {% extends "panel.html" %}
{% load i18n %} {% load i18n %}
{% block label %}stocktake{% endblock %} {% block label %}stocktake{% endblock label %}
{% block heading %} {% block heading %}
{% trans "Stocktake Settings" %} {% trans "Stocktake Settings" %}
{% endblock %} {% endblock heading %}
{% block panel_content %} {% block panel_content %}

View File

@ -3,12 +3,11 @@
{% load inventree_extras %} {% load inventree_extras %}
{% load plugin_extras %} {% load plugin_extras %}
{% block label %}plugin{% endblock %} {% block label %}plugin{% endblock label %}
{% block heading %} {% block heading %}
{% trans "Plugin Settings" %} {% trans "Plugin Settings" %}
{% endblock %} {% endblock heading %}
{% block content %} {% block content %}
@ -86,7 +85,6 @@
</table> </table>
</div> </div>
{% plugin_errors as pl_errors %} {% plugin_errors as pl_errors %}
{% if pl_errors %} {% if pl_errors %}
<div class='panel-heading'> <div class='panel-heading'>
@ -123,4 +121,4 @@
</div> </div>
{% endif %} {% endif %}
{% endblock %} {% endblock content %}

View File

@ -21,7 +21,7 @@
{% if mixin_list %} {% if mixin_list %}
{% for mixin in mixin_list %} {% for mixin in mixin_list %}
<a class='sidebar-selector' id='select-plugin-{{plugin_key}}' data-bs-parent="#sidebar"> <a class='sidebar-selector' id='select-plugin-{{ plugin_key }}' data-bs-parent="#sidebar">
<span class='badge bg-dark badge-right rounded-pill'>{{ mixin.human_name }}</span> <span class='badge bg-dark badge-right rounded-pill'>{{ mixin.human_name }}</span>
</a> </a>
{% endfor %} {% endfor %}
@ -34,7 +34,7 @@
{% endif %} {% endif %}
{% if plugin.is_sample %} {% if plugin.is_sample %}
<a class='sidebar-selector' id='select-plugin-{{plugin_key}}' data-bs-parent="#sidebar"> <a class='sidebar-selector' id='select-plugin-{{ plugin_key }}' data-bs-parent="#sidebar">
<span class='badge bg-info rounded-pill badge-right'>{% trans "Sample" %}</span> <span class='badge bg-info rounded-pill badge-right'>{% trans "Sample" %}</span>
</a> </a>
{% endif %} {% endif %}

View File

@ -3,12 +3,11 @@
{% load inventree_extras %} {% load inventree_extras %}
{% load plugin_extras %} {% load plugin_extras %}
{% block label %}plugin-{{plugin_key}}{% endblock %} {% block label %}plugin-{{ plugin_key }}{% endblock label %}
{% block heading %} {% block heading %}
{% trans "Plugin" %}: <em>{{ plugin.human_name }}</em> {% trans "Plugin" %}: <em>{{ plugin.human_name }}</em>
{% endblock %} {% endblock heading %}
{% block content %} {% block content %}
@ -123,14 +122,14 @@
{% settings_value "PLUGIN_CHECK_SIGNATURES" as signatures %} {% settings_value "PLUGIN_CHECK_SIGNATURES" as signatures %}
{% if signatures %} {% if signatures %}
<tr> <tr>
<td><span class='text-{{plugin.sign_color}} fas fa-check'></span></td> <td><span class='text-{{ plugin.sign_color }} fas fa-check'></span></td>
<td>{% trans "Sign Status" %}</td> <td>{% trans "Sign Status" %}</td>
<td class="bg-{{plugin.sign_color}}">{% if plugin.package.verified %}{{ plugin.package.verified }}: {% endif%}{{ plugin.sign_state.msg }}</td> <td class="bg-{{ plugin.sign_color }}">{% if plugin.package.verified %}{{ plugin.package.verified }}: {% endif %}{{ plugin.sign_state.msg }}</td>
</tr> </tr>
<tr> <tr>
<td><span class='text-{{plugin.sign_color}} fas fa-key'></span></td> <td><span class='text-{{ plugin.sign_color }} fas fa-key'></span></td>
<td>{% trans "Sign Key" %}</td> <td>{% trans "Sign Key" %}</td>
<td class="bg-{{plugin.sign_color}}">{{ plugin.package.key }}{% include "clip.html" %}</td> <td class="bg-{{ plugin.sign_color }}">{{ plugin.package.key }}{% include "clip.html" %}</td>
</tr> </tr>
{% endif %} {% endif %}
</table> </table>
@ -150,4 +149,4 @@
{% include 'InvenTree/settings/mixins/settings_content.html' %} {% include 'InvenTree/settings/mixins/settings_content.html' %}
{% endblock %} {% endblock content %}

View File

@ -1,11 +1,11 @@
{% extends "panel.html" %} {% extends "panel.html" %}
{% load i18n %} {% load i18n %}
{% block label %}purchase-order{% endblock %} {% block label %}purchase-order{% endblock label %}
{% block heading %} {% block heading %}
{% trans "Purchase Order Settings" %} {% trans "Purchase Order Settings" %}
{% endblock %} {% endblock heading %}
{% block content %} {% block content %}
<table class='table table-striped table-condensed'> <table class='table table-striped table-condensed'>
@ -14,4 +14,4 @@
{% include "InvenTree/settings/setting.html" with key="PURCHASEORDER_EDIT_COMPLETED_ORDERS" icon='fa-edit' %} {% include "InvenTree/settings/setting.html" with key="PURCHASEORDER_EDIT_COMPLETED_ORDERS" icon='fa-edit' %}
</tbody> </tbody>
</table> </table>
{% endblock %} {% endblock content %}

View File

@ -1,11 +1,11 @@
{% extends "panel.html" %} {% extends "panel.html" %}
{% load i18n %} {% load i18n %}
{% block label %}pricing{% endblock %} {% block label %}pricing{% endblock label %}
{% block heading %} {% block heading %}
{% trans "Pricing Settings" %} {% trans "Pricing Settings" %}
{% endblock %} {% endblock heading %}
{% block panel_content %} {% block panel_content %}
<div class='panel-content'> <div class='panel-content'>

View File

@ -7,8 +7,6 @@
{% block heading %}{% trans "Project Code Settings" %}{% endblock heading %} {% block heading %}{% trans "Project Code Settings" %}{% endblock heading %}
{% block content %} {% block content %}
<!-- Project code settings --> <!-- Project code settings -->

View File

@ -2,11 +2,11 @@
{% load i18n %} {% load i18n %}
{% load inventree_extras %} {% load inventree_extras %}
{% block label %}reporting{% endblock %} {% block label %}reporting{% endblock label %}
{% block heading %} {% block heading %}
{% trans "Report Settings" %} {% trans "Report Settings" %}
{% endblock %} {% endblock heading %}
{% block content %} {% block content %}
@ -20,4 +20,4 @@
</tbody> </tbody>
</table> </table>
{% endblock %} {% endblock content %}

View File

@ -1,11 +1,11 @@
{% extends "panel.html" %} {% extends "panel.html" %}
{% load i18n %} {% load i18n %}
{% block label %}return-order{% endblock %} {% block label %}return-order{% endblock label %}
{% block heading %} {% block heading %}
{% trans "Return Order Settings" %} {% trans "Return Order Settings" %}
{% endblock %} {% endblock heading %}
{% block content %} {% block content %}
@ -17,4 +17,4 @@
</tbody> </tbody>
</table> </table>
{% endblock %} {% endblock content %}

View File

@ -45,7 +45,7 @@
pk='{{ setting.pk }}' pk='{{ setting.pk }}'
setting='{{ setting.key.upper }}' setting='{{ setting.key.upper }}'
{% if plugin %}plugin='{{ plugin.slug }}'{% endif %} {% 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 %} {% if notification_setting %}
notification=true notification=true
method='{{ setting.method }}' method='{{ setting.method }}'

View File

@ -4,7 +4,7 @@
fieldname='{{ setting.key.upper }}' fieldname='{{ setting.key.upper }}'
pk='{{ setting.pk }}' pk='{{ setting.pk }}'
setting='{{ setting.key.upper }}' setting='{{ setting.key.upper }}'
id='setting-value-{{setting.pk }}-{{ setting.typ }}' id='setting-value-{{ setting.pk }}-{{ setting.typ }}'
type='checkbox' type='checkbox'
{% if setting.as_bool %}checked=''{% endif %} {% if setting.as_bool %}checked=''{% endif %}
{{ reference }} {{ reference }}

View File

@ -6,15 +6,15 @@
{% load plugin_extras %} {% load plugin_extras %}
{% block breadcrumb_list %} {% block breadcrumb_list %}
{% endblock %} {% endblock breadcrumb_list %}
{% block page_title %} {% block page_title %}
{% inventree_title %} | {% trans "Settings" %} {% inventree_title %} | {% trans "Settings" %}
{% endblock %} {% endblock page_title %}
{% block sidebar %} {% block sidebar %}
{% include "InvenTree/settings/sidebar.html" %} {% include "InvenTree/settings/sidebar.html" %}
{% endblock %} {% endblock sidebar %}
{% block content %} {% block content %}
@ -55,11 +55,11 @@
{% endif %} {% endif %}
{% endblock %} {% endblock content %}
{% block js_load %} {% block js_load %}
{{ block.super }} {{ block.super }}
{% endblock %} {% endblock js_load %}
{% block js_ready %} {% block js_ready %}
{{ block.super }} {{ block.super }}
@ -78,4 +78,4 @@
enableSidebar('settings'); enableSidebar('settings');
{% endblock %} {% endblock js_ready %}

View File

@ -272,7 +272,6 @@ onPanelLoad('category', function() {
}); });
} }
// Initially load table with *all* categories // Initially load table with *all* categories
loadTemplateTable(); loadTemplateTable();
@ -303,7 +302,6 @@ onPanelLoad('category', function() {
}); });
}); });
// Javascript for the Part settings panel // Javascript for the Part settings panel
onPanelLoad('parts', function() { onPanelLoad('parts', function() {
$("#param-table").inventreeTable({ $("#param-table").inventreeTable({
@ -405,7 +403,6 @@ onPanelLoad('parts', function() {
}); });
}); });
// Javascript for the Stocktake settings panel // Javascript for the Stocktake settings panel
onPanelLoad('stocktake', function() { onPanelLoad('stocktake', function() {

View File

@ -1,11 +1,11 @@
{% extends "panel.html" %} {% extends "panel.html" %}
{% load i18n %} {% load i18n %}
{% block label %}sales-order{% endblock %} {% block label %}sales-order{% endblock label %}
{% block heading %} {% block heading %}
{% trans "Sales Order Settings" %} {% trans "Sales Order Settings" %}
{% endblock %} {% endblock heading %}
{% block content %} {% block content %}
@ -17,4 +17,4 @@
</tbody> </tbody>
</table> </table>
{% endblock %} {% endblock content %}

View File

@ -1,11 +1,11 @@
{% extends "panel.html" %} {% extends "panel.html" %}
{% load i18n %} {% load i18n %}
{% block label %}stock{% endblock %} {% block label %}stock{% endblock label %}
{% block heading %} {% block heading %}
{% trans "Stock Settings" %} {% trans "Stock Settings" %}
{% endblock %} {% endblock heading %}
{% block content %} {% block content %}
@ -24,4 +24,4 @@
</tbody> </tbody>
</table> </table>
{% endblock %} {% endblock content %}

View File

@ -6,11 +6,11 @@
{% load crispy_forms_tags %} {% load crispy_forms_tags %}
{% load user_sessions i18n %} {% load user_sessions i18n %}
{% block label %}account{% endblock %} {% block label %}account{% endblock label %}
{% block heading %} {% block heading %}
{% trans "Account Settings" %} {% trans "Account Settings" %}
{% endblock %} {% endblock heading %}
{% block actions %} {% block actions %}
{% inventree_customize 'hide_password_reset' as hide_password_reset %} {% inventree_customize 'hide_password_reset' as hide_password_reset %}
@ -22,7 +22,7 @@
<div class='btn btn-primary' type='button' id='edit-user' title='{% trans "Edit User Information" %}'> <div class='btn btn-primary' type='button' id='edit-user' title='{% trans "Edit User Information" %}'>
<span class='fas fa-user-cog'></span> {% trans "Edit" %} <span class='fas fa-user-cog'></span> {% trans "Edit" %}
</div> </div>
{% endblock %} {% endblock actions %}
{% block content %} {% block content %}
{% mail_configured as mail_conf %} {% mail_configured as mail_conf %}
@ -60,9 +60,9 @@
{% for emailaddress in user.emailaddress_set.all %} {% for emailaddress in user.emailaddress_set.all %}
<div> <div>
<div class="ctrlHolder"> <div class="ctrlHolder">
<label for="email_radio_{{forloop.counter}}" class="{% if emailaddress.primary %}primary_email{%endif%}"> <label for="email_radio_{{ forloop.counter }}" class="{% if emailaddress.primary %}primary_email{% endif %}">
<input id="email_radio_{{forloop.counter}}" type="radio" name="email" {% if emailaddress.primary or user.emailaddress_set.count == 1 %}checked="checked" {%endif %} value="{{emailaddress.email}}" /> <input id="email_radio_{{ forloop.counter }}" type="radio" name="email" {% if emailaddress.primary or user.emailaddress_set.count == 1 %}checked="checked" {% endif %} value="{{ emailaddress.email }}" />
{% if emailaddress.primary %} {% if emailaddress.primary %}
<strong>{{ emailaddress.email }}</strong> <strong>{{ emailaddress.email }}</strong>
@ -92,7 +92,7 @@
{% else %} {% else %}
<div class='alert alert-block alert-danger'> <div class='alert alert-block alert-danger'>
<strong>{% trans 'Warning:'%}</strong> <strong>{% trans 'Warning:' %}</strong>
{% trans "You currently do not have any email address set up. You should really add an email address so you can receive notifications, reset your password, etc." %} {% trans "You currently do not have any email address set up. You should really add an email address so you can receive notifications, reset your password, etc." %}
</div> </div>
@ -138,7 +138,7 @@
value="{{ base_account.id }}" /> value="{{ base_account.id }}" />
<span class="socialaccount_provider {{ base_account.provider }} {{ account.get_brand.id }}"> <span class="socialaccount_provider {{ base_account.provider }} {{ account.get_brand.id }}">
<span class='brand-icon' <span class='brand-icon'
brand_name='{{account.get_brand.id}}'></span>{{account.get_brand.name}}</span> brand_name='{{ account.get_brand.id }}'></span>{{ account.get_brand.name }}</span>
{{ account }} {{ account }}
</label> </label>
</div> </div>
@ -265,7 +265,7 @@
</table> </table>
</div> </div>
</div> </div>
{% endblock %} {% endblock content %}
{% block js_ready %} {% block js_ready %}
(function() { (function() {
@ -279,4 +279,4 @@ e.preventDefault();
}); });
} }
})(); })();
{% endblock %} {% endblock js_ready %}

View File

@ -3,11 +3,11 @@
{% load i18n %} {% load i18n %}
{% load inventree_extras %} {% load inventree_extras %}
{% block label %}user-display{% endblock %} {% block label %}user-display{% endblock label %}
{% block heading %} {% block heading %}
{% trans "Display Settings" %} {% trans "Display Settings" %}
{% endblock %} {% endblock heading %}
{% block content %} {% block content %}
@ -43,7 +43,7 @@
{% get_available_themes as themes %} {% get_available_themes as themes %}
{% get_user_color_theme request.user.username as user_theme %} {% get_user_color_theme request.user.username as user_theme %}
{% for theme in themes %} {% for theme in themes %}
<option value='{{ theme.key }}'{% if theme.key == user_theme %} selected{% endif%}>{{ theme.name }}</option> <option value='{{ theme.key }}'{% if theme.key == user_theme %} selected{% endif %}>{{ theme.name }}</option>
{% endfor %} {% endfor %}
</select> </select>
<div class='input-group-append'> <div class='input-group-append'>
@ -110,4 +110,4 @@
</div> </div>
</div> </div>
{% endblock %} {% endblock content %}

View File

@ -3,11 +3,11 @@
{% load i18n %} {% load i18n %}
{% load inventree_extras %} {% load inventree_extras %}
{% block label %}user-home{% endblock %} {% block label %}user-home{% endblock label %}
{% block heading %} {% block heading %}
{% trans "Home Page Settings" %} {% trans "Home Page Settings" %}
{% endblock %} {% endblock heading %}
{% block content %} {% block content %}
@ -42,4 +42,4 @@
</tbody> </tbody>
</table> </table>
</div> </div>
{% endblock %} {% endblock content %}

Some files were not shown because too many files have changed in this diff Show More