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:
1
netbox/utilities/templates/builtins/badge.html
Normal file
1
netbox/utilities/templates/builtins/badge.html
Normal file
@@ -0,0 +1 @@
|
||||
{% if value or show_empty %}<span class="badge bg-{{ bg_class }}">{{ value }}</span>{% endif %}
|
||||
5
netbox/utilities/templates/builtins/checkmark.html
Normal file
5
netbox/utilities/templates/builtins/checkmark.html
Normal 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 %}
|
||||
3
netbox/utilities/templates/builtins/tag.html
Normal file
3
netbox/utilities/templates/builtins/tag.html
Normal 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 %}
|
||||
Reference in New Issue
Block a user