mirror of
https://github.com/netbox-community/netbox.git
synced 2026-01-23 20:12:42 -06:00
Refactor render() on Attr to split out context and reduce boilerplate
This commit is contained in:
@@ -1 +1 @@
|
||||
<span class="badge color-label" style="background-color: #{{ color }}"> </span>
|
||||
<span class="badge color-label" style="background-color: #{{ value }}"> </span>
|
||||
|
||||
@@ -5,10 +5,10 @@
|
||||
{% if linkify %}{{ group|linkify }}{% else %}{{ group }}{% endif %}
|
||||
</li>
|
||||
<li class="breadcrumb-item">
|
||||
{% if linkify %}{{ object|linkify }}{% else %}{{ object }}{% endif %}
|
||||
{% if linkify %}{{ value|linkify }}{% else %}{{ value }}{% endif %}
|
||||
</li>
|
||||
</ol>
|
||||
{% else %}
|
||||
{# Display only the object #}
|
||||
{% if linkify %}{{ object|linkify }}{% else %}{{ object }}{% endif %}
|
||||
{% if linkify %}{{ value|linkify }}{% else %}{{ value }}{% endif %}
|
||||
{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user