ip_addresses.html 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. {% extends 'ipam/iprange/base.html' %}
  2. {% load helpers %}
  3. {% block extra_controls %}
  4. {% if perms.ipam.add_ipaddress and active_tab == 'ip-addresses' and object.first_available_ip %}
  5. <a href="{% url 'ipam:ipaddress_add' %}?address={{ object.first_available_ip }}&vrf={{ object.vrf.pk }}&tenant_group={{ object.tenant.group.pk }}&tenant={{ object.tenant.pk }}" class="btn btn-sm btn-primary">
  6. <i class="mdi mdi-plus-thick" aria-hidden="true"></i> Add IP Address
  7. </a>
  8. {% endif %}
  9. {% endblock %}
  10. {% block content %}
  11. <form method="post">
  12. {% csrf_token %}
  13. {% include 'inc/table_controls_htmx.html' with table_modal="IPAddressTable_config" %}
  14. <div class="card">
  15. <div class="card-body" id="object_list">
  16. {% include 'htmx/table.html' %}
  17. </div>
  18. </div>
  19. <div class="noprint bulk-buttons">
  20. <div class="bulk-button-group">
  21. {% if perms.ipam.change_ipaddress %}
  22. <button type="submit" name="_edit" formaction="{% url 'ipam:ipaddress_bulk_edit' %}?return_url={% url 'ipam:iprange_ipaddresses' pk=object.pk %}" class="btn btn-warning btn-sm">
  23. <i class="mdi mdi-pencil" aria-hidden="true"></i> Edit
  24. </button>
  25. {% endif %}
  26. {% if perms.ipam.delete_ipaddress %}
  27. <button type="submit" name="_delete" formaction="{% url 'ipam:ipaddress_bulk_delete' %}?return_url={% url 'ipam:iprange_ipaddresses' pk=object.pk %}" class="btn btn-danger btn-sm">
  28. <i class="mdi mdi-trash-can-outline" aria-hidden="true"></i> Delete
  29. </button>
  30. {% endif %}
  31. </div>
  32. </div>
  33. </form>
  34. {% endblock %}
  35. {% block modals %}
  36. {{ block.super }}
  37. {% table_config_form table %}
  38. {% endblock modals %}