mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-23 04:22:01 -06:00
Clean up conditional logic
This commit is contained in:
parent
14db298468
commit
285d140a1c
@ -117,14 +117,12 @@
|
|||||||
{% include 'dcim/inc/connection_endpoints.html' with trace_url='dcim:powerfeed_trace' %}
|
{% include 'dcim/inc/connection_endpoints.html' with trace_url='dcim:powerfeed_trace' %}
|
||||||
{% else %}
|
{% else %}
|
||||||
<div class="card-body text-muted">
|
<div class="card-body text-muted">
|
||||||
{% trans "Not connected" %}
|
{% trans "Not connected" %}
|
||||||
{% endif %}
|
{% if perms.dcim.add_cable %}
|
||||||
{% if not object.mark_connected and not object.cable %}
|
<a href="{% url 'dcim:cable_add' %}?a_terminations_type=dcim.powerfeed&a_terminations={{ object.pk }}&b_terminations_type=dcim.powerport&return_url={{ object.get_absolute_url }}" class="btn btn-primary float-end">
|
||||||
{% if perms.dcim.add_cable %}
|
<i class="mdi mdi-ethernet-cable" aria-hidden="true"></i> {% trans "Connect" %}
|
||||||
<a href="{% url 'dcim:cable_add' %}?a_terminations_type=dcim.powerfeed&a_terminations={{ object.pk }}&b_terminations_type=dcim.powerport&return_url={{ object.get_absolute_url }}" class="btn btn-primary float-end">
|
</a>
|
||||||
<i class="mdi mdi-ethernet-cable" aria-hidden="true"></i> {% trans "Connect" %}
|
{% endif %}
|
||||||
</a>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user