mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-14 01:41:22 -06:00
Fixes #10996: Hide checkboxes on child object lists when no bulk operations are available
This commit is contained in:
parent
4623858849
commit
dc1da0a738
@ -19,6 +19,7 @@
|
|||||||
* [#10936](https://github.com/netbox-community/netbox/issues/10936) - Permit demotion of device/VM primary IP via IP address edit form
|
* [#10936](https://github.com/netbox-community/netbox/issues/10936) - Permit demotion of device/VM primary IP via IP address edit form
|
||||||
* [#10938](https://github.com/netbox-community/netbox/issues/10938) - `render_field` template tag should respect `label` kwarg
|
* [#10938](https://github.com/netbox-community/netbox/issues/10938) - `render_field` template tag should respect `label` kwarg
|
||||||
* [#10969](https://github.com/netbox-community/netbox/issues/10969) - Update cable paths ending at associated rear port when creating new front ports
|
* [#10969](https://github.com/netbox-community/netbox/issues/10969) - Update cable paths ending at associated rear port when creating new front ports
|
||||||
|
* [#10996](https://github.com/netbox-community/netbox/issues/10996) - Hide checkboxes on child object lists when no bulk operations are available
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
@ -125,9 +125,10 @@ class ObjectChildrenView(ObjectView, ActionsMixin, TableMixin):
|
|||||||
|
|
||||||
# Determine the available actions
|
# Determine the available actions
|
||||||
actions = self.get_permitted_actions(request.user, model=self.child_model)
|
actions = self.get_permitted_actions(request.user, model=self.child_model)
|
||||||
|
has_bulk_actions = any([a.startswith('bulk_') for a in actions])
|
||||||
|
|
||||||
table_data = self.prep_table_data(request, child_objects, instance)
|
table_data = self.prep_table_data(request, child_objects, instance)
|
||||||
table = self.get_table(table_data, request, bool(actions))
|
table = self.get_table(table_data, request, has_bulk_actions)
|
||||||
|
|
||||||
# If this is an HTMX request, return only the rendered table HTML
|
# If this is an HTMX request, return only the rendered table HTML
|
||||||
if is_htmx(request):
|
if is_htmx(request):
|
||||||
|
Loading…
Reference in New Issue
Block a user