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 %}
@ -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 %}
@ -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'>
@ -89,7 +89,7 @@
</tr>
</table>
{% endblock %}
{% endblock details %}
{% block details_right %}
@ -142,7 +142,7 @@
</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 %}
@ -191,8 +191,7 @@ src="{% static 'img/blank_image.png' %}"
</div>
</div>
{% endblock %}
{% endblock page_content %}
{% block js_ready %}
{{ block.super }}
@ -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 %}
@ -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 }}
@ -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

@ -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

@ -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 %}
@ -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'>
@ -238,7 +238,7 @@ src="{% static 'img/blank_image.png' %}"
</td>
</tr>
</table>
{% endblock %}
{% endblock details_right %}
{% block js_ready %}
{{ block.super }}
@ -332,4 +332,4 @@ $('#export-order').click(function() {
exportOrder('{% url "so-export" order.id %}');
});
{% endblock %}
{% endblock js_ready %}

View File

@ -7,7 +7,7 @@
{% block sidebar %}
{% include "order/so_sidebar.html" %}
{% endblock %}
{% 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 }}
@ -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 %}
@ -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

@ -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

@ -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 %}
{% 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 %}
{% 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 %}
{% 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,12 +8,12 @@
{% 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>
@ -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 }}
@ -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 }}
@ -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

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

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

@ -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 %}
@ -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 %}
@ -110,4 +110,4 @@
</div>
</div>
{% endblock %}
{% endblock content %}

View File

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

View File

@ -3,11 +3,11 @@
{% load i18n %}
{% load inventree_extras %}
{% block label %}user-labels{% endblock %}
{% block label %}user-labels{% endblock label %}
{% block heading %}
{% trans "Label Settings" %}
{% endblock %}
{% endblock heading %}
{% block content %}
@ -20,4 +20,4 @@
</table>
</div>
{% endblock %}
{% endblock content %}

View File

@ -3,11 +3,11 @@
{% load i18n %}
{% load inventree_extras %}
{% block label %}user-reports{% endblock %}
{% block label %}user-reports{% endblock label %}
{% block heading %}
{% trans "Report Settings" %}
{% endblock %}
{% endblock heading %}
{% block content %}
@ -21,4 +21,4 @@
</table>
</div>
{% endblock %}
{% endblock content %}

View File

@ -3,11 +3,11 @@
{% load i18n %}
{% load inventree_extras %}
{% block label %}user-search{% endblock %}
{% block label %}user-search{% endblock label %}
{% block heading %}
{% trans "Search Settings" %}
{% endblock %}
{% endblock heading %}
{% block content %}
@ -34,9 +34,8 @@
{% include "InvenTree/settings/setting.html" with key="SEARCH_PREVIEW_SHOW_RETURN_ORDERS" user_setting=True icon='fa-truck' %}
{% include "InvenTree/settings/setting.html" with key="SEARCH_PREVIEW_EXCLUDE_INACTIVE_RETURN_ORDERS" user_setting=True icon='fa-eye-slash' %}
</tbody>
</table>
</div>
{% endblock %}
{% endblock content %}

View File

@ -3,11 +3,11 @@
{% load i18n %}
{% load inventree_extras %}
{% block label %}user-settings{% endblock %}
{% block label %}user-settings{% endblock label %}
{% block heading %}
{% trans "User Settings" %}
{% endblock %}
{% endblock heading %}
{% block content %}
@ -17,4 +17,4 @@
</table>
</div>
{% endblock %}
{% endblock content %}

View File

@ -40,13 +40,12 @@
<link rel="stylesheet" href="{% get_color_theme_css user.get_username %}">
<title>
{% inventree_title %} | {% block head_title %}{% endblock %}
{% inventree_title %} | {% block head_title %}{% endblock head_title %}
</title>
{% block extra_head %}
{% endblock %}
{% endblock extra_head %}
</head>
<body class='login-screen' style='background: url({% inventree_splash %}); background-size: cover;'>
@ -59,13 +58,12 @@
<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" src="{% inventree_logo %}" alt='{% trans "InvenTree logo" %}' width="60" height="60"/>
{% include "spacer.html" %}
<span class='float-right'><h3>{% inventree_title %}</h3></span>
</div>
@ -73,14 +71,14 @@
<div class='container-fluid'>
<hr>
{% block content %}
{% endblock %}
{% endblock content %}
</div>
</div>
</div>
{% block extra_body %}
{% endblock %}
{% endblock extra_body %}
</div>

View File

@ -3,8 +3,7 @@
{% load i18n %}
{% load account %}
{% block head_title %}{% trans "Confirm Email Address" %}{% endblock %}
{% block head_title %}{% trans "Confirm Email Address" %}{% endblock head_title %}
{% block content %}
<h1>{% trans "Confirm Email Address" %}</h1>
@ -31,4 +30,4 @@
{% endif %}
{% endblock %}
{% endblock content %}

View File

@ -3,7 +3,7 @@
{% load inventree_extras %}
{% load i18n account socialaccount crispy_forms_tags inventree_extras %}
{% block head_title %}{% trans "Sign In" %}{% endblock %}
{% block head_title %}{% trans "Sign In" %}{% endblock head_title %}
{% block content %}
@ -26,7 +26,7 @@
{% endif %}
</div>
<form class="login" method="POST" action="{% url 'account_login' %}">
<form class="login" method="post" action="{% url 'account_login' %}">
{% csrf_token %}
{{ form|crispy }}
{% if redirect_field_value %}
@ -42,7 +42,7 @@
<div>{{ login_message | safe }}<hr></div>
{% endif %}
{% if mail_conf and enable_pwd_forgot %}
<a class="" href="{% url 'account_reset_password' %}"><small>{% trans "Forgot Password?" %}</small></a>
<a href="{% url 'account_reset_password' %}"><small>{% trans "Forgot Password?" %}</small></a>
{% endif %}
</form>
@ -60,4 +60,4 @@
{% include "socialaccount/snippets/login_extra.html" %}
{% endif %}
{% endblock %}
{% endblock content %}

View File

@ -2,7 +2,7 @@
{% load i18n %}
{% block head_title %}{% trans "Sign Out" %}{% endblock %}
{% block head_title %}{% trans "Sign Out" %}{% endblock head_title %}
{% block content %}
<h3>{% trans "Sign Out" %}</h3>
@ -28,4 +28,4 @@
</a>
</div>
{% endblock %}
{% endblock content %}

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