Closes #4996: Add "connect" buttons to individual device component views

This commit is contained in:
Jeremy Stretch
2020-08-13 11:14:33 -04:00
parent bdc4189812
commit a08418bff8
8 changed files with 82 additions and 0 deletions

View File

@@ -97,6 +97,11 @@
{% else %}
<div class="panel-body text-muted">
Not connected
{% if perms.dcim.add_cable %}
<a href="{% url 'dcim:poweroutlet_connect' termination_a_id=instance.pk termination_b_type='power-port' %}?return_url={{ instance.get_absolute_url }}" title="Connect" class="btn btn-primary btn-sm pull-right">
<i class="glyphicon glyphicon-resize-small" aria-hidden="true"></i> Connect
</a>
{% endif %}
</div>
{% endif %}
</div>