1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00
This commit is contained in:
jeremystretch
2022-07-07 12:48:44 -04:00
parent 1beb8522b9
commit 9a7f3f8c1a
17 changed files with 169 additions and 170 deletions

View File

@ -13,21 +13,17 @@ CABLE_LENGTH = """
{% if record.length %}{{ record.length|simplify_decimal }} {{ record.length_unit }}{% endif %}
"""
CABLE_TERMINATION = """
{{ value|join:", " }}
"""
CABLE_TERMINATION_PARENT = """
{% with value.0 as termination %}
{% if termination.device %}
<a href="{{ termination.device.get_absolute_url }}">{{ termination.device }}</a>
{% elif termination.circuit %}
<a href="{{ termination.circuit.get_absolute_url }}">{{ termination.circuit }}</a>
{% elif termination.power_panel %}
<a href="{{ termination.power_panel.get_absolute_url }}">{{ termination.power_panel }}</a>
{% endif %}
{% endwith %}
"""
# CABLE_TERMINATION_PARENT = """
# {% with value.0 as termination %}
# {% if termination.device %}
# <a href="{{ termination.device.get_absolute_url }}">{{ termination.device }}</a>
# {% elif termination.circuit %}
# <a href="{{ termination.circuit.get_absolute_url }}">{{ termination.circuit }}</a>
# {% elif termination.power_panel %}
# <a href="{{ termination.power_panel.get_absolute_url }}">{{ termination.power_panel }}</a>
# {% endif %}
# {% endwith %}
# """
DEVICE_LINK = """
<a href="{% url 'dcim:device' pk=record.pk %}">