@@ -59,7 +59,7 @@
{% if part.virtual and part.active %}
-
+
{% trans 'Virtual' %}
diff --git a/InvenTree/part/templates/part/stock_count.html b/InvenTree/part/templates/part/stock_count.html
index 5b70995a22..4209b80bb6 100644
--- a/InvenTree/part/templates/part/stock_count.html
+++ b/InvenTree/part/templates/part/stock_count.html
@@ -4,7 +4,7 @@
{% decimal total_stock %}
{% if total_stock == 0 %}
-
{% trans "No Stock" %}
+
{% trans "No Stock" %}
{% elif total_stock < part.minimum_stock %}
-
{% trans "Low Stock" %}
+
{% trans "Low Stock" %}
{% endif %}
\ No newline at end of file
diff --git a/InvenTree/stock/templates/stock/item_base.html b/InvenTree/stock/templates/stock/item_base.html
index b4f6696bf1..c5c895693f 100644
--- a/InvenTree/stock/templates/stock/item_base.html
+++ b/InvenTree/stock/templates/stock/item_base.html
@@ -48,7 +48,7 @@
{% if item.is_expired %}
- {% trans "Expired" %}
+ {% trans "Expired" %}
{% else %}
{% if roles.stock.change %}
@@ -58,7 +58,7 @@
{% endif %}
{% if item.is_stale %}
- {% trans "Stale" %}
+ {% trans "Stale" %}
{% endif %}
{% endif %}
@@ -390,9 +390,9 @@
{{ item.expiry_date }}
{% if item.is_expired %}
- {% trans "Expired" %}
+ {% trans "Expired" %}
{% elif item.is_stale %}
- {% trans "Stale" %}
+ {% trans "Stale" %}
{% endif %}
|
diff --git a/InvenTree/templates/about.html b/InvenTree/templates/about.html
index 357ae5b0ba..04f3380ca2 100644
--- a/InvenTree/templates/about.html
+++ b/InvenTree/templates/about.html
@@ -24,12 +24,12 @@
{% inventree_version %}{% include "clip.html" %}
{% inventree_is_development as dev %}
{% if dev %}
-
{% trans "Development Version" %}
+
{% trans "Development Version" %}
{% else %}
{% if up_to_date %}
-
{% trans "Up to Date" %}
+
{% trans "Up to Date" %}
{% else %}
-
{% trans "Update Available" %}
+
{% trans "Update Available" %}
{% endif %}
{% endif %}
diff --git a/InvenTree/templates/js/dynamic/inventree.js b/InvenTree/templates/js/dynamic/inventree.js
index 054c957107..dcff1ec77f 100644
--- a/InvenTree/templates/js/dynamic/inventree.js
+++ b/InvenTree/templates/js/dynamic/inventree.js
@@ -169,12 +169,7 @@ function inventreeDocReady() {
html += '';
if (user_settings.SEARCH_SHOW_STOCK_LEVELS) {
- html += partStockLabel(
- item.data,
- {
- label_class: 'label-right',
- }
- );
+ html += partStockLabel(item.data);
}
html += '';
diff --git a/InvenTree/templates/js/translated/bom.js b/InvenTree/templates/js/translated/bom.js
index 89ae428bcd..d0737cce24 100644
--- a/InvenTree/templates/js/translated/bom.js
+++ b/InvenTree/templates/js/translated/bom.js
@@ -407,7 +407,7 @@ function loadBomTable(table, options) {
// Display an extra icon if this part is an assembly
if (sub_part.assembly) {
- var text = `
`;
+ var text = `
`;
html += renderLink(text, `/part/${row.sub_part}/bom/`);
}
@@ -470,7 +470,7 @@ function loadBomTable(table, options) {
var text = value;
if (value == null || value <= 0) {
- text = `
{% trans "No Stock" %}`;
+ text = `
{% trans "No Stock" %}`;
}
return renderLink(text, url);
diff --git a/InvenTree/templates/js/translated/company.js b/InvenTree/templates/js/translated/company.js
index 68b3079c3e..a14badc5f5 100644
--- a/InvenTree/templates/js/translated/company.js
+++ b/InvenTree/templates/js/translated/company.js
@@ -325,15 +325,15 @@ function loadCompanyTable(table, url, options={}) {
var html = imageHoverIcon(row.image) + renderLink(value, row.url);
if (row.is_customer) {
- html += `
`;
+ html += `
`;
}
if (row.is_manufacturer) {
- html += `
`;
+ html += `
`;
}
if (row.is_supplier) {
- html += `
`;
+ html += `
`;
}
return html;
@@ -493,15 +493,15 @@ function loadManufacturerPartTable(table, url, options) {
var html = imageHoverIcon(row.part_detail.thumbnail) + renderLink(value, url);
if (row.part_detail.is_template) {
- html += `
`;
+ html += `
`;
}
if (row.part_detail.assembly) {
- html += `
`;
+ html += `
`;
}
if (!row.part_detail.active) {
- html += `
{% trans "Inactive" %}`;
+ html += `
{% trans "Inactive" %}`;
}
return html;
@@ -750,15 +750,15 @@ function loadSupplierPartTable(table, url, options) {
var html = imageHoverIcon(row.part_detail.thumbnail) + renderLink(value, url);
if (row.part_detail.is_template) {
- html += `
`;
+ html += `
`;
}
if (row.part_detail.assembly) {
- html += `
`;
+ html += `
`;
}
if (!row.part_detail.active) {
- html += `
{% trans "Inactive" %}`;
+ html += `
{% trans "Inactive" %}`;
}
return html;
diff --git a/InvenTree/templates/js/translated/helpers.js b/InvenTree/templates/js/translated/helpers.js
index 9e1898eee8..208a0a41ed 100644
--- a/InvenTree/templates/js/translated/helpers.js
+++ b/InvenTree/templates/js/translated/helpers.js
@@ -16,9 +16,9 @@
function yesNoLabel(value) {
if (value) {
- return `
{% trans "YES" %}`;
+ return `
{% trans "YES" %}`;
} else {
- return `
{% trans "NO" %}`;
+ return `
{% trans "NO" %}`;
}
}
@@ -92,7 +92,7 @@ function select2Thumbnail(image) {
*/
function makeIconBadge(icon, title) {
- var html = `
`;
+ var html = `
`;
return html;
}
diff --git a/InvenTree/templates/js/translated/model_renderers.js b/InvenTree/templates/js/translated/model_renderers.js
index bf3628d656..a1602f42c4 100644
--- a/InvenTree/templates/js/translated/model_renderers.js
+++ b/InvenTree/templates/js/translated/model_renderers.js
@@ -94,7 +94,7 @@ function renderStockItem(name, data, parameters, options) {
if (data.serial && data.quantity == 1) {
stock_detail = `{% trans "Serial Number" %}: ${data.serial}`;
} else if (data.quantity == 0) {
- stock_detail = `
{% trans "No Stock"% }`;
+ stock_detail = `
{% trans "No Stock"% }`;
} else {
stock_detail = `{% trans "Quantity" %}: ${data.quantity}`;
}
@@ -172,7 +172,7 @@ function renderPart(name, data, parameters, options) {
}
if (!data.active) {
- extra += `
{% trans "Inactive" %}`;
+ extra += `
{% trans "Inactive" %}`;
}
html += `
diff --git a/InvenTree/templates/js/translated/part.js b/InvenTree/templates/js/translated/part.js
index eb8c5d7a84..4a1df9647a 100644
--- a/InvenTree/templates/js/translated/part.js
+++ b/InvenTree/templates/js/translated/part.js
@@ -410,14 +410,12 @@ function toggleStar(options) {
}
-function partStockLabel(part, options={}) {
-
- var label_class = options.label_class || 'label-form';
+function partStockLabel(part) {
if (part.in_stock) {
- return `
{% trans "Stock" %}: ${part.in_stock}`;
+ return `
{% trans "Stock" %}: ${part.in_stock}`;
} else {
- return `
{% trans "No Stock" %}`;
+ return `
{% trans "No Stock" %}`;
}
}
@@ -453,7 +451,7 @@ function makePartIcons(part) {
}
if (!part.active) {
- html += `
{% trans "Inactive" %}`;
+ html += `
{% trans "Inactive" %}`;
}
return html;
@@ -530,7 +528,7 @@ function loadPartVariantTable(table, partId, options={}) {
}
if (!row.active) {
- html += `
{% trans "Inactive" %}`;
+ html += `
{% trans "Inactive" %}`;
}
return html;
@@ -769,14 +767,10 @@ function partGridTile(part) {
// Rows for table view
var rows = '';
- if (part.IPN) {
- rows += `
{% trans "IPN" %} | ${part.IPN} |
`;
- }
-
var stock = `${part.in_stock}`;
if (!part.in_stock) {
- stock = `
{% trans "No Stock" %}`;
+ stock = `{% trans "No Stock" %}`;
}
rows += `{% trans "Stock" %} | ${stock} |
`;
@@ -949,20 +943,20 @@ function loadPartTable(table, url, options={}) {
// Is stock "low" (below the 'minimum_stock' quantity)?
if (row.minimum_stock && row.minimum_stock > value) {
- value += `{% trans "Low stock" %}`;
+ value += `{% trans "Low stock" %}`;
}
} else if (row.on_order) {
// There is no stock available, but stock is on order
- value = `0{% trans "On Order" %}: ${row.on_order}`;
+ value = `0{% trans "On Order" %}: ${row.on_order}`;
link = '?display=purchase-orders';
} else if (row.building) {
// There is no stock available, but stock is being built
- value = `0{% trans "Building" %}: ${row.building}`;
+ value = `0{% trans "Building" %}: ${row.building}`;
link = '?display=build-orders';
} else {
// There is no stock available
- value = `0{% trans "No Stock" %}`;
+ value = `0{% trans "No Stock" %}`;
}
return renderLink(value, `/part/${row.pk}/${link}`);
diff --git a/InvenTree/templates/js/translated/stock.js b/InvenTree/templates/js/translated/stock.js
index f021d1dc1f..a23ec654f2 100644
--- a/InvenTree/templates/js/translated/stock.js
+++ b/InvenTree/templates/js/translated/stock.js
@@ -450,17 +450,17 @@ function removeStockRow(e) {
}
-function passFailBadge(result, align='float-right') {
+function passFailBadge(result) {
if (result) {
- return `{% trans "PASS" %}`;
+ return `{% trans "PASS" %}`;
} else {
- return `{% trans "FAIL" %}`;
+ return `{% trans "FAIL" %}`;
}
}
-function noResultBadge(align='float-right') {
- return `{% trans "NO RESULT" %}`;
+function noResultBadge() {
+ return `{% trans "NO RESULT" %}`;
}
function formatDate(row) {
@@ -472,7 +472,7 @@ function formatDate(row) {
}
if (row.attachment) {
- html += ``;
+ html += ``;
}
return html;
@@ -878,7 +878,7 @@ function loadStockTable(table, options) {
}
if (row.quantity <= 0) {
- html += `{% trans "Depleted" %}`;
+ html += `{% trans "Depleted" %}`;
}
return html;
diff --git a/InvenTree/templates/stats.html b/InvenTree/templates/stats.html
index df42576923..cf3d225cd2 100644
--- a/InvenTree/templates/stats.html
+++ b/InvenTree/templates/stats.html
@@ -40,9 +40,9 @@
{% trans "Server status" %} |
{% if system_healthy %}
- {% trans "Healthy" %}
+ {% trans "Healthy" %}
{% else %}
- {% trans "Issues detected" %}
+ {% trans "Issues detected" %}
{% endif %}
|
@@ -52,7 +52,7 @@
{% trans "Background Worker" %} |
- {% trans "Background worker not running" %}
+ {% trans "Background worker not running" %}
|
@@ -63,7 +63,7 @@
{% trans "Email Settings" %} |
- {% trans "Email settings not configured" %}
+ {% trans "Email settings not configured" %}
|
diff --git a/InvenTree/templates/status_codes.html b/InvenTree/templates/status_codes.html
index 453a7914e2..fa448360b6 100644
--- a/InvenTree/templates/status_codes.html
+++ b/InvenTree/templates/status_codes.html
@@ -5,7 +5,7 @@ const {{ label }}Codes = {
{% for opt in options %}'{{ opt.key }}': {
key: '{{ opt.key }}',
value: '{{ opt.value }}',{% if opt.color %}
- label: 'label-{{ opt.color }}',{% endif %}
+ label: 'bg-{{ opt.color }}',{% endif %}
},
{% endfor %}
};
@@ -32,7 +32,7 @@ function {{ label }}StatusDisplay(key, options={}) {
label = '';
}
- var classes = `label ${label}`;
+ var classes = `badge rounded-pill ${label}`;
if (options.classes) {
classes += ' ' + options.classes;
diff --git a/InvenTree/templates/yesnolabel.html b/InvenTree/templates/yesnolabel.html
index 2117d42faa..480c08dfb3 100644
--- a/InvenTree/templates/yesnolabel.html
+++ b/InvenTree/templates/yesnolabel.html
@@ -1,7 +1,7 @@
{% load i18n %}
{% if value %}
-
{% trans 'Yes' %}
+
{% trans 'Yes' %}
{% else %}
-
{% trans 'No' %}
+
{% trans 'No' %}
{% endif %}
\ No newline at end of file