diff --git a/netbox/templates/generic/object_list.html b/netbox/templates/generic/object_list.html index 0d61e58b7..a89c5a960 100644 --- a/netbox/templates/generic/object_list.html +++ b/netbox/templates/generic/object_list.html @@ -81,19 +81,7 @@ Context: {% if table.paginator.num_pages > 1 %}
-
-
- {% if 'bulk_edit' in actions %} - - {% bulk_edit_button model query_params=request.GET %} - - {% endif %} - {% if 'bulk_delete' in actions %} - - {% bulk_delete_button model query_params=request.GET %} - - {% endif %} -
+
+
+ {% if 'bulk_edit' in actions %} + {% bulk_edit_button model query_params=request.GET %} + {% endif %} + {% if 'bulk_delete' in actions %} + {% bulk_delete_button model query_params=request.GET %} + {% endif %} +
@@ -127,12 +123,14 @@ Context: {# Form buttons #}
{% block bulk_buttons %} - {% if 'bulk_edit' in actions %} - {% bulk_edit_button model query_params=request.GET %} - {% endif %} - {% if 'bulk_delete' in actions %} - {% bulk_delete_button model query_params=request.GET %} - {% endif %} +
+ {% if 'bulk_edit' in actions %} + {% bulk_edit_button model query_params=request.GET %} + {% endif %} + {% if 'bulk_delete' in actions %} + {% bulk_delete_button model query_params=request.GET %} + {% endif %} +
{% endblock %}
{# /Form buttons #} diff --git a/netbox/templates/htmx/table.html b/netbox/templates/htmx/table.html index ae480a1cf..5728789fa 100644 --- a/netbox/templates/htmx/table.html +++ b/netbox/templates/htmx/table.html @@ -15,16 +15,19 @@ {% endwith %}
-{# Include the updated object count for display elsewhere on the page #} -
{{ table.rows|length }}
-{% if 'bulk_edit' in actions %} -
- {% bulk_edit_button model query_params=request.GET %} -
-{% endif %} -{% if 'bulk_delete' in actions %} -
- {% bulk_delete_button model query_params=request.GET %} -
-{% endif %} +{% if request.htmx %} + {# Include the updated object count for display elsewhere on the page #} +
{{ table.rows|length }}
+ {# Update the bulk action buttons with new query parameters #} + {% if actions %} +
+ {% if 'bulk_edit' in actions %} + {% bulk_edit_button model query_params=request.GET %} + {% endif %} + {% if 'bulk_delete' in actions %} + {% bulk_delete_button model query_params=request.GET %} + {% endif %} +
+ {% endif %} +{% endif %}