mirror of
https://github.com/inventree/InvenTree.git
synced 2025-05-01 21:16:46 +00:00
(cherry picked from commit bf8a59c6046575f74b74502a16ff3ad2ef0c8ac0)
This commit is contained in:
parent
40c74c7563
commit
67e0a99012
@ -1758,13 +1758,11 @@ function loadPartTable(table, url, options={}) {
|
|||||||
field: 'category_detail',
|
field: 'category_detail',
|
||||||
title: '{% trans "Category" %}',
|
title: '{% trans "Category" %}',
|
||||||
formatter: function(value, row) {
|
formatter: function(value, row) {
|
||||||
|
if (row.category && row.category_detail) {
|
||||||
var text = shortenString(row.category_detail.pathstring);
|
var text = shortenString(row.category_detail.pathstring);
|
||||||
|
|
||||||
if (row.category) {
|
|
||||||
return withTitle(renderLink(text, `/part/category/${row.category}/`), row.category_detail.pathstring);
|
return withTitle(renderLink(text, `/part/category/${row.category}/`), row.category_detail.pathstring);
|
||||||
} else {
|
} else {
|
||||||
return '{% trans "No category" %}';
|
return '<em>{% trans "No category" %}</em>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user