mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-22 23:46:44 -06:00
Linkify object attributes
This commit is contained in:
parent
cb499b7e74
commit
47ebc983f5
@ -1,5 +1,11 @@
|
||||
SEARCH_RESULT_ATTRS = """
|
||||
{% for name, value in record.display_attrs.items %}
|
||||
<span class="badge bg-secondary">{{ name|bettertitle }}: {{ value }}</span>
|
||||
{% with url=value.get_absolute_url %}
|
||||
<span class="badge bg-secondary">
|
||||
{% if url %}<a href="{{ url }}">{% endif %}
|
||||
{{ name|bettertitle }}: {{ value }}
|
||||
{% if url %}</a>{% endif %}
|
||||
</span>
|
||||
{% endwith %}
|
||||
{% endfor %}
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user