Fixes #19617: Inconsistent styling of Connect buttons

This commit is contained in:
aq5747 2025-06-07 11:23:42 -04:00
parent 2680f855ff
commit 14db298468
4 changed files with 9 additions and 11 deletions

View File

@ -45,7 +45,7 @@
</div> </div>
{% elif perms.dcim.add_cable %} {% elif perms.dcim.add_cable %}
<div class="dropdown"> <div class="dropdown">
<button type="button" class="btn btn-success dropdown-toggle" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> <button type="button" class="btn btn-primary dropdown-toggle" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<span class="mdi mdi-ethernet-cable" aria-hidden="true"></span> {% trans "Connect" %} <span class="mdi mdi-ethernet-cable" aria-hidden="true"></span> {% trans "Connect" %}
</button> </button>
<ul class="dropdown-menu"> <ul class="dropdown-menu">

View File

@ -65,7 +65,7 @@
{% trans "Not Connected" %} {% trans "Not Connected" %}
{% if perms.dcim.add_cable %} {% if perms.dcim.add_cable %}
<div class="dropdown float-end"> <div class="dropdown float-end">
<button type="button" class="btn btn-primary btn-sm dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false"> <button type="button" class="btn btn-primary dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">
<span class="mdi mdi-ethernet-cable" aria-hidden="true"></span> {% trans "Connect" %} <span class="mdi mdi-ethernet-cable" aria-hidden="true"></span> {% trans "Connect" %}
</button> </button>
<ul class="dropdown-menu dropdown-menu-end"> <ul class="dropdown-menu dropdown-menu-end">

View File

@ -65,7 +65,7 @@
{% trans "Not Connected" %} {% trans "Not Connected" %}
{% if perms.dcim.add_cable %} {% if perms.dcim.add_cable %}
<div class="dropdown float-end"> <div class="dropdown float-end">
<button type="button" class="btn btn-primary btn-sm dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false"> <button type="button" class="btn btn-primary dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">
<span class="mdi mdi-ethernet-cable" aria-hidden="true"></span> {% trans "Connect" %} <span class="mdi mdi-ethernet-cable" aria-hidden="true"></span> {% trans "Connect" %}
</button> </button>
<ul class="dropdown-menu dropdown-menu-end"> <ul class="dropdown-menu dropdown-menu-end">

View File

@ -117,16 +117,14 @@
{% 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" %}
</div>
{% endif %} {% endif %}
{% if not object.mark_connected and not object.cable %} {% if not object.mark_connected and not object.cable %}
<div class="card-footer"> {% if perms.dcim.add_cable %}
{% if perms.dcim.add_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">
<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"> <i class="mdi mdi-ethernet-cable" aria-hidden="true"></i> {% trans "Connect" %}
<i class="mdi mdi-ethernet-cable" aria-hidden="true"></i> {% trans "Connect" %} </a>
</a> {% endif %}
{% endif %}
</div> </div>
{% endif %} {% endif %}
</div> </div>