mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-21 11:37:21 -06:00
Hide color block if cable color is not defined
This commit is contained in:
parent
7cb618df5e
commit
1c54d7ed55
@ -32,7 +32,9 @@
|
|||||||
<p><span class="label label-{% if cable.status %}success{% else %}info{% endif %}">{{ cable.get_status_display }}</span></p>
|
<p><span class="label label-{% if cable.status %}success{% else %}info{% endif %}">{{ cable.get_status_display }}</span></p>
|
||||||
<p>{{ cable.get_type_display|default:"" }}</p>
|
<p>{{ cable.get_type_display|default:"" }}</p>
|
||||||
{% if cable.length %}{{ cable.length }} {{ cable.get_length_unit_display }}{% endif %}
|
{% if cable.length %}{{ cable.length }} {{ cable.get_length_unit_display }}{% endif %}
|
||||||
|
{% if cable.color %}
|
||||||
<span class="label color-block center-block" style="background-color: #{{ cable.color }}"> </span>
|
<span class="label color-block center-block" style="background-color: #{{ cable.color }}"> </span>
|
||||||
|
{% endif %}
|
||||||
{% else %}
|
{% else %}
|
||||||
<h4 class="text-muted">No Cable</h4>
|
<h4 class="text-muted">No Cable</h4>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
Loading…
Reference in New Issue
Block a user