2021-03-29 16:43:29 -04:00
|
|
|
{% extends 'ipam/prefix/base.html' %}
|
2021-08-13 15:56:14 -04:00
|
|
|
{% load helpers %}
|
2021-03-29 16:43:29 -04:00
|
|
|
|
2021-08-31 11:15:41 -04:00
|
|
|
{% block extra_controls %}
|
2021-03-29 16:43:29 -04:00
|
|
|
{% include 'ipam/inc/toggle_available.html' %}
|
2021-09-01 11:06:50 -04:00
|
|
|
{% if perms.ipam.add_prefix and first_available_prefix %}
|
2021-08-31 11:15:41 -04:00
|
|
|
<a href="{% url 'ipam:prefix_add' %}?prefix={{ first_available_prefix }}&vrf={{ object.vrf.pk }}&site={{ object.site.pk }}&tenant_group={{ object.tenant.group.pk }}&tenant={{ object.tenant.pk }}" class="btn btn-sm btn-success">
|
2021-09-01 11:06:50 -04:00
|
|
|
<i class="mdi mdi-plus-thick" aria-hidden="true"></i> Add Prefix
|
2021-03-29 16:43:29 -04:00
|
|
|
</a>
|
|
|
|
{% endif %}
|
|
|
|
{{ block.super }}
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block content %}
|
2021-12-14 15:31:42 -05:00
|
|
|
<form method="post">
|
|
|
|
{% csrf_token %}
|
|
|
|
{% include 'inc/table_controls_htmx.html' with table_modal="PrefixTable_config" %}
|
|
|
|
|
|
|
|
<div class="card">
|
|
|
|
<div class="card-body" id="object_list">
|
|
|
|
{% include 'htmx/table.html' %}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="noprint bulk-buttons">
|
|
|
|
<div class="bulk-button-group">
|
|
|
|
{% if perms.ipam.change_prefix %}
|
|
|
|
<button type="submit" name="_edit" formaction="{% url 'ipam:prefix_bulk_edit' %}?return_url={% url 'ipam:prefix_prefixes' pk=object.pk %}" class="btn btn-warning btn-sm">
|
|
|
|
<i class="mdi mdi-pencil" aria-hidden="true"></i> Edit
|
|
|
|
</button>
|
|
|
|
{% endif %}
|
|
|
|
{% if perms.ipam.delete_prefix %}
|
|
|
|
<button type="submit" name="_delete" formaction="{% url 'ipam:prefix_bulk_delete' %}?return_url={% url 'ipam:prefix_prefixes' pk=object.pk %}" class="btn btn-danger btn-sm">
|
|
|
|
<i class="mdi mdi-trash-can-outline" aria-hidden="true"></i> Delete
|
|
|
|
</button>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
2021-03-29 16:43:29 -04:00
|
|
|
</div>
|
2021-12-14 15:31:42 -05:00
|
|
|
</form>
|
|
|
|
{% table_config_form table %}
|
2021-08-13 15:56:14 -04:00
|
|
|
{% endblock %}
|