mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Tweaks for settings pages
This commit is contained in:
parent
ae2c3e8293
commit
05d350b6c8
@ -644,7 +644,7 @@ DATE_INPUT_FORMATS = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
# crispy forms use the bootstrap templates
|
# crispy forms use the bootstrap templates
|
||||||
CRISPY_TEMPLATE_PACK = 'bootstrap3'
|
CRISPY_TEMPLATE_PACK = 'bootstrap4'
|
||||||
|
|
||||||
# Use database transactions when importing / exporting data
|
# Use database transactions when importing / exporting data
|
||||||
IMPORT_EXPORT_USE_TRANSACTIONS = True
|
IMPORT_EXPORT_USE_TRANSACTIONS = True
|
||||||
|
@ -10,6 +10,8 @@
|
|||||||
--label-green: #50aa51;
|
--label-green: #50aa51;
|
||||||
--label-grey: #aaa;
|
--label-grey: #aaa;
|
||||||
--label-yellow: #fdc82a;
|
--label-yellow: #fdc82a;
|
||||||
|
|
||||||
|
--bs-body-color: #555;
|
||||||
}
|
}
|
||||||
|
|
||||||
.login-screen {
|
.login-screen {
|
||||||
@ -144,18 +146,16 @@
|
|||||||
padding-right: 5px;
|
padding-right: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.navbar-nav > li {
|
|
||||||
border-left: 1px solid;
|
|
||||||
border-right: 1px solid;
|
|
||||||
border-color: #eee;
|
|
||||||
}
|
|
||||||
|
|
||||||
.navbar-form {
|
.navbar-form {
|
||||||
padding-right: 3px;
|
padding-right: 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.navbar-light .navbar-nav .nav-link {
|
||||||
|
color: var(--bs-body-color);
|
||||||
|
}
|
||||||
|
|
||||||
#barcode-scan {
|
#barcode-scan {
|
||||||
margin-top: 8px;
|
margin-top: 1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.icon-header {
|
.icon-header {
|
||||||
@ -895,6 +895,16 @@ input[type="submit"] {
|
|||||||
margin-right: 2px;
|
margin-right: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.btn-secondary {
|
||||||
|
background-color: var(--bs-body-color);
|
||||||
|
border-color: var(--bs-body-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-outline-secondary {
|
||||||
|
color: var(--bs-body-color);
|
||||||
|
border-color: var(--bs-body-color);
|
||||||
|
}
|
||||||
|
|
||||||
.btn-small {
|
.btn-small {
|
||||||
padding: 3px;
|
padding: 3px;
|
||||||
padding-left: 5px;
|
padding-left: 5px;
|
||||||
|
@ -85,7 +85,6 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
{% else %}
|
{% else %}
|
||||||
<h3>{% trans "Category Details" %}</h3>
|
|
||||||
<table class='table table-striped table-condensed'>
|
<table class='table table-striped table-condensed'>
|
||||||
<col width='25'>
|
<col width='25'>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -150,9 +150,9 @@
|
|||||||
<table class='table table-condensed table-striped'>
|
<table class='table table-condensed table-striped'>
|
||||||
<col width='25'>
|
<col width='25'>
|
||||||
<tr>
|
<tr>
|
||||||
<td><h4><span class='fas fa-boxes'></span></h4></td>
|
<td><h5><span class='fas fa-boxes'></span></h5></td>
|
||||||
<td><h4>{% trans "Available Stock" %}</h4></td>
|
<td><h5>{% trans "Available Stock" %}</h5></td>
|
||||||
<td><h4>{% decimal available %}{% if part.units %} {{ part.units }}{% endif %}</h4></td>
|
<td><h5>{% decimal available %}{% if part.units %} {{ part.units }}{% endif %}</h5></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><span class='fas fa-map-marker-alt'></span></td>
|
<td><span class='fas fa-map-marker-alt'></span></td>
|
||||||
@ -191,9 +191,9 @@
|
|||||||
{% if not part.is_template %}
|
{% if not part.is_template %}
|
||||||
{% if part.assembly %}
|
{% if part.assembly %}
|
||||||
<tr>
|
<tr>
|
||||||
<td><h4><span class='fas fa-tools'></span></h4></td>
|
<td><h5><span class='fas fa-tools'></span></h5></td>
|
||||||
<td colspan='2'>
|
<td colspan='2'>
|
||||||
<h4>{% trans "Build Status" %}</h4>
|
<h5>{% trans "Build Status" %}</h5>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@ -424,42 +424,4 @@
|
|||||||
});
|
});
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
$("#toggle-part-details").click(function() {
|
|
||||||
if (this.value == 'show') {
|
|
||||||
this.innerHTML = '<span class="fas fa-chevron-up"></span> {% trans "Hide Part Details" %}';
|
|
||||||
this.value = 'hide';
|
|
||||||
// Store state of part details section
|
|
||||||
localStorage.setItem("part-details-show", true);
|
|
||||||
} else {
|
|
||||||
this.innerHTML = '<span class="fas fa-chevron-down"></span> {% trans "Show Part Details" %}';
|
|
||||||
this.value = 'show';
|
|
||||||
// Store state of part details section
|
|
||||||
localStorage.setItem("part-details-show", false);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// Load part details section
|
|
||||||
window.onload = function() {
|
|
||||||
details_show = localStorage.getItem("part-details-show")
|
|
||||||
|
|
||||||
if (details_show === 'true') {
|
|
||||||
console.log(details_show)
|
|
||||||
// Get collapsible details section
|
|
||||||
details = document.getElementById('collapsible-part-details');
|
|
||||||
// Add "show" class
|
|
||||||
details.classList.add("in");
|
|
||||||
// Get toggle
|
|
||||||
toggle = document.getElementById('toggle-part-details');
|
|
||||||
// Change state of toggle
|
|
||||||
toggle.innerHTML = '<span class="fas fa-chevron-up"></span> {% trans "Hide Part Details" %}';
|
|
||||||
toggle.value = 'hide';
|
|
||||||
} else {
|
|
||||||
// Get toggle
|
|
||||||
toggle = document.getElementById('toggle-part-details');
|
|
||||||
// Change state of toggle
|
|
||||||
toggle.innerHTML = '<span class="fas fa-chevron-down"></span> {% trans "Show Part Details" %}';
|
|
||||||
toggle.value = 'show';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
@ -115,7 +115,6 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
{% else %}
|
{% else %}
|
||||||
<h3>{% trans "Stock Details" %}</h3>
|
|
||||||
<table class='table table-striped table-condensed'>
|
<table class='table table-striped table-condensed'>
|
||||||
<col width='25'>
|
<col width='25'>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -11,7 +11,6 @@
|
|||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
<table class='table table-striped table-condensed'>
|
<table class='table table-striped table-condensed'>
|
||||||
{% include "InvenTree/settings/header.html" %}
|
|
||||||
<tbody>
|
<tbody>
|
||||||
{% include "InvenTree/settings/setting.html" with key="BARCODE_ENABLE" icon="fa-qrcode" %}
|
{% include "InvenTree/settings/setting.html" with key="BARCODE_ENABLE" icon="fa-qrcode" %}
|
||||||
</tbody>
|
</tbody>
|
||||||
|
@ -11,7 +11,6 @@
|
|||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
<table class='table table-striped table-condensed'>
|
<table class='table table-striped table-condensed'>
|
||||||
{% include "InvenTree/settings/header.html" %}
|
|
||||||
<tbody>
|
<tbody>
|
||||||
{% include "InvenTree/settings/setting.html" with key="BUILDORDER_REFERENCE_PREFIX" %}
|
{% include "InvenTree/settings/setting.html" with key="BUILDORDER_REFERENCE_PREFIX" %}
|
||||||
{% include "InvenTree/settings/setting.html" with key="BUILDORDER_REFERENCE_REGEX" %}
|
{% include "InvenTree/settings/setting.html" with key="BUILDORDER_REFERENCE_REGEX" %}
|
||||||
|
@ -11,7 +11,6 @@
|
|||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
<table class='table table-striped table-condensed'>
|
<table class='table table-striped table-condensed'>
|
||||||
{% include "InvenTree/settings/header.html" %}
|
|
||||||
<tbody>
|
<tbody>
|
||||||
{% include "InvenTree/settings/setting.html" with key="INVENTREE_DEFAULT_CURRENCY" icon="fa-globe" %}
|
{% include "InvenTree/settings/setting.html" with key="INVENTREE_DEFAULT_CURRENCY" icon="fa-globe" %}
|
||||||
</tbody>
|
</tbody>
|
||||||
@ -45,7 +44,7 @@
|
|||||||
<form action='{% url "settings-currencies-refresh" %}' method='post'>
|
<form action='{% url "settings-currencies-refresh" %}' method='post'>
|
||||||
<div id='refresh-rates-form'>
|
<div id='refresh-rates-form'>
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
<button type='submit' id='update-rates' class='btn btn-default float-right'>{% trans "Update Now" %}</button>
|
<button type='submit' id='update-rates' class='btn btn-outline-secondary float-right'>{% trans "Update Now" %}</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</td>
|
</td>
|
||||||
|
@ -12,7 +12,6 @@
|
|||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
<table class='table table-striped table-condensed'>
|
<table class='table table-striped table-condensed'>
|
||||||
{% include "InvenTree/settings/header.html" %}
|
|
||||||
<tbody>
|
<tbody>
|
||||||
{% include "InvenTree/settings/setting.html" with key="INVENTREE_INSTANCE" icon="fa-info-circle" %}
|
{% include "InvenTree/settings/setting.html" with key="INVENTREE_INSTANCE" icon="fa-info-circle" %}
|
||||||
{% include "InvenTree/settings/setting.html" with key="INVENTREE_INSTANCE_TITLE" icon="fa-info-circle" %}
|
{% include "InvenTree/settings/setting.html" with key="INVENTREE_INSTANCE_TITLE" icon="fa-info-circle" %}
|
||||||
|
@ -1,12 +0,0 @@
|
|||||||
{% load i18n %}
|
|
||||||
|
|
||||||
<col width='25'>
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th></th>
|
|
||||||
<th>{% trans "Setting" %}</th>
|
|
||||||
<th>{% trans "Value" %}</th>
|
|
||||||
<th>{% trans "Description" %}</th>
|
|
||||||
<th></th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
@ -12,7 +12,6 @@
|
|||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
<table class='table table-striped table-condensed'>
|
<table class='table table-striped table-condensed'>
|
||||||
{% include "InvenTree/settings/header.html" %}
|
|
||||||
<tbody>
|
<tbody>
|
||||||
{% include "InvenTree/settings/setting.html" with key="LOGIN_ENABLE_SSO" icon="fa-info-circle" %}
|
{% include "InvenTree/settings/setting.html" with key="LOGIN_ENABLE_SSO" icon="fa-info-circle" %}
|
||||||
{% include "InvenTree/settings/setting.html" with key="LOGIN_ENABLE_PWD_FORGOT" icon="fa-info-circle" %}
|
{% include "InvenTree/settings/setting.html" with key="LOGIN_ENABLE_PWD_FORGOT" icon="fa-info-circle" %}
|
||||||
|
@ -12,7 +12,6 @@
|
|||||||
<h4>{% trans "Part Options" %}</h4>
|
<h4>{% trans "Part Options" %}</h4>
|
||||||
|
|
||||||
<table class='table table-striped table-condensed'>
|
<table class='table table-striped table-condensed'>
|
||||||
{% include "InvenTree/settings/header.html" %}
|
|
||||||
<tbody>
|
<tbody>
|
||||||
{% include "InvenTree/settings/setting.html" with key="PART_IPN_REGEX" %}
|
{% include "InvenTree/settings/setting.html" with key="PART_IPN_REGEX" %}
|
||||||
{% include "InvenTree/settings/setting.html" with key="PART_ALLOW_DUPLICATE_IPN" %}
|
{% include "InvenTree/settings/setting.html" with key="PART_ALLOW_DUPLICATE_IPN" %}
|
||||||
@ -49,7 +48,6 @@
|
|||||||
|
|
||||||
|
|
||||||
<table class='table table-striped table-condensed'>
|
<table class='table table-striped table-condensed'>
|
||||||
{% include "InvenTree/settings/header.html" %}
|
|
||||||
<tbody>
|
<tbody>
|
||||||
{% include "InvenTree/settings/setting.html" with key="PART_SHOW_IMPORT" icon="fa-file-upload" %}
|
{% include "InvenTree/settings/setting.html" with key="PART_SHOW_IMPORT" icon="fa-file-upload" %}
|
||||||
</tbody>
|
</tbody>
|
||||||
|
@ -9,7 +9,6 @@
|
|||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<table class='table table-striped table-condensed'>
|
<table class='table table-striped table-condensed'>
|
||||||
{% include "InvenTree/settings/header.html" %}
|
|
||||||
<tbody>
|
<tbody>
|
||||||
{% include "InvenTree/settings/setting.html" with key="PURCHASEORDER_REFERENCE_PREFIX" %}
|
{% include "InvenTree/settings/setting.html" with key="PURCHASEORDER_REFERENCE_PREFIX" %}
|
||||||
</tbody>
|
</tbody>
|
||||||
|
@ -11,7 +11,6 @@
|
|||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
<table class='table table-striped table-condensed'>
|
<table class='table table-striped table-condensed'>
|
||||||
{% include "InvenTree/settings/header.html" %}
|
|
||||||
<tbody>
|
<tbody>
|
||||||
{% include "InvenTree/settings/setting.html" with key="REPORT_DEFAULT_PAGE_SIZE" %}
|
{% include "InvenTree/settings/setting.html" with key="REPORT_DEFAULT_PAGE_SIZE" %}
|
||||||
{% include "InvenTree/settings/setting.html" with key="REPORT_DEBUG_MODE" %}
|
{% include "InvenTree/settings/setting.html" with key="REPORT_DEBUG_MODE" %}
|
||||||
|
@ -38,7 +38,7 @@
|
|||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<div class='btn-group float-right'>
|
<div class='btn-group float-right'>
|
||||||
<button class='btn btn-default btn-edit-setting' pk='{{ setting.pk }}' setting='{{ setting.key.upper }}' title='{% trans "Edit setting" %}' {% if user_setting %}user='{{request.user.id}}'{% endif %}>
|
<button class='btn btn-outline-secondary btn-small btn-edit-setting' pk='{{ setting.pk }}' setting='{{ setting.key.upper }}' title='{% trans "Edit setting" %}' {% if user_setting %}user='{{request.user.id}}'{% endif %}>
|
||||||
<span class='fas fa-edit icon-green'></span>
|
<span class='fas fa-edit icon-green'></span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
@ -174,8 +174,8 @@ $('#cat-param-table').inventreeTable({
|
|||||||
title: '{% trans "Default Value" %}',
|
title: '{% trans "Default Value" %}',
|
||||||
sortable: 'true',
|
sortable: 'true',
|
||||||
formatter: function(value, row, index, field) {
|
formatter: function(value, row, index, field) {
|
||||||
var bEdit = "<button title='{% trans "Edit Template" %}' class='template-edit btn btn-default' type='button' pk='" + row.pk + "'><span class='fas fa-edit'></span></button>";
|
var bEdit = "<button title='{% trans "Edit Template" %}' class='template-edit btn btn-outline-secondary' type='button' pk='" + row.pk + "'><span class='fas fa-edit'></span></button>";
|
||||||
var bDel = "<button title='{% trans "Delete Template" %}' class='template-delete btn btn-default' type='button' pk='" + row.pk + "'><span class='fas fa-trash-alt icon-red'></span></button>";
|
var bDel = "<button title='{% trans "Delete Template" %}' class='template-delete btn btn-outline-secondary' type='button' pk='" + row.pk + "'><span class='fas fa-trash-alt icon-red'></span></button>";
|
||||||
|
|
||||||
var html = value
|
var html = value
|
||||||
html += "<div class='btn-group float-right' role='group'>" + bEdit + bDel + "</div>";
|
html += "<div class='btn-group float-right' role='group'>" + bEdit + bDel + "</div>";
|
||||||
@ -273,8 +273,8 @@ $("#param-table").inventreeTable({
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
formatter: function(value, row, index, field) {
|
formatter: function(value, row, index, field) {
|
||||||
var bEdit = "<button title='{% trans "Edit Template" %}' class='template-edit btn btn-default' type='button' pk='" + row.pk + "'><span class='fas fa-edit'></span></button>";
|
var bEdit = "<button title='{% trans "Edit Template" %}' class='template-edit btn btn-outline-secondary' type='button' pk='" + row.pk + "'><span class='fas fa-edit'></span></button>";
|
||||||
var bDel = "<button title='{% trans "Delete Template" %}' class='template-delete btn btn-default' type='button' pk='" + row.pk + "'><span class='fas fa-trash-alt icon-red'></span></button>";
|
var bDel = "<button title='{% trans "Delete Template" %}' class='template-delete btn btn-outline-secondary' type='button' pk='" + row.pk + "'><span class='fas fa-trash-alt icon-red'></span></button>";
|
||||||
|
|
||||||
var html = "<div class='btn-group float-right' role='group'>" + bEdit + bDel + "</div>";
|
var html = "<div class='btn-group float-right' role='group'>" + bEdit + bDel + "</div>";
|
||||||
|
|
||||||
|
@ -10,7 +10,6 @@
|
|||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
<table class='table table-striped table-condensed'>
|
<table class='table table-striped table-condensed'>
|
||||||
{% include "InvenTree/settings/header.html" %}
|
|
||||||
<tbody>
|
<tbody>
|
||||||
{% include "InvenTree/settings/setting.html" with key="SALESORDER_REFERENCE_PREFIX" %}
|
{% include "InvenTree/settings/setting.html" with key="SALESORDER_REFERENCE_PREFIX" %}
|
||||||
</tbody>
|
</tbody>
|
||||||
|
@ -10,7 +10,6 @@
|
|||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
<table class='table table-striped table-condensed'>
|
<table class='table table-striped table-condensed'>
|
||||||
{% include "InvenTree/settings/header.html" %}
|
|
||||||
<tbody>
|
<tbody>
|
||||||
{% include "InvenTree/settings/setting.html" with key="STOCK_GROUP_BY_PART" icon="fa-layer-group" %}
|
{% include "InvenTree/settings/setting.html" with key="STOCK_GROUP_BY_PART" icon="fa-layer-group" %}
|
||||||
{% include "InvenTree/settings/setting.html" with key="STOCK_ENABLE_EXPIRY" icon="fa-stopwatch" %}
|
{% include "InvenTree/settings/setting.html" with key="STOCK_ENABLE_EXPIRY" icon="fa-stopwatch" %}
|
||||||
|
@ -13,7 +13,6 @@
|
|||||||
|
|
||||||
<div class='row'>
|
<div class='row'>
|
||||||
<table class='table table-striped table-condensed'>
|
<table class='table table-striped table-condensed'>
|
||||||
{% include "InvenTree/settings/header.html" %}
|
|
||||||
<tbody>
|
<tbody>
|
||||||
{% include "InvenTree/settings/setting.html" with key="HOMEPAGE_PART_STARRED" icon='fa-star' user_setting=True %}
|
{% include "InvenTree/settings/setting.html" with key="HOMEPAGE_PART_STARRED" icon='fa-star' user_setting=True %}
|
||||||
{% include "InvenTree/settings/setting.html" with key="HOMEPAGE_PART_LATEST" icon='fa-history' user_setting=True %}
|
{% include "InvenTree/settings/setting.html" with key="HOMEPAGE_PART_LATEST" icon='fa-history' user_setting=True %}
|
||||||
|
@ -13,7 +13,6 @@
|
|||||||
|
|
||||||
<div class='row'>
|
<div class='row'>
|
||||||
<table class='table table-striped table-condensed'>
|
<table class='table table-striped table-condensed'>
|
||||||
{% include "InvenTree/settings/header.html" %}
|
|
||||||
<tbody>
|
<tbody>
|
||||||
{% include "InvenTree/settings/setting.html" with key="LABEL_INLINE" icon='fa-tag' user_setting=True %}
|
{% include "InvenTree/settings/setting.html" with key="LABEL_INLINE" icon='fa-tag' user_setting=True %}
|
||||||
</tbody>
|
</tbody>
|
||||||
|
@ -13,7 +13,6 @@
|
|||||||
|
|
||||||
<div class='row'>
|
<div class='row'>
|
||||||
<table class='table table-striped table-condensed'>
|
<table class='table table-striped table-condensed'>
|
||||||
{% include "InvenTree/settings/header.html" %}
|
|
||||||
<tbody>
|
<tbody>
|
||||||
{% include "InvenTree/settings/setting.html" with key="REPORT_INLINE" icon='fa-file-pdf' user_setting=True %}
|
{% include "InvenTree/settings/setting.html" with key="REPORT_INLINE" icon='fa-file-pdf' user_setting=True %}
|
||||||
</tbody>
|
</tbody>
|
||||||
|
@ -13,7 +13,6 @@
|
|||||||
|
|
||||||
<div class='row'>
|
<div class='row'>
|
||||||
<table class='table table-striped table-condensed'>
|
<table class='table table-striped table-condensed'>
|
||||||
{% include "InvenTree/settings/header.html" %}
|
|
||||||
<tbody>
|
<tbody>
|
||||||
{% include "InvenTree/settings/setting.html" with key="SEARCH_PREVIEW_RESULTS" user_setting=True icon='fa-search' %}
|
{% include "InvenTree/settings/setting.html" with key="SEARCH_PREVIEW_RESULTS" user_setting=True icon='fa-search' %}
|
||||||
{% include "InvenTree/settings/setting.html" with key="SEARCH_SHOW_STOCK_LEVELS" user_setting=True icon='fa-boxes' %}
|
{% include "InvenTree/settings/setting.html" with key="SEARCH_SHOW_STOCK_LEVELS" user_setting=True icon='fa-boxes' %}
|
||||||
|
@ -13,7 +13,6 @@
|
|||||||
|
|
||||||
<div class='row'>
|
<div class='row'>
|
||||||
<table class='table table-striped table-condensed'>
|
<table class='table table-striped table-condensed'>
|
||||||
{% include "InvenTree/settings/header.html" %}
|
|
||||||
|
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user