Procházet zdrojové kódy

Fixes #3424: Fix tag coloring for non-linked tags

Jeremy Stretch před 6 roky
rodič
revize
3df8ccb92f
2 změnil soubory, kde provedl 4 přidání a 5 odebrání
  1. 1 0
      CHANGELOG.md
  2. 3 5
      netbox/templates/utilities/templatetags/tag.html

+ 1 - 0
CHANGELOG.md

@@ -3,6 +3,7 @@ v2.6.3 (FUTURE)
 ## Bug Fixes
 ## Bug Fixes
 
 
 * [#3420](https://github.com/netbox-community/netbox/issues/3420) - Serial number filter for racks, devices, and inventory items is now case-insensitive
 * [#3420](https://github.com/netbox-community/netbox/issues/3420) - Serial number filter for racks, devices, and inventory items is now case-insensitive
+* [#3424](https://github.com/netbox-community/netbox/issues/3424) - Fix tag coloring for non-linked tags
 
 
 ## Enhancements
 ## Enhancements
 
 

+ 3 - 5
netbox/templates/utilities/templatetags/tag.html

@@ -1,7 +1,5 @@
 {% load helpers %}
 {% load helpers %}
 
 
-{% if url_name %}
-    <a href="{% url url_name %}?tag={{ tag.slug }}"><span class="label label-default" style="color: {{ tag.color|fgcolor }}; background-color: #{{ tag.color }}">{{ tag }}</span></a>
-{% else %}
-    <span class="label label-default">{{ tag }}</span>
-{% endif %}
+{% if url_name %}<a href="{% url url_name %}?tag={{ tag.slug }}">{% endif %}
+<span class="label label-default" style="color: {{ tag.color|fgcolor }}; background-color: #{{ tag.color }}">{{ tag }}</span>
+{% if url_name %}</a>{% endif %}