diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
index 1a75b97af0..55585c7670 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.md
+++ b/.github/ISSUE_TEMPLATE/bug_report.md
@@ -1,31 +1,47 @@
---
-name: Bug report
-about: Create a bug report to help us improve InvenTree
+name: Bug
+about: Create a bug report to help us improve InvenTree!
title: "[BUG] Enter bug description"
labels: bug, question
assignees: ''
---
-**Describe the bug**
-A clear and concise description of what the bug is.
+
+
+
+**Describe the bug**
+
+
+**Steps to Reproduce**
-**To Reproduce**
Steps to reproduce the behavior:
+
**Expected behavior**
+
+
**Deployment Method**
-Docker
-Bare Metal
+- [ ] Docker
+- [ ] Bare Metal
**Version Information**
-You can get this by going to the "About InvenTree" section in the upper right corner and cicking on to the "copy version information"
+
diff --git a/InvenTree/InvenTree/apps.py b/InvenTree/InvenTree/apps.py
index 31a887d736..5f347dd1e5 100644
--- a/InvenTree/InvenTree/apps.py
+++ b/InvenTree/InvenTree/apps.py
@@ -76,6 +76,12 @@ class InvenTreeConfig(AppConfig):
minutes=30,
)
+ # Delete old notification records
+ InvenTree.tasks.schedule_task(
+ 'common.tasks.delete_old_notifications',
+ schedule_type=Schedule.DAILY,
+ )
+
def update_exchange_rates(self):
"""
Update exchange rates each time the server is started, *if*:
diff --git a/InvenTree/InvenTree/management/commands/rebuild_thumbnails.py b/InvenTree/InvenTree/management/commands/rebuild_thumbnails.py
index 07e700a1cf..bf36a612d1 100644
--- a/InvenTree/InvenTree/management/commands/rebuild_thumbnails.py
+++ b/InvenTree/InvenTree/management/commands/rebuild_thumbnails.py
@@ -17,7 +17,7 @@ from company.models import Company
from part.models import Part
-logger = logging.getLogger("inventree-thumbnails")
+logger = logging.getLogger('inventree')
class Command(BaseCommand):
diff --git a/InvenTree/InvenTree/static/css/inventree.css b/InvenTree/InvenTree/static/css/inventree.css
index 1bd6d50f72..b2e3b36354 100644
--- a/InvenTree/InvenTree/static/css/inventree.css
+++ b/InvenTree/InvenTree/static/css/inventree.css
@@ -28,9 +28,8 @@
padding: 20px;
padding-bottom: 35px;
background-color: rgba(50, 50, 50, 0.75);
-
width: 100%;
- max-width: 350px;
+ max-width: 550px;
margin: auto;
}
@@ -180,10 +179,6 @@
float: right;
}
-.starred-part {
- color: #ffbb00;
-}
-
.red-cell {
background-color: #ec7f7f;
}
@@ -565,6 +560,12 @@
transition: 0.1s;
}
+.search-autocomplete-item {
+ border-top: 1px solid #EEE;
+ margin-bottom: 2px;
+ overflow-x: hidden;
+}
+
.modal {
overflow: hidden;
z-index: 9999;
@@ -745,13 +746,7 @@ input[type="submit"] {
}
.notification-area {
- position: fixed;
- top: 0px;
- margin-top: 20px;
- width: 100%;
- padding: 20px;
- z-index: 5000;
- pointer-events: none; /* Prevent this div from blocking links underneath */
+ opacity: 0.8;
}
.notes {
@@ -761,7 +756,6 @@ input[type="submit"] {
}
.alert {
- display: none;
border-radius: 5px;
opacity: 0.9;
pointer-events: all;
@@ -771,9 +765,8 @@ input[type="submit"] {
display: block;
}
-.btn {
- margin-left: 2px;
- margin-right: 2px;
+.navbar .btn {
+ margin-left: 5px;
}
.btn-secondary {
diff --git a/InvenTree/templates/js/dynamic/inventree.js b/InvenTree/InvenTree/static/script/inventree/inventree.js
similarity index 71%
rename from InvenTree/templates/js/dynamic/inventree.js
rename to InvenTree/InvenTree/static/script/inventree/inventree.js
index 0172e47706..85ae042728 100644
--- a/InvenTree/templates/js/dynamic/inventree.js
+++ b/InvenTree/InvenTree/static/script/inventree/inventree.js
@@ -1,5 +1,3 @@
-{% load inventree_extras %}
-
/* globals
ClipboardJS,
inventreeFormDataUpload,
@@ -130,61 +128,79 @@ function inventreeDocReady() {
attachClipboard('.clip-btn-version', 'modal-about', 'about-copy-text');
// Add autocomplete to the search-bar
- $('#search-bar').autocomplete({
- source: function(request, response) {
- $.ajax({
- url: '/api/part/',
- data: {
+ if ($('#search-bar').exists()) {
+ $('#search-bar').autocomplete({
+ source: function(request, response) {
+
+ var params = {
search: request.term,
limit: user_settings.SEARCH_PREVIEW_RESULTS,
- offset: 0
- },
- success: function(data) {
+ offset: 0,
+ };
- var transformed = $.map(data.results, function(el) {
- return {
- label: el.full_name,
- id: el.pk,
- thumbnail: el.thumbnail,
- data: el,
- };
- });
- response(transformed);
- },
- error: function() {
- response([]);
- }
- });
- },
- create: function() {
- $(this).data('ui-autocomplete')._renderItem = function(ul, item) {
-
- var html = ``;
-
- html += ` `;
- html += item.label;
-
- html += '';
-
- if (user_settings.SEARCH_SHOW_STOCK_LEVELS) {
- html += partStockLabel(item.data);
+ if (user_settings.SEARCH_HIDE_INACTIVE_PARTS) {
+ // Limit to active parts
+ params.active = true;
}
- html += '';
+ $.ajax({
+ url: '/api/part/',
+ data: params,
+ success: function(data) {
- return $('
${options.details}
`; + } + + // Hacky function to get the next available ID + var id = 1; + + while ($(`#alert-${id}`).exists()) { + id++; + } + + var icon = ''; + + if (options.icon) { + icon = ``; + } + + // Construct the alert + var html = ` +{% blocktrans with step=wizard.steps.step1 count=wizard.steps.count %}Step {{step}} of {{count}}{% endblocktrans %} + {% if description %}- {{ description }}{% endif %}
+ + + {% endblock form_buttons_bottom %} +