1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Badges use secondary BG by default; add custom option

This commit is contained in:
jeremystretch
2021-08-06 15:41:26 -04:00
parent 939bcfec4b
commit 65659fb676
3 changed files with 4 additions and 3 deletions

View File

@@ -34,7 +34,7 @@
<li class="nav-item" role="presentation">
<button class="nav-link" id="filters-form-tab" data-bs-toggle="tab" data-bs-target="#filters-form" type="button" role="tab" aria-controls="object-list" aria-selected="false">
Filters
{% if filter_form %}{% badge filter_form.changed_data|length %}{% endif %}
{% if filter_form %}{% badge filter_form.changed_data|length bg_class="primary" %}{% endif %}
</button>
</li>
{% endif %}

View File

@@ -1 +1 @@
{% if value or show_empty %}<span class="badge bg-primary">{{ value }}</span>{% endif %}
{% if value or show_empty %}<span class="badge bg-{{ bg_class }}">{{ value }}</span>{% endif %}