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

Closes #8600: Document built-in template tags & filters

This commit is contained in:
jeremystretch
2022-02-09 16:01:58 -05:00
parent ee566723d7
commit 7c105019d8
25 changed files with 289 additions and 189 deletions

View File

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

View File

@@ -0,0 +1,5 @@
{% if value %}
<i class="mdi mdi-check-bold text-success" title="{{ true_label }}"></i>
{% elif show_false %}
<i class="mdi mdi-close-thick text-danger" title="{{ false_label }}"></i>
{% endif %}

View File

@@ -0,0 +1,3 @@
{% load helpers %}
{% if viewname %}<a href="{% url viewname %}?tag={{ tag.slug }}">{% endif %}<span class="badge" style="color: {{ tag.color|fgcolor }}; background-color: #{{ tag.color }}">{{ tag }}</span>{% if viewname %}</a>{% endif %}