{% extends 'generic/object_children.html' %}
{% load i18n %}

{% block extra_controls %}
  {% if perms.ipam.add_ipaddress 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 }}&return_url={% url 'ipam:prefix_ipaddresses' pk=object.pk %}" class="btn btn-primary">
        <i class="mdi mdi-plus-thick" aria-hidden="true"></i> {% trans "Add IP Address" %}
    </a>
  {% endif %}
{% endblock extra_controls %}
