Introduced clone, edit, and delete buttons

This commit is contained in:
Jeremy Stretch
2019-12-13 15:29:55 -05:00
parent cf47170cde
commit 3506f93cd7
24 changed files with 153 additions and 184 deletions

View File

@@ -29,19 +29,13 @@
</div>
<div class="pull-right noprint">
{% if perms.ipam.add_ipaddress %}
{% clone_button 'ipam:ipaddress_add' ipaddress %}
{% clone_button ipaddress %}
{% endif %}
{% if perms.ipam.change_ipaddress %}
<a href="{% url 'ipam:ipaddress_edit' pk=ipaddress.pk %}" class="btn btn-warning">
<span class="fa fa-pencil" aria-hidden="true"></span>
Edit this IP
</a>
{%edit_button ipaddress %}
{% endif %}
{% if perms.ipam.delete_ipaddress %}
<a href="{% url 'ipam:ipaddress_delete' pk=ipaddress.pk %}" class="btn btn-danger">
<span class="fa fa-trash" aria-hidden="true"></span>
Delete this IP
</a>
{% delete_button ipaddress %}
{% endif %}
</div>
<h1>{% block title %}{{ ipaddress }}{% endblock %}</h1>