1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Convert device power outlets list to table

This commit is contained in:
Jeremy Stretch
2020-10-16 15:16:36 -04:00
parent 3a47e0e2ed
commit eed2e4a15b
5 changed files with 44 additions and 119 deletions

View File

@ -127,3 +127,13 @@ POWERPORT_BUTTONS = """
</span>
{% endif %}
"""
POWEROUTLET_BUTTONS = """
{% if record.cable %}
{% include 'dcim/inc/cable_toggle_buttons.html' with cable=record.cable %}
{% elif perms.dcim.add_cable %}
<a href="{% url 'dcim:poweroutlet_connect' termination_a_id=record.pk termination_b_type='power-port' %}?return_url={{ device.get_absolute_url }}" title="Connect" class="btn btn-success btn-xs">
<i class="glyphicon glyphicon-resize-small" aria-hidden="true"></i>
</a>
{% endif %}
"""