Browse Source

Merge pull request #6325 from netbox-community/feature-6321

Integrate changes from #6322 (to fix #6321) into feature
Jeremy Stretch 4 years ago
parent
commit
79184347f9
1 changed files with 9 additions and 0 deletions
  1. 9 0
      netbox/templates/ipam/prefix/ip_addresses.html

+ 9 - 0
netbox/templates/ipam/prefix/ip_addresses.html

@@ -1,5 +1,14 @@
 {% extends 'ipam/prefix/base.html' %}
 {% extends 'ipam/prefix/base.html' %}
 
 
+{% block extra_controls %}
+  {% if perms.ipam.add_ipaddress and active_tab == 'ip-addresses' and first_available_ip %}
+    <a href="{% url 'ipam:ipaddress_add' %}?address={{ first_available_ip }}&vrf={{ object.vrf.pk }}&tenant_group={{ object.tenant.group.pk }}&tenant={{ object.tenant.pk }}" class="btn btn-sm btn-outline-success m-1">
+        <i class="mdi mdi-plus-thick" aria-hidden="true"></i>
+        Add an IP Address
+    </a>
+  {% endif %}
+{% endblock %}
+
 {% block content %}
 {% block content %}
   <div class="row">
   <div class="row">
     <div class="col-md-12">
     <div class="col-md-12">