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
npx eslint InvenTree/InvenTree/static_i18n/i18n/*.js
html:
name: Style [HTML]
runs-on: ubuntu-20.04
needs: pep_style
steps:
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # pin@v3.1.0
- name: Enviroment Setup
uses: ./.github/actions/setup
with:
npm: true
install: true
- name: Check HTML Files
run: npx markuplint **/templates/*.html
pre-commit:
name: Style [pre-commit]
runs-on: ubuntu-20.04
@ -194,7 +178,7 @@ jobs:
name: Tests - DB [SQLite] + Coverage
runs-on: ubuntu-20.04
needs: [ 'javascript', 'html', 'pre-commit' ]
needs: [ 'javascript', 'pre-commit' ]
continue-on-error: true # continue if a step fails so that coverage gets pushed
env:
@ -227,7 +211,7 @@ jobs:
postgres:
name: Tests - DB [PostgreSQL]
runs-on: ubuntu-20.04
needs: [ 'javascript', 'html', 'pre-commit' ]
needs: [ 'javascript', 'pre-commit' ]
env:
INVENTREE_DB_ENGINE: django.db.backends.postgresql
@ -271,7 +255,7 @@ jobs:
name: Tests - DB [MySQL]
runs-on: ubuntu-20.04
needs: [ 'javascript', 'html', 'pre-commit' ]
needs: [ 'javascript', 'pre-commit' ]
if: github.event_name == 'push'
env:

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
args: [requirements.in, -o, requirements.txt]
files: ^requirements\.(in|txt)$
- repo: https://github.com/Riverside-Healthcare/djLint
rev: v1.25.0
hooks:
- id: djlint-django

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.
Please write docstrings for each function and class - we follow the [google doc-style](https://google.github.io/styleguide/pyguide.html#38-comments-and-docstrings) for python. Docstrings for general javascript code is encouraged! Docstyles are checked by `invoke style`.
### Django templates
Django are checked by [djlint](https://github.com/Riverside-Healthcare/djlint) through pre-commit.
The following rules out of the [default set](https://djlint.com/docs/linter/) are not applied:
```bash
D018: (Django) Internal links should use the {% url ... %} pattern
H006: Img tag should have height and width attributes
H008: Attributes should be double quoted
H021: Inline styles should be avoided
H023: Do not use entity references
H025: Tag seems to be an orphan
H030: Consider adding a meta description
H031: Consider adding meta keywords
T002: Double quotes should be used in tags
```
## Documentation
New features or updates to existing features should be accompanied by user documentation.

View File

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

View File

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

View File

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

View File

@ -6,11 +6,11 @@
{% block page_title %}
{% inventree_title %} | {% trans "Company" %} - {{ company.name }}
{% endblock %}
{% endblock page_title %}
{% block heading %}
{% trans "Company" %}: {{ company.name }}
{% endblock %}
{% endblock heading %}
{% block actions %}
<!-- Admin View -->
@ -45,7 +45,7 @@
{% block thumbnail %}
<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 %}
src="{{ company.image.preview.url }}"
{% else %}
@ -62,7 +62,7 @@
</div>
</div>
</div>
{% endblock %}
{% endblock thumbnail %}
{% block details %}
<table class='table table-striped table-condensed'>
@ -74,7 +74,7 @@
</tr>
<tr>
<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>
</tr>
<tr>
@ -89,7 +89,7 @@
</tr>
</table>
{% endblock %}
{% endblock details %}
{% block details_right %}
@ -99,7 +99,7 @@
<tr>
<td><span class='fas fa-globe'></span></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>
{% endif %}
<tr>
@ -117,7 +117,7 @@
<tr>
<td><span class='fas fa-map-marked-alt'></span></td>
<td>{% trans "Address" %}</td>
<td>{{ company.address }}{% include "clip.html"%}</td>
<td>{{ company.address }}{% include "clip.html" %}</td>
</tr>
{% endif %}
{% if company.phone %}
@ -138,11 +138,11 @@
<tr>
<td><span class='fas fa-user'></span></td>
<td>{% trans "Contact" %}</td>
<td>{{ company.contact }}{% include "clip.html"%}</td>
<td>{{ company.contact }}{% include "clip.html" %}</td>
</tr>
{% endif %}
</table>
{% endblock %}
{% endblock details_right %}
{% block js_ready %}
{{ block.super }}
@ -262,4 +262,4 @@
});
}
{% endblock %}
{% endblock js_ready %}

View File

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

View File

@ -6,11 +6,11 @@
{% block page_title %}
{% inventree_title %} | {% trans "Supplier List" %}
{% endblock %}
{% endblock page_title %}
{% block heading %}
{{ title }}
{% endblock %}
{% endblock heading %}
{% block actions %}
{% if pagetype == 'manufacturers' and roles.purchase_order.add or pagetype == 'suppliers' and roles.purchase_order.add or pagetype == 'customers' and roles.sales_order.add %}
@ -18,7 +18,7 @@
<span class='fas fa-plus-circle'></span> {{ button_text }}
</button>
{% endif %}
{% endblock %}
{% endblock actions %}
{% block page_info %}
@ -32,7 +32,7 @@
</table>
</div>
{% endblock %}
{% endblock page_info %}
{% block js_ready %}
{{ block.super }}
@ -59,4 +59,4 @@
}
);
{% endblock %}
{% endblock js_ready %}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -44,7 +44,7 @@
</tr>
</thead>
<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 %}
<tr {% if row.errors %} style='background: #ffeaea;'{% endif %} part-select='#select_part_{{ row.index }}'>
<td>
@ -123,4 +123,4 @@ $('.currencyselect').select2({
dropdownAutoWidth: true,
});
{% endblock %}
{% endblock js_ready %}

View File

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

View File

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

View File

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

View File

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

View File

@ -6,7 +6,7 @@
{% load static %}
{% block sidebar %}
{% include "order/return_order_sidebar.html" %}
{% include "order/return_order_sidebar.html" %}
{% endblock sidebar %}
{% block page_content %}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -10,7 +10,7 @@
<table class='table table-striped table-condensed table-price-two'>
<tr>
<td><strong>{% trans 'Part' %}</strong></td>
<td>{{ part }}</td>
<td>{{ part }}</td>
</tr>
<tr>
<td><strong>{% trans 'Quantity' %}</strong></td>
@ -124,4 +124,4 @@
</div>
{% endif %}
<hr>
{% endblock %}
{% endblock pre_form_content %}

View File

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

View File

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

View File

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

View File

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

View File

@ -7,11 +7,11 @@
{% url "part-detail" part.id as url %}
{% trans "Return to BOM" as text %}
{% include "sidebar_link.html" with url=url text=text icon="fa-undo" %}
{% endblock %}
{% endblock sidebar %}
{% block heading %}
{% trans "Upload Bill of Materials" %}
{% endblock %}
{% endblock heading %}
{% block actions %}
<!--
@ -28,7 +28,7 @@
<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" %}
</button>
{% endblock %}
{% endblock actions %}
{% block page_info %}
<div class='panel-content'>

View File

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

View File

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

View File

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

View File

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

View File

@ -15,7 +15,7 @@
{% if supplier %}{{ supplier.name }}{% else %}{% trans "Supplier was deleted" %}{% endif %}
</div>
{% endblock %}
{% endblock header_content %}
{% block page_content %}
@ -37,7 +37,7 @@
<tr>
<td>
<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 class='part-text'>
{{ line.part.part.full_name }}
@ -77,5 +77,4 @@
</tbody>
</table>
{% endblock %}
{% endblock page_content %}

View File

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

View File

@ -32,7 +32,7 @@
<tr>
<td>
<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 class='part-text'>
{{ line.item.part.full_name }}

View File

@ -15,7 +15,7 @@
{{ customer.name }}
</div>
{% endblock %}
{% endblock header_content %}
{% block page_content %}
@ -37,7 +37,7 @@
<tr>
<td>
<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 class='part-text'>
{{ line.part.full_name }}
@ -76,5 +76,4 @@
</tbody>
</table>
{% endblock %}
{% endblock page_content %}

View File

@ -11,15 +11,15 @@
{% block bottom_left %}
content: "{{ date.isoformat }}";
{% endblock %}
{% endblock bottom_left %}
{% block bottom_center %}
content: "{% inventree_version shortstring=True %}";
{% endblock %}
{% endblock bottom_center %}
{% block top_center %}
content: "{% trans 'Stock Item Test Report' %}";
{% endblock %}
{% endblock top_center %}
.test-row {
padding: 3px;
@ -63,11 +63,11 @@ content: "{% trans 'Stock Item Test Report' %}";
height: 4cm;
}
{% endblock %}
{% endblock style %}
{% block pre_page_content %}
{% endblock %}
{% endblock pre_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>
</div>
<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>
<h4>
{% if stock_item.is_serialized %}
@ -160,7 +160,7 @@ content: "{% trans 'Stock Item Test Report' %}";
{% for sub_item in installed_items %}
<tr>
<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 }}
</td>
<td>
@ -177,8 +177,8 @@ content: "{% trans 'Stock Item Test Report' %}";
{% endif %}
{% endblock %}
{% endblock page_content %}
{% block post_page_content %}
{% endblock %}
{% endblock post_page_content %}

View File

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

View File

@ -8,19 +8,19 @@
{% block page_title %}
{% inventree_title %} | {% trans "Stock Item" %} - {{ item }}
{% endblock %}
{% endblock page_title %}
{% block breadcrumbs %}
<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 %}
{% endblock %}
{% endblock breadcrumbs %}
{% block breadcrumb_tree %}
<div id="breadcrumb-tree"></div>
{% endblock breadcrumb_tree %}
{% block heading %}
{% trans "Stock Item" %}: {{ item.part.full_name}}
{% trans "Stock Item" %}: {{ item.part.full_name }}
{% endblock heading %}
{% block actions %}
@ -131,7 +131,7 @@
{% endblock actions %}
{% 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 %}
{% block details %}
@ -446,11 +446,9 @@
{% endif %}
</tr>
</table>
{% endblock details_right %}
{% block js_ready %}
{{ block.super }}
@ -531,7 +529,7 @@ $('#stock-edit-status').click(function () {
$("#show-qr-code").click(function() {
showQRDialog(
'{% 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." %}
<br>
{% trans "Select quantity to serialize, and unique serial numbers." %}
{% endblock %}
{% endblock pre_form_content %}

View File

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

View File

@ -9,13 +9,13 @@
{% else %}
{% inventree_title %} | {% trans "Stock" %}
{% endif %}
{% endblock %}
{% endblock page_title %}
{% block sidenav %}
<div id='stock-tree'>
{% trans "Loading..." %}
</div>
{% endblock %}
{% endblock sidenav %}
{% block breadcrumbs %}
<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 %}
{% inventree_title %} | {% trans "Permission Denied" %}
{% endblock %}
{% endblock page_title %}
{% block content %}
@ -16,4 +16,4 @@
</div>
</div>
{% endblock %}
{% endblock content %}

View File

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

View File

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

View File

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

View File

@ -5,13 +5,13 @@
{% block head %}
<meta http-equiv="refresh" content="30">
{% endblock %}
{% endblock head %}
{% block page_title %}
{% 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 %}
@ -23,30 +23,29 @@
<div class='main body-wrapper login-screen d-flex'>
<div class='login-container'>
<div class="row">
<div class='container-fluid'>
<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" %}
<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 class='container-fluid'>
<hr>
{% block content %}
{% trans 'The site is currently in maintenance and should be up again soon!' %}
{% endblock %}
{% endblock content %}
</div>
</div>
</div>
{% block extra_body %}
{% endblock %}
{% endblock extra_body %}
</div>
{% endblock %}
{% endblock body %}
{% block js_base %}
<script type='text/javascript'>
@ -67,6 +66,6 @@ $(document).ready(function () {
inventreeDocReady();
});
</script>
{% endblock %}
{% endblock js_base %}
</body>
</html>

View File

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

View File

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

View File

@ -3,17 +3,17 @@
{% load i18n %}
{% load inventree_extras %}
{% block label %}inbox{% endblock %}
{% block label %}inbox{% endblock label %}
{% block heading %}
{% trans "Pending Notifications" %}
{% endblock %}
{% endblock heading %}
{% block actions %}
<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" %}
</div>
{% endblock %}
{% endblock actions %}
{% block content %}
@ -28,4 +28,4 @@
</table>
</div>
{% endblock %}
{% endblock content %}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -18,9 +18,9 @@
<tbody>
{% for key, entry in plugin.urlpatterns.reverse_dict.items %}{% if key %}
<tr>
<td>{{key}}</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>{{ key }}</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>
</tr>
{% endif %}{% endfor %}
</tbody>

View File

@ -26,7 +26,7 @@
<td>
{{ method.name }}
{% 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>
</a>
{% endif %}

View File

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

View File

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

View File

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

View File

@ -21,7 +21,7 @@
{% if 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>
</a>
{% endfor %}
@ -34,7 +34,7 @@
{% endif %}
{% 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>
</a>
{% endif %}

View File

@ -3,12 +3,11 @@
{% load inventree_extras %}
{% load plugin_extras %}
{% block label %}plugin-{{plugin_key}}{% endblock %}
{% block label %}plugin-{{ plugin_key }}{% endblock label %}
{% block heading %}
{% trans "Plugin" %}: <em>{{ plugin.human_name }}</em>
{% endblock %}
{% endblock heading %}
{% block content %}
@ -123,14 +122,14 @@
{% settings_value "PLUGIN_CHECK_SIGNATURES" as signatures %}
{% if signatures %}
<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 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>
<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 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>
{% endif %}
</table>
@ -150,4 +149,4 @@
{% include 'InvenTree/settings/mixins/settings_content.html' %}
{% endblock %}
{% endblock content %}

View File

@ -1,11 +1,11 @@
{% extends "panel.html" %}
{% load i18n %}
{% block label %}purchase-order{% endblock %}
{% block label %}purchase-order{% endblock label %}
{% block heading %}
{% trans "Purchase Order Settings" %}
{% endblock %}
{% endblock heading %}
{% block content %}
<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' %}
</tbody>
</table>
{% endblock %}
{% endblock content %}

View File

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

View File

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

View File

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

View File

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

View File

@ -45,7 +45,7 @@
pk='{{ setting.pk }}'
setting='{{ setting.key.upper }}'
{% if plugin %}plugin='{{ plugin.slug }}'{% endif %}
{% if user_setting or notification_setting %}user='{{request.user.id}}'{% endif %}
{% if user_setting or notification_setting %}user='{{ request.user.id }}'{% endif %}
{% if notification_setting %}
notification=true
method='{{ setting.method }}'

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -6,11 +6,11 @@
{% load crispy_forms_tags %}
{% load user_sessions i18n %}
{% block label %}account{% endblock %}
{% block label %}account{% endblock label %}
{% block heading %}
{% trans "Account Settings" %}
{% endblock %}
{% endblock heading %}
{% block actions %}
{% inventree_customize 'hide_password_reset' as hide_password_reset %}
@ -22,7 +22,7 @@
<div class='btn btn-primary' type='button' id='edit-user' title='{% trans "Edit User Information" %}'>
<span class='fas fa-user-cog'></span> {% trans "Edit" %}
</div>
{% endblock %}
{% endblock actions %}
{% block content %}
{% mail_configured as mail_conf %}
@ -60,9 +60,9 @@
{% for emailaddress in user.emailaddress_set.all %}
<div>
<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 %}
<strong>{{ emailaddress.email }}</strong>
@ -92,7 +92,7 @@
{% else %}
<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." %}
</div>
@ -138,7 +138,7 @@
value="{{ base_account.id }}" />
<span class="socialaccount_provider {{ base_account.provider }} {{ account.get_brand.id }}">
<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 }}
</label>
</div>
@ -265,7 +265,7 @@
</table>
</div>
</div>
{% endblock %}
{% endblock content %}
{% block js_ready %}
(function() {
@ -279,4 +279,4 @@ e.preventDefault();
});
}
})();
{% endblock %}
{% endblock js_ready %}

View File

@ -3,11 +3,11 @@
{% load i18n %}
{% load inventree_extras %}
{% block label %}user-display{% endblock %}
{% block label %}user-display{% endblock label %}
{% block heading %}
{% trans "Display Settings" %}
{% endblock %}
{% endblock heading %}
{% block content %}
@ -43,7 +43,7 @@
{% get_available_themes as themes %}
{% get_user_color_theme request.user.username as user_theme %}
{% for theme in themes %}
<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 %}
</select>
<div class='input-group-append'>
@ -76,7 +76,7 @@
{% define language.code as lang_code %}
{% define locale_stats|keyvalue:lang_code as lang_translated %}
{% if lang_translated > 10 or lang_code == 'en' or lang_code == LANGUAGE_CODE %}{% define True as use_lang %}{% else %}{% define False as use_lang %}{% endif %}
{% if ALL_LANG or use_lang %}
{% if ALL_LANG or use_lang %}
<option value="{{ lang_code }}"{% if lang_code == LANGUAGE_CODE %} selected{% endif %}>
{{ language.name_local }} ({{ lang_code }})
{% if lang_translated %}
@ -110,4 +110,4 @@
</div>
</div>
{% endblock %}
{% endblock content %}

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