2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-03 04:00:57 +00:00

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
145 changed files with 510 additions and 2589 deletions

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 %}