Fix parent device position display

This commit is contained in:
Jeremy Stretch 2017-03-13 11:25:06 -04:00
parent f661c233be
commit cd97b2fb96

View File

@ -43,8 +43,10 @@
<td>
{% if device.parent_bay %}
{% with device.parent_bay.device as parent %}
<span>U{{ parent.position }} / {{ parent.get_face_display }}
(<a href="{{ parent.get_absolute_url }}">{{ parent }}</a> - {{ device.parent_bay.name }})</span>
<a href="{{ parent.get_absolute_url }}">{{ parent }}</a> <i class="fa fa-angle-right"></i> {{ device.parent_bay.name }}
{% if parent.position %}
(U{{ parent.position }} / {{ parent.get_face_display }})
{% endif %}
{% endwith %}
{% elif device.rack and device.position %}
<span>U{{ device.position }} / {{ device.get_face_display }}</span>