mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-10 09:38:15 -06:00
16232 only remove checkbox on embedded tables
This commit is contained in:
parent
6c51b89502
commit
63b2c02da6
@ -112,6 +112,13 @@ class ObjectListView(BaseMultiObjectView, ActionsMixin, TableMixin):
|
|||||||
query_params.pop('export')
|
query_params.pop('export')
|
||||||
return redirect(f'{request.path}?{query_params.urlencode()}')
|
return redirect(f'{request.path}?{query_params.urlencode()}')
|
||||||
|
|
||||||
|
def _is_embedded_path(self, request):
|
||||||
|
if 'return_url' in request.GET:
|
||||||
|
if request.GET['return_url'] != request.path:
|
||||||
|
return True
|
||||||
|
|
||||||
|
return False
|
||||||
|
|
||||||
#
|
#
|
||||||
# Request handlers
|
# Request handlers
|
||||||
#
|
#
|
||||||
@ -163,7 +170,7 @@ class ObjectListView(BaseMultiObjectView, ActionsMixin, TableMixin):
|
|||||||
|
|
||||||
# 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 htmx_partial(request):
|
if htmx_partial(request):
|
||||||
if not request.htmx.target:
|
if not request.htmx.target and self._is_embedded_path(request):
|
||||||
table.embedded = True
|
table.embedded = True
|
||||||
# Hide selection checkboxes
|
# Hide selection checkboxes
|
||||||
if 'pk' in table.base_columns:
|
if 'pk' in table.base_columns:
|
||||||
|
Loading…
Reference in New Issue
Block a user