mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-21 06:16:29 +00:00
Add function makeIconBadge for tables
- Add filters for part variants table
This commit is contained in:
@ -461,8 +461,8 @@ class PartList(generics.ListCreateAPIView):
|
||||
else:
|
||||
queryset = queryset.exclude(pk__in=starred_parts)
|
||||
|
||||
# Cascade?
|
||||
cascade = str2bool(params.get('cascade', None))
|
||||
# Cascade? (Default = True)
|
||||
cascade = str2bool(params.get('cascade', True))
|
||||
|
||||
# Does the user wish to filter by category?
|
||||
cat_id = params.get('category', None)
|
||||
|
@ -16,10 +16,17 @@
|
||||
<hr>
|
||||
|
||||
<div id='button-toolbar'>
|
||||
<div class='btn-group'>
|
||||
{% if part.is_template and part.active %}
|
||||
<button class='btn btn-success' id='new-variant' title='{% trans "Create new variant" %}'>{% trans "New Variant" %}</button>
|
||||
{% endif %}
|
||||
<div class='button-toolbar container-fluid'>
|
||||
<div class='btn-group' role='group'>
|
||||
{% if part.is_template and part.active %}
|
||||
<button class='btn btn-success' id='new-variant' title='{% trans "Create new variant" %}'>
|
||||
<span class='fas fa-plus-circle'></span> {% trans "New Variant" %}
|
||||
</button>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class='filter-list' id='filter-list-variants'>
|
||||
<!-- Empty div (will be filled out with available BOM filters) -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -2098,7 +2098,7 @@ class BomItemCreate(AjaxCreateView):
|
||||
model = BomItem
|
||||
form_class = part_forms.EditBomItemForm
|
||||
ajax_template_name = 'modal_form.html'
|
||||
ajax_form_title = _('Create BOM item')
|
||||
ajax_form_title = _('Create BOM Item')
|
||||
|
||||
role_required = 'part.add'
|
||||
|
||||
|
Reference in New Issue
Block a user