From ac2343f130133de0f86ede8ae0b19131ddf617ec Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Tue, 9 Jan 2024 16:25:16 -0500 Subject: [PATCH] Fix styling of filter group headings --- netbox/templates/generic/object_list.html | 20 ++++++++++++-------- netbox/templates/inc/filter_list.html | 19 ++++++++++--------- 2 files changed, 22 insertions(+), 17 deletions(-) diff --git a/netbox/templates/generic/object_list.html b/netbox/templates/generic/object_list.html index 1195f6d99..e492fefc6 100644 --- a/netbox/templates/generic/object_list.html +++ b/netbox/templates/generic/object_list.html @@ -59,7 +59,7 @@ Context: {% block content %} - {# Object list #} + {# Object list tab #}
{# Applied filters #} @@ -102,17 +102,18 @@ Context: {% csrf_token %} - {# Object table #} - - {% if prerequisite_model %} - {% include 'inc/missing_prerequisites.html' %} - {% endif %} + {# Warn of any missing prerequisite objects #} + {% if prerequisite_model %} + {% include 'inc/missing_prerequisites.html' %} + {% endif %} + {# Objects table #}
{% include 'htmx/table.html' %}
+ {# /Objects table #} {# Form buttons #}
@@ -125,17 +126,20 @@ Context: {% endif %} {% endblock %}
+ {# /Form buttons #} +
- + {# /Object list tab #} - {# Filter form #} + {# Filters tab #} {% if filter_form %}
{% include 'inc/filter_list.html' %}
{% endif %} + {# /Filters tab #} {% endblock content %} diff --git a/netbox/templates/inc/filter_list.html b/netbox/templates/inc/filter_list.html index 2a1676960..5a7a94dab 100644 --- a/netbox/templates/inc/filter_list.html +++ b/netbox/templates/inc/filter_list.html @@ -12,7 +12,9 @@ {% for heading, fields in filter_form.fieldsets %}
{% if heading %} -
{{ heading }}
+
+ {{ heading }} +
{% endif %} {% for name in fields %} {% with field=filter_form|get_item:name %} @@ -20,9 +22,6 @@ {% endwith %} {% endfor %}
- {% if not forloop.last %} -
- {% endif %} {% empty %} {# List all non-customfield filters as declared in the form class #} {% for field in filter_form.visible_fields %} @@ -35,14 +34,16 @@ {% endfor %} {% if filter_form.custom_fields %} {# List all custom field filters #} -
- {% for name in filter_form.custom_fields %} -
+
+
+ {% trans "Custom Fields" %} +
+ {% for name in filter_form.custom_fields %} {% with field=filter_form|get_item:name %} {% render_field field %} {% endwith %} -
- {% endfor %} + {% endfor %} +
{% endif %}