mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-28 10:16:10 -06:00
Fixes #20030: Fix height of object list action buttons & others (#20036)
Some checks are pending
CI / build (20.x, 3.10) (push) Waiting to run
CI / build (20.x, 3.11) (push) Waiting to run
CI / build (20.x, 3.12) (push) Waiting to run
CodeQL / Analyze (${{ matrix.language }}) (none, actions) (push) Waiting to run
CodeQL / Analyze (${{ matrix.language }}) (none, javascript-typescript) (push) Waiting to run
CodeQL / Analyze (${{ matrix.language }}) (none, python) (push) Waiting to run
Some checks are pending
CI / build (20.x, 3.10) (push) Waiting to run
CI / build (20.x, 3.11) (push) Waiting to run
CI / build (20.x, 3.12) (push) Waiting to run
CodeQL / Analyze (${{ matrix.language }}) (none, actions) (push) Waiting to run
CodeQL / Analyze (${{ matrix.language }}) (none, javascript-typescript) (push) Waiting to run
CodeQL / Analyze (${{ matrix.language }}) (none, python) (push) Waiting to run
This commit is contained in:
parent
fce10c73b7
commit
e828ca5cb4
@ -237,7 +237,11 @@ class ActionsColumn(tables.Column):
|
|||||||
:param split_actions: When True, converts the actions dropdown menu into a split button with first action as the
|
:param split_actions: When True, converts the actions dropdown menu into a split button with first action as the
|
||||||
direct button link and icon (default: True)
|
direct button link and icon (default: True)
|
||||||
"""
|
"""
|
||||||
attrs = {'td': {'class': 'text-end text-nowrap noprint'}}
|
attrs = {
|
||||||
|
'td': {
|
||||||
|
'class': 'text-end text-nowrap noprint p-1'
|
||||||
|
}
|
||||||
|
}
|
||||||
empty_values = ()
|
empty_values = ()
|
||||||
actions = {
|
actions = {
|
||||||
'edit': ActionsItem('Edit', 'pencil', 'change', 'warning'),
|
'edit': ActionsItem('Edit', 'pencil', 'change', 'warning'),
|
||||||
|
@ -4,22 +4,22 @@
|
|||||||
<div class="card">
|
<div class="card">
|
||||||
<h2 class="card-header d-flex justify-content-between">
|
<h2 class="card-header d-flex justify-content-between">
|
||||||
{% blocktrans %}Termination{% endblocktrans %} {{ side }}
|
{% blocktrans %}Termination{% endblocktrans %} {{ side }}
|
||||||
<div>
|
<div class="card-actions">
|
||||||
{% if not termination and perms.circuits.add_circuittermination %}
|
{% if not termination and perms.circuits.add_circuittermination %}
|
||||||
<a href="{% url 'circuits:circuittermination_add' %}?circuit={{ object.pk }}&term_side={{ side }}&return_url={{ object.get_absolute_url }}" class="btn btn-success lh-1">
|
<a href="{% url 'circuits:circuittermination_add' %}?circuit={{ object.pk }}&term_side={{ side }}&return_url={{ object.get_absolute_url }}" class="btn btn-sm btn-ghost-primary">
|
||||||
<span class="mdi mdi-plus-thick" aria-hidden="true"></span> {% trans "Add" %}
|
<span class="mdi mdi-plus-thick" aria-hidden="true"></span> {% trans "Add" %}
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if termination and perms.circuits.change_circuittermination %}
|
{% if termination and perms.circuits.change_circuittermination %}
|
||||||
<a href="{% url 'circuits:circuittermination_edit' pk=termination.pk %}?return_url={{ object.get_absolute_url }}" class="btn btn-warning lh-1">
|
<a href="{% url 'circuits:circuittermination_edit' pk=termination.pk %}?return_url={{ object.get_absolute_url }}" class="btn btn-sm btn-ghost-warning">
|
||||||
<span class="mdi mdi-pencil" aria-hidden="true"></span> {% trans "Edit" %}
|
<span class="mdi mdi-pencil" aria-hidden="true"></span> {% trans "Edit" %}
|
||||||
</a>
|
</a>
|
||||||
<a href="{% url 'circuits:circuit_terminations_swap' pk=object.pk %}?return_url={{ object.get_absolute_url }}" class="btn btn-primary lh-1">
|
<a href="{% url 'circuits:circuit_terminations_swap' pk=object.pk %}?return_url={{ object.get_absolute_url }}" class="btn btn-sm btn-ghost-primary">
|
||||||
<span class="mdi mdi-swap-vertical" aria-hidden="true"></span> {% trans "Swap" %}
|
<span class="mdi mdi-swap-vertical" aria-hidden="true"></span> {% trans "Swap" %}
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if termination and perms.circuits.delete_circuittermination %}
|
{% if termination and perms.circuits.delete_circuittermination %}
|
||||||
<a href="{% url 'circuits:circuittermination_delete' pk=termination.pk %}?return_url={{ object.get_absolute_url }}" class="btn btn-danger lh-1">
|
<a href="{% url 'circuits:circuittermination_delete' pk=termination.pk %}?return_url={{ object.get_absolute_url }}" class="btn btn-sm btn-ghost-danger">
|
||||||
<span class="mdi mdi-trash-can-outline" aria-hidden="true"></span> {% trans "Delete" %}
|
<span class="mdi mdi-trash-can-outline" aria-hidden="true"></span> {% trans "Delete" %}
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -29,16 +29,16 @@
|
|||||||
{{ peer|linkify }}{% if not forloop.last %},{% endif %}
|
{{ peer|linkify }}{% if not forloop.last %},{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
<div class="mt-1">
|
<div class="mt-1">
|
||||||
<a href="{% url 'circuits:circuittermination_trace' pk=termination.pk %}" class="btn btn-primary lh-1" title="{% trans "Trace" %}">
|
<a href="{% url 'circuits:circuittermination_trace' pk=termination.pk %}" class="btn btn-sm btn-primary" title="{% trans "Trace" %}">
|
||||||
<i class="mdi mdi-transit-connection-variant" aria-hidden="true"></i> {% trans "Trace" %}
|
<i class="mdi mdi-transit-connection-variant" aria-hidden="true"></i> {% trans "Trace" %}
|
||||||
</a>
|
</a>
|
||||||
{% if perms.dcim.change_cable %}
|
{% if perms.dcim.change_cable %}
|
||||||
<a href="{% url 'dcim:cable_edit' pk=termination.cable.pk %}?return_url={{ termination.circuit.get_absolute_url }}" title="{% trans "Edit cable" %}" class="btn btn-warning lh-1">
|
<a href="{% url 'dcim:cable_edit' pk=termination.cable.pk %}?return_url={{ termination.circuit.get_absolute_url }}" title="{% trans "Edit cable" %}" class="btn btn-sm btn-warning">
|
||||||
<i class="mdi mdi-ethernet-cable" aria-hidden="true"></i> {% trans "Edit" %}
|
<i class="mdi mdi-ethernet-cable" aria-hidden="true"></i> {% trans "Edit" %}
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if perms.dcim.delete_cable %}
|
{% if perms.dcim.delete_cable %}
|
||||||
<a href="{% url 'dcim:cable_delete' pk=termination.cable.pk %}?return_url={{ termination.circuit.get_absolute_url }}" title="{% trans "Remove cable" %}" class="btn btn-danger lh-1">
|
<a href="{% url 'dcim:cable_delete' pk=termination.cable.pk %}?return_url={{ termination.circuit.get_absolute_url }}" title="{% trans "Remove cable" %}" class="btn btn-sm btn-danger">
|
||||||
<i class="mdi mdi-ethernet-cable-off" aria-hidden="true"></i> {% trans "Disconnect" %}
|
<i class="mdi mdi-ethernet-cable-off" aria-hidden="true"></i> {% trans "Disconnect" %}
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -77,7 +77,7 @@
|
|||||||
<th scope="row">{% trans "Cable" %}</th>
|
<th scope="row">{% trans "Cable" %}</th>
|
||||||
<td>
|
<td>
|
||||||
{{ object.cable|linkify }}
|
{{ object.cable|linkify }}
|
||||||
<a href="{% url 'dcim:frontport_trace' pk=object.pk %}" class="btn btn-primary lh-1" title="{% trans "Trace" %}">
|
<a href="{% url 'dcim:frontport_trace' pk=object.pk %}" class="btn btn-sm btn-primary" title="{% trans "Trace" %}">
|
||||||
<i class="mdi mdi-transit-connection-variant" aria-hidden="true"></i>
|
<i class="mdi mdi-transit-connection-variant" aria-hidden="true"></i>
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
<i class="mdi mdi-chevron-right" aria-hidden="true"></i>
|
<i class="mdi mdi-chevron-right" aria-hidden="true"></i>
|
||||||
{{ term|linkify }}
|
{{ term|linkify }}
|
||||||
{% with trace_url=term|viewname:"trace" %}
|
{% with trace_url=term|viewname:"trace" %}
|
||||||
<a href="{% url trace_url pk=term.pk %}" class="btn btn-primary lh-1" title="{% trans "Trace" %}">
|
<a href="{% url trace_url pk=term.pk %}" class="btn btn-sm btn-primary" title="{% trans "Trace" %}">
|
||||||
<i class="mdi mdi-transit-connection-variant" aria-hidden="true"></i>
|
<i class="mdi mdi-transit-connection-variant" aria-hidden="true"></i>
|
||||||
</a>
|
</a>
|
||||||
{% endwith %}
|
{% endwith %}
|
||||||
@ -48,7 +48,7 @@
|
|||||||
{% for term in terminations %}
|
{% for term in terminations %}
|
||||||
{{ term|linkify }}
|
{{ term|linkify }}
|
||||||
{% with trace_url=term|viewname:"trace" %}
|
{% with trace_url=term|viewname:"trace" %}
|
||||||
<a href="{% url trace_url pk=term.pk %}" class="btn btn-primary lh-1" title="{% trans "Trace" %}">
|
<a href="{% url trace_url pk=term.pk %}" class="btn btn-sm btn-primary" title="{% trans "Trace" %}">
|
||||||
<i class="mdi mdi-transit-connection-variant" aria-hidden="true"></i>
|
<i class="mdi mdi-transit-connection-variant" aria-hidden="true"></i>
|
||||||
</a>
|
</a>
|
||||||
{% endwith %}
|
{% endwith %}
|
||||||
@ -68,7 +68,7 @@
|
|||||||
{% for term in terminations %}
|
{% for term in terminations %}
|
||||||
{{ term.circuit|linkify }} ({{ term }})
|
{{ term.circuit|linkify }} ({{ term }})
|
||||||
{% with trace_url=term|viewname:"trace" %}
|
{% with trace_url=term|viewname:"trace" %}
|
||||||
<a href="{% url trace_url pk=term.pk %}" class="btn btn-primary lh-1" title="{% trans "Trace" %}">
|
<a href="{% url trace_url pk=term.pk %}" class="btn btn-sm btn-primary" title="{% trans "Trace" %}">
|
||||||
<i class="mdi mdi-transit-connection-variant" aria-hidden="true"></i>
|
<i class="mdi mdi-transit-connection-variant" aria-hidden="true"></i>
|
||||||
</a>
|
</a>
|
||||||
{% endwith %}
|
{% endwith %}
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<th scope="row">{% trans "Cable" %}</th>
|
<th scope="row">{% trans "Cable" %}</th>
|
||||||
<td>
|
<td>
|
||||||
{{ object.cable|linkify }}
|
{{ object.cable|linkify }}
|
||||||
<a href="{% url trace_url pk=object.pk %}" class="btn btn-primary lh-1" title="{% trans "Trace" %}">
|
<a href="{% url trace_url pk=object.pk %}" class="btn btn-sm btn-primary" title="{% trans "Trace" %}">
|
||||||
<i class="mdi mdi-transit-connection-variant" aria-hidden="true"></i>
|
<i class="mdi mdi-transit-connection-variant" aria-hidden="true"></i>
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
|
@ -29,12 +29,12 @@
|
|||||||
<td>{{ item.role|linkify|placeholder }}</td>
|
<td>{{ item.role|linkify|placeholder }}</td>
|
||||||
<td class="text-end d-print-none">
|
<td class="text-end d-print-none">
|
||||||
{% if perms.dcim.change_inventoryitem %}
|
{% if perms.dcim.change_inventoryitem %}
|
||||||
<a href="{% url 'dcim:inventoryitem_edit' pk=item.pk %}?return_url={{ object.get_absolute_url }}" class="btn btn-warning lh-1" title="{% trans "Edit" %}">
|
<a href="{% url 'dcim:inventoryitem_edit' pk=item.pk %}?return_url={{ object.get_absolute_url }}" class="btn btn-sm btn-warning" title="{% trans "Edit" %}">
|
||||||
<i class="mdi mdi-pencil" aria-hidden="true"></i>
|
<i class="mdi mdi-pencil" aria-hidden="true"></i>
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if perms.ipam.delete_inventoryitem %}
|
{% if perms.ipam.delete_inventoryitem %}
|
||||||
<a href="{% url 'dcim:inventoryitem_delete' pk=item.pk %}?return_url={{ object.get_absolute_url }}" class="btn btn-danger lh-1" title="{% trans "Delete" %}">
|
<a href="{% url 'dcim:inventoryitem_delete' pk=item.pk %}?return_url={{ object.get_absolute_url }}" class="btn btn-sm btn-danger" title="{% trans "Delete" %}">
|
||||||
<i class="mdi mdi-trash-can-outline" aria-hidden="true"></i>
|
<i class="mdi mdi-trash-can-outline" aria-hidden="true"></i>
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -208,7 +208,7 @@
|
|||||||
<th scope="row">{% trans "Wireless Link" %}</th>
|
<th scope="row">{% trans "Wireless Link" %}</th>
|
||||||
<td>
|
<td>
|
||||||
{{ object.wireless_link|linkify }}
|
{{ object.wireless_link|linkify }}
|
||||||
<a href="{% url 'dcim:interface_trace' pk=object.pk %}" class="btn btn-primary lh-1" title="{% trans "Trace" %}">
|
<a href="{% url 'dcim:interface_trace' pk=object.pk %}" class="btn btn-sm btn-primary" title="{% trans "Trace" %}">
|
||||||
<i class="mdi mdi-transit-connection-variant" aria-hidden="true"></i>
|
<i class="mdi mdi-transit-connection-variant" aria-hidden="true"></i>
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
|
@ -73,7 +73,7 @@
|
|||||||
<th scope="row">{% trans "Cable" %}</th>
|
<th scope="row">{% trans "Cable" %}</th>
|
||||||
<td>
|
<td>
|
||||||
{{ object.cable|linkify }}
|
{{ object.cable|linkify }}
|
||||||
<a href="{% url 'dcim:rearport_trace' pk=object.pk %}" class="btn btn-primary lh-1" title="{% trans "Trace" %}">
|
<a href="{% url 'dcim:rearport_trace' pk=object.pk %}" class="btn btn-sm btn-primary" title="{% trans "Trace" %}">
|
||||||
<i class="mdi mdi-transit-connection-variant" aria-hidden="true"></i>
|
<i class="mdi mdi-transit-connection-variant" aria-hidden="true"></i>
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
|
@ -57,7 +57,7 @@
|
|||||||
{% trans "Output" %}
|
{% trans "Output" %}
|
||||||
{% if job.completed %}
|
{% if job.completed %}
|
||||||
<div>
|
<div>
|
||||||
<a href="?export=output" class="btn btn-primary lh-1" role="button">
|
<a href="?export=output" class="btn btn-sm btn-primary" role="button">
|
||||||
<i class="mdi mdi-download" aria-hidden="true"></i> {% trans "Download" %}
|
<i class="mdi mdi-download" aria-hidden="true"></i> {% trans "Download" %}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
@ -54,11 +54,11 @@
|
|||||||
<div class="card">
|
<div class="card">
|
||||||
<h2 class="card-header d-flex justify-content-between">
|
<h2 class="card-header d-flex justify-content-between">
|
||||||
{% trans "Rendered Config" %}
|
{% trans "Rendered Config" %}
|
||||||
<div>
|
<div class="card-actions">
|
||||||
{% copy_content "rendered_config" %}
|
<a href="?export=True" class="btn btn-sm btn-ghost-primary" role="button">
|
||||||
<a href="?export=True" class="btn btn-primary lh-1" role="button">
|
|
||||||
<i class="mdi mdi-download" aria-hidden="true"></i> {% trans "Download" %}
|
<i class="mdi mdi-download" aria-hidden="true"></i> {% trans "Download" %}
|
||||||
</a>
|
</a>
|
||||||
|
{% copy_content "rendered_config" %}
|
||||||
</div>
|
</div>
|
||||||
</h2>
|
</h2>
|
||||||
<pre class="card-body" id="rendered_config">{{ rendered_config }}</pre>
|
<pre class="card-body" id="rendered_config">{{ rendered_config }}</pre>
|
||||||
|
@ -40,12 +40,12 @@
|
|||||||
<td>{{ assignment.priority }}</td>
|
<td>{{ assignment.priority }}</td>
|
||||||
<td class="text-end d-print-none">
|
<td class="text-end d-print-none">
|
||||||
{% if perms.ipam.change_fhrpgroupassignment %}
|
{% if perms.ipam.change_fhrpgroupassignment %}
|
||||||
<a href="{% url 'ipam:fhrpgroupassignment_edit' pk=assignment.pk %}?return_url={{ object.get_absolute_url }}" class="btn btn-warning lh-1" title="{% trans "Edit" %}">
|
<a href="{% url 'ipam:fhrpgroupassignment_edit' pk=assignment.pk %}?return_url={{ object.get_absolute_url }}" class="btn btn-sm btn-warning" title="{% trans "Edit" %}">
|
||||||
<i class="mdi mdi-pencil" aria-hidden="true"></i>
|
<i class="mdi mdi-pencil" aria-hidden="true"></i>
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if perms.ipam.delete_fhrpgroupassignment %}
|
{% if perms.ipam.delete_fhrpgroupassignment %}
|
||||||
<a href="{% url 'ipam:fhrpgroupassignment_delete' pk=assignment.pk %}?return_url={{ object.get_absolute_url }}" class="btn btn-danger lh-1" title="{% trans "Delete" %}">
|
<a href="{% url 'ipam:fhrpgroupassignment_delete' pk=assignment.pk %}?return_url={{ object.get_absolute_url }}" class="btn btn-sm btn-danger" title="{% trans "Delete" %}">
|
||||||
<i class="mdi mdi-trash-can-outline" aria-hidden="true"></i>
|
<i class="mdi mdi-trash-can-outline" aria-hidden="true"></i>
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
Loading…
Reference in New Issue
Block a user