Restore shopping cart icon in BO/Allocate Parts (#4780)

The shopping cart icon for parts already on order was originally
implemented in 1b421fb59a but got broken in 27aa16d55d as the return
value of `makeIconBadge` is discarded.

Additionally, the FontAwesome JS renderer doesn't seem to like
non-empty content for this, so even when adding it back to `icons`,
it didn't get rendered properly. Instead, the count has to be added
to the title.
This commit is contained in:
Jakob Haufe 2023-05-07 14:47:10 +02:00 committed by GitHub
parent 404113d739
commit 89dfb6186f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1984,9 +1984,7 @@ function loadBuildOutputAllocationTable(buildInfo, output, options={}) {
}
if (row.on_order && row.on_order > 0) {
makeIconBadge('fa-shopping-cart', '{% trans "On Order" %}', {
content: row.on_order,
});
icons += makeIconBadge('fa-shopping-cart', '{% trans "On Order" %}: ' + row.on_order);
}
return renderLink(text, url) + icons;