mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Relocate "add" buttons for embedded object tables
This commit is contained in:
@@ -65,15 +65,17 @@
|
||||
<div class="row">
|
||||
<div class="col col-md-12">
|
||||
<div class="card">
|
||||
<h5 class="card-header">{% trans "Virtual IP Addresses" %}</h5>
|
||||
<h5 class="card-header">
|
||||
{% trans "Virtual IP Addresses" %}
|
||||
{% if perms.ipam.add_ipaddress %}
|
||||
<div class="card-actions">
|
||||
<a href="{% url 'ipam:ipaddress_add' %}?fhrpgroup={{ object.pk }}&return_url={{ object.get_absolute_url }}" class="btn btn-ghost-primary btn-sm">
|
||||
<i class="mdi mdi-plus-thick" aria-hidden="true"></i> {% trans "Add IP Address" %}
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
</h5>
|
||||
{% htmx_table 'ipam:ipaddress_list' fhrpgroup_id=object.pk %}
|
||||
{% if perms.ipam.add_ipaddress %}
|
||||
<div class="card-footer text-end">
|
||||
<a href="{% url 'ipam:ipaddress_add' %}?fhrpgroup={{ object.pk }}&return_url={{ object.get_absolute_url }}" class="btn btn-primary">
|
||||
<i class="mdi mdi-plus-thick" aria-hidden="true"></i> {% trans "Add IP Address" %}
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% include 'inc/panel_table.html' with table=members_table heading='Members' %}
|
||||
{% plugin_full_width_page object %}
|
||||
|
@@ -2,7 +2,21 @@
|
||||
{% load i18n %}
|
||||
|
||||
<div class="card">
|
||||
<h5 class="card-header">{% trans "FHRP Groups" %}</h5>
|
||||
<h5 class="card-header">
|
||||
{% trans "FHRP Groups" %}
|
||||
<div class="card-actions">
|
||||
{% if perms.ipam.add_fhrpgroup %}
|
||||
<a href="{% url 'ipam:fhrpgroup_add' %}?return_url={% url 'ipam:fhrpgroupassignment_add' %}%3Finterface_type={{ object|content_type_id }}%26interface_id={{ object.pk }}" class="btn btn-ghost-primary btn-sm">
|
||||
<span class="mdi mdi-plus-thick" aria-hidden="true"></span> {% trans "Create Group" %}
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if perms.ipam.add_fhrpgroupassignment %}
|
||||
<a href="{% url 'ipam:fhrpgroupassignment_add' %}?interface_type={{ object|content_type_id }}&interface_id={{ object.pk }}&return_url={{ object.get_absolute_url }}" class="btn btn-ghost-primary btn-sm">
|
||||
<span class="mdi mdi-plus-thick" aria-hidden="true"></span> {% trans "Assign Group" %}
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</h5>
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -44,16 +58,4 @@
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="card-footer text-end d-print-none">
|
||||
{% if perms.ipam.add_fhrpgroup %}
|
||||
<a href="{% url 'ipam:fhrpgroup_add' %}?return_url={% url 'ipam:fhrpgroupassignment_add' %}%3Finterface_type={{ object|content_type_id }}%26interface_id={{ object.pk }}" class="btn btn-primary">
|
||||
<span class="mdi mdi-plus-thick" aria-hidden="true"></span> {% trans "Create Group" %}
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if perms.ipam.add_fhrpgroupassignment %}
|
||||
<a href="{% url 'ipam:fhrpgroupassignment_add' %}?interface_type={{ object|content_type_id }}&interface_id={{ object.pk }}&return_url={{ object.get_absolute_url }}" class="btn btn-primary">
|
||||
<span class="mdi mdi-plus-thick" aria-hidden="true"></span> {% trans "Assign Group" %}
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -91,7 +91,16 @@
|
||||
</div>
|
||||
<div class="col col-md-6">
|
||||
<div class="card">
|
||||
<h5 class="card-header">{% trans "Addressing" %}</h5>
|
||||
<h5 class="card-header">
|
||||
{% trans "Addressing" %}
|
||||
{% if object.prefix.version == 4 %}
|
||||
<div class="card-actions">
|
||||
<a class="btn btn-ghost-primary btn-sm" data-bs-toggle="modal" data-bs-target="#prefix-modal">
|
||||
<i class="mdi mdi-information-outline" aria-hidden="true"></i> {% trans "Addressing Details" %}
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
</h5>
|
||||
<table class="table table-hover attr-table">
|
||||
<tr>
|
||||
<th scope="row">{% trans "Utilization" %}</th>
|
||||
@@ -142,13 +151,6 @@
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
{% if object.prefix.version == 4 %}
|
||||
<div class="card-footer text-end">
|
||||
<a class="btn btn-primary btn-sm" data-bs-toggle="modal" data-bs-target="#prefix-modal">
|
||||
<i class="mdi mdi-information-outline" aria-hidden="true"></i> {% trans "Addressing Details" %}
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% include 'inc/panels/custom_fields.html' %}
|
||||
{% include 'inc/panels/tags.html' %}
|
||||
|
@@ -80,15 +80,17 @@
|
||||
<div class="row">
|
||||
<div class="col col-md-12">
|
||||
<div class="card">
|
||||
<h5 class="card-header">{% trans "Prefixes" %}</h5>
|
||||
<h5 class="card-header">
|
||||
{% trans "Prefixes" %}
|
||||
{% if perms.ipam.add_prefix %}
|
||||
<div class="card-actions">
|
||||
<a href="{% url 'ipam:prefix_add' %}?{% if object.tenant %}tenant={{ object.tenant.pk }}&{% endif %}site={{ object.site.pk }}&vlan={{ object.pk }}" class="btn btn-ghost-primary btn-sm">
|
||||
<i class="mdi mdi-plus-thick" aria-hidden="true"></i> {% trans "Add a Prefix" %}
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
</h5>
|
||||
{% htmx_table 'ipam:prefix_list' vlan_id=object.pk %}
|
||||
{% if perms.ipam.add_prefix %}
|
||||
<div class="card-footer text-end d-print-none">
|
||||
<a href="{% url 'ipam:prefix_add' %}?{% if object.tenant %}tenant={{ object.tenant.pk }}&{% endif %}site={{ object.site.pk }}&vlan={{ object.pk }}" class="btn btn-primary">
|
||||
<i class="mdi mdi-plus-thick" aria-hidden="true"></i> {% trans "Add a Prefix" %}
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% plugin_full_width_page object %}
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user