2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-18 04:55:44 +00:00

Label dpi config (#3208)

* Updates for label printing settings:

- Make LABEL_ENABLE a global setting
- Add LABEL_DPI setting (default = 300)
- Add new global settings tab

* Use the configured DPI when printing labels
This commit is contained in:
Oliver
2022-06-16 14:49:17 +10:00
committed by GitHub
parent 9bd62f986f
commit d84b67ddf4
7 changed files with 44 additions and 9 deletions

View File

@ -0,0 +1,20 @@
{% extends "panel.html" %}
{% load i18n %}
{% load inventree_extras %}
{% block label %}labels{% endblock %}
{% block heading %}
{% trans "Label Settings" %}
{% endblock %}
{% block content %}
<table class='table table-striped table-condensed'>
<tbody>
{% include "InvenTree/settings/setting.html" with key="LABEL_ENABLE" icon='fa-toggle-on' %}
{% include "InvenTree/settings/setting.html" with key="LABEL_DPI" icon='fa-toggle-on' %}
</tbody>
</table>
{% endblock %}

View File

@ -33,6 +33,7 @@
{% include "InvenTree/settings/login.html" %}
{% include "InvenTree/settings/barcode.html" %}
{% include "InvenTree/settings/currencies.html" %}
{% include "InvenTree/settings/label.html" %}
{% include "InvenTree/settings/report.html" %}
{% include "InvenTree/settings/part.html" %}
{% include "InvenTree/settings/category.html" %}

View File

@ -34,6 +34,8 @@
{% include "sidebar_item.html" with label='barcodes' text=text icon="fa-qrcode" %}
{% trans "Currencies" as text %}
{% include "sidebar_item.html" with label='currencies' text=text icon="fa-dollar-sign" %}
{% trans "Label Printing" as text %}
{% include "sidebar_item.html" with label='labels' text=text icon='fa-tag' %}
{% trans "Reporting" as text %}
{% include "sidebar_item.html" with label='reporting' text=text icon="fa-file-pdf" %}
{% trans "Parts" as text %}

View File

@ -14,7 +14,6 @@
<div class='row'>
<table class='table table-striped table-condensed'>
<tbody>
{% include "InvenTree/settings/setting.html" with key="LABEL_ENABLE" icon='fa-toggle-on' user_setting=True %}
{% include "InvenTree/settings/setting.html" with key="LABEL_INLINE" icon='fa-tag' user_setting=True %}
</tbody>
</table>

View File

@ -7,7 +7,7 @@
{% settings_value 'REPORT_ENABLE_TEST_REPORT' as test_report_enabled %}
{% settings_value "REPORT_ENABLE" as report_enabled %}
{% settings_value "SERVER_RESTART_REQUIRED" as server_restart_required %}
{% settings_value "LABEL_ENABLE" with user=user as labels_enabled %}
{% settings_value "LABEL_ENABLE" as labels_enabled %}
{% inventree_show_about user as show_about %}
<!DOCTYPE html>