mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-19 13:35:40 +00:00
Add a per-user setting to enable display of stock in search results
This commit is contained in:
@ -16,6 +16,7 @@
|
||||
{% include "InvenTree/settings/header.html" %}
|
||||
<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_SHOW_STOCK_LEVELS" user_setting=True icon='fa-boxes' %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
@ -168,13 +168,15 @@ function inventreeDocReady() {
|
||||
|
||||
html += '</span>';
|
||||
|
||||
html += partStockLabel(
|
||||
item.data,
|
||||
{
|
||||
label_class: 'label-right',
|
||||
}
|
||||
);
|
||||
|
||||
if (user_settings.SEARCH_SHOW_STOCK_LEVELS) {
|
||||
html += partStockLabel(
|
||||
item.data,
|
||||
{
|
||||
label_class: 'label-right',
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
html += '</a>';
|
||||
|
||||
return $('<li>').append(html).appendTo(ul);
|
||||
|
Reference in New Issue
Block a user