2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-18 13:05:42 +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

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

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

View File

@ -2,7 +2,7 @@
{% load i18n account crispy_forms_tags inventree_extras %}
{% block head_title %}{% trans "Password Reset" %}{% endblock %}
{% block head_title %}{% trans "Password Reset" %}{% endblock head_title %}
{% block content %}
@ -17,7 +17,7 @@
{% if mail_conf and enable_pwd_forgot %}
<p>{% trans "Forgotten your password? Enter your email address below, and we'll send you an email allowing you to reset it." %}</p>
<form method="POST" action="{% url 'account_reset_password' %}" class="password_reset">
<form method="post" action="{% url 'account_reset_password' %}" class="password_reset">
{% csrf_token %}
{{ form|crispy }}
<input type="submit" class="btn btn-primary btn-block" value="{% trans 'Reset My Password' %}" />
@ -27,4 +27,4 @@
<p>{% trans "This function is currently disabled. Please contact an administrator." %}</p>
</div>
{% endif %}
{% endblock %}
{% endblock content %}

View File

@ -1,7 +1,7 @@
{% extends "account/base.html" %}
{% load i18n crispy_forms_tags %}
{% block head_title %}{% trans "Change Password" %}{% endblock %}
{% block head_title %}{% trans "Change Password" %}{% endblock head_title %}
{% block content %}
<h1>{% if token_fail %}{% trans "Bad Token" %}{% else %}{% trans "Change Password" %}{% endif %}</h1>
@ -11,7 +11,7 @@
<p>{% blocktrans %}The password reset link was invalid, possibly because it has already been used. Please request a <a href="{{ passwd_reset_url }}">new password reset</a>.{% endblocktrans %}</p>
{% else %}
{% if form %}
<form method="POST" action="{{ action_url }}">
<form method="post" action="{{ action_url }}">
{% csrf_token %}
{{ form|crispy }}
<div class='btn-group float-right' role='group'>
@ -22,4 +22,4 @@
<p>{% trans 'Your password is now changed.' %}</p>
{% endif %}
{% endif %}
{% endblock %}
{% endblock content %}

View File

@ -2,7 +2,7 @@
{% load i18n crispy_forms_tags inventree_extras %}
{% block head_title %}{% trans "Signup" %}{% endblock %}
{% block head_title %}{% trans "Signup" %}{% endblock head_title %}
{% block content %}
{% settings_value 'LOGIN_ENABLE_REG' as enable_reg %}
@ -38,4 +38,4 @@
</div>
{% endif %}
{% endblock %}
{% endblock content %}

View File

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

View File

@ -13,4 +13,4 @@
<span class='fas fa-check-circle'></span> {% trans 'Authenticate' %}
</button>
</form>
{% endblock %}
{% endblock content %}

View File

@ -36,4 +36,4 @@
</a>
</div>
{% endblock %}
{% endblock content %}

View File

@ -24,4 +24,4 @@
<span class='fas fa-undo-alt'></span> {% trans "Return to Site" %}
</a>
</div>
{% endblock %}
{% endblock content %}

View File

@ -15,7 +15,7 @@
</p>
<div class="bg-light rounded">
<img src="{{ qr_code_url }}" class="mx-auto d-block"/>
<img src="{{ qr_code_url }}" alt="{% trans 'QC Code' %}" class="mx-auto d-block"/>
</div>
<br>
@ -44,4 +44,4 @@
<span class='fas fa-undo-alt'></span> {% trans "Return to Site" %}
</a>
</div>
{% endblock %}
{% endblock content %}

View File

@ -4,7 +4,7 @@
<td><span class='fas fa-barcode'></span></td>
<td>{% trans "Barcode Identifier" %}</td>
<td {% if instance.barcode_data %}title='{{ instance.barcode_data }}'{% endif %}>
{{ instance.barcode_hash}}
{{ instance.barcode_hash }}
</td>
</tr>
{% endif %}

View File

@ -59,15 +59,15 @@
<style>
{% block css %}
<!-- Custom CSS style goes here -->
{% endblock %}
{% endblock css %}
</style>
{% block head %}
{% endblock %}
{% endblock head %}
<title>
{% block page_title %}
{% inventree_title %}
{% endblock %}
{% endblock page_title %}
</title>
</head>
@ -84,7 +84,7 @@
<ul id='sidebar-list-group' class='list-group sidebar-list-group'>
{% block sidebar %}
<!-- Sidebar goes here -->
{% endblock %}
{% endblock sidebar %}
{% include "plugin/panel_menu.html" %}
{% include "sidebar_toggle.html" with target='sidebar' %}
</ul>
@ -107,28 +107,28 @@
</div>
{% endif %}
</div>
{% endblock %}
{% endblock alerts %}
{% block breadcrumb_list %}
<div class='container-fluid navigation' id='breadcrumb-div'>
<nav aria-label='breadcrumb'>
<ol class='breadcrumb' id='breadcrumb-list'>
{% block breadcrumbs %}
{% endblock %}
{% endblock breadcrumbs %}
</ol>
</nav>
<div id='breadcrumb-tree-collapse' class='collapse collapse-horizontal show border' style='display: none;'>
{% block breadcrumb_tree %}
{% endblock %}
{% endblock breadcrumb_tree %}
</div>
</div>
{% endblock %}
{% endblock breadcrumb_list %}
{% block content %}
<!-- Each view fills in here.. -->
{% endblock %}
{% endblock content %}
</main>
</div>
@ -180,7 +180,7 @@
<script defer type='text/javascript' src="{% i18n_static 'notification.js' %}"></script>
{% block js_load %}
{% endblock %}
{% endblock js_load %}
<script defer type='text/javascript'>
@ -189,7 +189,7 @@ $(document).ready(function () {
{% include "plugin/panel_js.html" %}
{% block js_ready %}
{% endblock %}
{% endblock js_ready %}
inventreeDocReady();
@ -217,7 +217,7 @@ $(document).ready(function () {
</script>
{% block js %}
{% endblock %}
{% endblock js %}
</body>
</html>

View File

@ -8,36 +8,36 @@
<tr style='background: #eef3f7; height: 4rem; text-align: center;'>
<th colspan="100%" style="padding-bottom: 1rem; color: #68686a;">
{% block header_row %}
<p style='font-size: 1.25rem;'>{% block title %}<!-- email title goes here -->{% endblock %}</p>
<p style='font-size: 1.25rem;'>{% block title %}<!-- email title goes here -->{% endblock title %}</p>
{% block subtitle %}
<!-- email subtitle goes here -->
{% endblock %}
{% endblock %}
{% endblock subtitle %}
{% endblock header_row %}
</th>
</tr>
{% endblock %}
{% endblock header %}
{% block body %}
<tr style="height: 3rem; border-bottom: 1px solid #68686a;">
{% block body_row %}
<!-- email body goes here -->
{% endblock %}
{% endblock body_row %}
</tr>
{% endblock %}
{% endblock body %}
{% block footer %}
<tr style='background: #eef3f7; height: 2rem;'>
<td colspan="100%" style="padding-top:1rem; text-align: center">
{% block footer_prefix %}
<!-- Custom footer information goes here -->
{% endblock %}
{% endblock footer_prefix %}
<p><em><small>{% inventree_version shortstring=True %} - <a href='https://docs.inventree.org'>InvenTree Documentation</a></small></em></p>
{% block footer_suffix %}
<!-- Custom footer information goes here -->
{% endblock %}
{% endblock footer_suffix %}
</td>
</tr>
{% endblock %}
{% endblock footer %}
</table>

View File

@ -10,7 +10,6 @@
{% endif %}
{% endblock title %}
{% block body %}
<tr style="height: 3rem; border-bottom: 1px solid">
<th>{% trans "Part" %}</th>

View File

@ -4,9 +4,9 @@
{% if hover %}
<a class='hover-icon'>
{% endif %}
<img class='hover-img-thumb' {% if image %}src='{{ image.url }}'{% else %}src='{% static "img/blank_image.png" %}'{% endif %}>
<img class='hover-img-thumb' alt='{% trans "Image" %}' {% if image %}src='{{ image.url }}'{% else %}src='{% static "img/blank_image.png" %}'{% endif %}>
{% if hover and image %}
<img class='hover-img-large' {% if image %}src='{{ image.url }}'{% else %}src='{% static "img/blank_image.png" %}'{% endif %}>
<img class='hover-img-large' alt='{% trans "Image" %}' {% if image %}src='{{ image.url }}'{% else %}src='{% static "img/blank_image.png" %}'{% endif %}>
</a>
{% endif %}
</div>

View File

@ -1 +1 @@
<a href="mailto:{{ mail }}">{{ mail }}</a>{% include "clip.html"%}
<a href="mailto:{{ mail }}">{{ mail }}</a>{% include "clip.html" %}

View File

@ -14,7 +14,7 @@
</div>
{% block pre_form_content %}
{% endblock %}
{% endblock pre_form_content %}
{% block form %}
<form method="post" action='' class='js-modal-form' enctype="multipart/form-data">
@ -22,13 +22,13 @@
{% load crispy_forms_tags %}
{% block form_data %}
{% endblock %}
{% endblock form_data %}
{% crispy form %}
</form>
{% endblock %}
{% endblock form %}
{% block post_form_content %}
{% endblock %}
{% endblock post_form_content %}

View File

@ -3,7 +3,7 @@
<div class='modal fade modal-image' role='dialog' id='modal-image-dialog'>
<span class='modal-close' id='modal-image-close'>&times;</span>
<img class='modal-image-content' id='modal-image'>
<img class='modal-image-content' alt='{% trans "Image" %}' id='modal-image'>
</div>

View File

@ -14,7 +14,7 @@
<nav class="navbar {% if sticky %}fixed-top{% endif %} navbar-expand-lg navbar-light">
<div class="container-fluid">
<div class="navbar-header clearfix content-heading">
<a class="navbar-brand" id='logo' href="{% url 'index' %}" style="padding-top: 7px; padding-bottom: 5px;"><img src="{% inventree_logo %}" width="32" height="32" style="display:block; margin: auto;"/></a>
<a class="navbar-brand" id='logo' href="{% url 'index' %}" style="padding-top: 7px; padding-bottom: 5px;"><img src="{% inventree_logo %}" alt="{% trans 'InvenTree logo' %}" width="32" height="32" style="display:block; margin: auto;"/></a>
</div>
<div class="navbar-collapse collapse" id="navbar-objects">
<ul class="navbar-nav">
@ -75,13 +75,13 @@
{% if navigation %}
<li class='nav-item dropdown'>
<a class='nav-link dropdown-toggle' data-bs-toggle="dropdown" aria-expanded="false" href='#'>
<span class='{{plugin.navigation_icon}} icon-header'></span>{{plugin.navigation_name}}
<span class='{{ plugin.navigation_icon }} icon-header'></span>{{ plugin.navigation_name }}
</a>
<ul class='dropdown-menu'>
{% for nav_item in plugin.navigation %}
{% safe_url nav_item.link as nav_link %}
{% if nav_link %}
<li><a href="{{ nav_link }}" class="dropdown-item"><span class='{{nav_item.icon}} icon-header'></span>{{nav_item.name}}</a>
<li><a href="{{ nav_link }}" class="dropdown-item"><span class='{{ nav_item.icon }} icon-header'></span>{{ nav_item.name }}</a>
{% endif %}
{% endfor %}
</ul>

View File

@ -11,13 +11,13 @@
<h4>
{% block heading %}
<i>-- page header goes here --</i>
{% endblock %}
{% endblock heading %}
</h4>
{% include "spacer.html" %}
<div id='page-actions' class='btn-group' role='group'>
{% block actions %}
<i>-- actions go here --</i>
{% endblock %}
{% endblock actions %}
</div>
</div>
</div>
@ -56,13 +56,13 @@
</div>
</div>
</div>
{% endblock %}
{% endblock page_info %}
</div>
{% block page_content %}
<!-- Custom page content goes here-->
{% endblock %}
{% endblock page_content %}
{% include "plugin/panel_content.html" %}
{% endblock %}
{% endblock content %}

View File

@ -1,20 +1,20 @@
<div class='panel panel-hidden' id='panel-{% block label %}name{% endblock %}'>
<div class='panel panel-hidden' id='panel-{% block label %}name{% endblock label %}'>
{% block panel_heading %}
<div class='panel-heading'>
<div class='d-flex flex-wrap'>
<h4>{% block heading %}HEADING{% endblock %}</h4>
<h4>{% block heading %}HEADING{% endblock heading %}</h4>
{% include "spacer.html" %}
<div class='btn-group' role='group'>
{% block actions %}
{% endblock %}
{% endblock actions %}
</div>
</div>
</div>
{% endblock %}
{% endblock panel_heading %}
{% block panel_content %}
<div class='panel-content'>
{% block content %}
{% endblock %}
{% endblock content %}
</div>
{% endblock %}
{% endblock panel_content %}
</div>

View File

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

View File

@ -4,7 +4,7 @@
<div class='container' style='width: 80%;'>
{% if qr_data %}
<div class='d-flex justify-content-center'>
<img src="{% qrcode qr_data %}">
<img alt='{% trans "QR code" %}' src="{% qrcode qr_data %}">
</div>
{% else %}
<div class='alert alert-block alert-warning'>

View File

@ -7,4 +7,4 @@
<p><a href="{% url 'admin:index' %}">{% translate 'Log in again' %}</a></p>
{% endblock %}
{% endblock content %}

View File

@ -1 +1 @@
<h1>{{abc}}</h1>
<h1>{{ abc }}</h1>

View File

@ -39,32 +39,32 @@
<link rel="stylesheet" href="{% static 'css/inventree.css' %}">
{% block head_css %}
{% endblock %}
{% endblock head_css %}
<style>
{% block css %}
{% endblock %}
{% endblock css %}
</style>
{% block head %}
{% endblock %}
{% endblock head %}
<title>
{% block page_title %}
{% endblock %}
{% endblock page_title %}
</title>
</head>
<body class='{% block body_class %}{% endblock %}'>
<body class='{% block body_class %}{% endblock body_class %}'>
{% block body %}
{% endblock %}
{% endblock body %}
<!-- Scripts -->
<script type="text/javascript" src="{% static 'script/jquery_3.3.1_jquery.min.js' %}"></script>
<script type='text/javascript' src="{% static 'script/jquery-ui/jquery-ui.min.js' %}"></script>
<script type="text/javascript" src="{% static 'bootstrap/js/bootstrap.bundle.min.js' %}"></script>
{% block body_scripts_general %}
{% endblock %}
{% endblock body_scripts_general %}
{% include "third_party_js.html" %}
@ -73,7 +73,7 @@
<script type='text/javascript' src="{% static 'script/inventree/message.js' %}"></script>
<script type='text/javascript' src="{% i18n_static 'notification.js' %}"></script>
{% block body_scripts_inventree %}
{% endblock %}
{% endblock body_scripts_inventree %}
<!-- fontawesome -->
<script type='text/javascript' src="{% static 'fontawesome/js/solid.js' %}"></script>
@ -81,13 +81,13 @@
<script type='text/javascript' src="{% static 'fontawesome/js/fontawesome.js' %}"></script>
{% block js_load %}
{% endblock %}
{% endblock js_load %}
{% block js_base %}
{% endblock %}
{% endblock js_base %}
{% block js %}
{% endblock %}
{% endblock js %}
</body>
</html>

View File

@ -2,7 +2,7 @@
{% load i18n %}
{% block head_title %}{% trans "Social Network Login Failure" %}{% endblock %}
{% block head_title %}{% trans "Social Network Login Failure" %}{% endblock head_title %}
{% block content %}
<h3>{% trans "Account Login Failure" %}</h3>
@ -20,4 +20,4 @@
</a>
</div>
{% endblock %}
{% endblock content %}

View File

@ -1,7 +1,7 @@
{% extends "socialaccount/base.html" %}
{% load i18n %}
{% block head_title %}{% trans "Sign In" %}{% endblock %}
{% block head_title %}{% trans "Sign In" %}{% endblock head_title %}
{% block content %}
{% if process == "connect" %}
@ -25,4 +25,4 @@
{% trans "Return to login page" %}
</a>
</div>
{% endblock %}
{% endblock content %}

View File

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

View File

@ -7,16 +7,16 @@
<li class='sso-provider-link'>
{% if provider.id == "openid" %}
{% for brand in provider.get_brands %}
<a title="{{brand.name}}" brand_name='{{ provider.id }}'
class="btn btn-light socialaccount_provider {{provider.id}} {{brand.id}}"
<a title="{{ brand.name }}" brand_name='{{ provider.id }}'
class="btn btn-light socialaccount_provider {{ provider.id }} {{ brand.id }}"
href="{% provider_login_url provider.id openid=brand.openid_url process=process %}">
<span class='brand-icon' brand_name='{{provider.id}}'></span> {{ brand.name }}</a>
<span class='brand-icon' brand_name='{{ provider.id }}'></span> {{ brand.name }}</a>
{% endfor %}
{% endif %}
<a title="{{provider.name}}" brand_name='{{ provider.id }}'
class="btn btn-light socialaccount_provider {{provider.id}}"
<a title="{{ provider.name }}" brand_name='{{ provider.id }}'
class="btn btn-light socialaccount_provider {{ provider.id }}"
href="{% provider_login_url provider.id process=process scope=scope auth_params=auth_params %}"
><span class='brand-icon' brand_name='{{provider.id}}'></span> {{ provider.name }}</a>
><span class='brand-icon' brand_name='{{ provider.id }}'></span> {{ provider.name }}</a>
</li>
{% endfor %}
</ul>

View File

@ -1 +1 @@
<a href="tel:{{ tel }}">{{ tel }}</a>{% include "clip.html"%}
<a href="tel:{{ tel }}">{{ tel }}</a>{% include "clip.html" %}