{% load helpers %}
{% load i18n %}

<ul class="nav nav-tabs">
  <li class="nav-item">
    <a href="{% url 'ipam:ipaddress_add' %}{% querystring request %}" class="nav-link {% if active_tab == 'add' %}active{% endif %}">
      {% if object.pk %}{% trans "Edit" %}{% else %}{% trans "Create" %}{% endif %}
    </a>
  </li>
  {% if 'interface' in request.GET or 'vminterface' in request.GET %}
    <li class="nav-item">
      <a href="{% url 'ipam:ipaddress_assign' %}{% querystring request %}" class="nav-link {% if active_tab == 'assign' %}active{% endif %}">
        {% trans "Assign IP" %}
      </a>
    </li>
  {% elif not object.pk %}
    <li class="nav-item">
      <a href="{% url 'ipam:ipaddress_bulk_add' %}{% querystring request %}" class="nav-link {% if active_tab == 'bulk_add' %}active{% endif %}">
        {% trans "Bulk Create" %}
      </a>
    </li>
  {% endif %}
</ul>
