Introduced clone, edit, and delete buttons

This commit is contained in:
Jeremy Stretch
2019-12-13 15:29:55 -05:00
parent 85563e21db
commit 8acd3d0a72
24 changed files with 153 additions and 184 deletions

View File

@@ -29,19 +29,13 @@
</div>
<div class="pull-right noprint">
{% if perms.tenancy.add_tenant %}
{% clone_button 'tenancy:tenant_add' tenant %}
{% clone_button tenant %}
{% endif %}
{% if perms.tenancy.change_tenant %}
<a href="{% url 'tenancy:tenant_edit' slug=tenant.slug %}" class="btn btn-warning">
<span class="fa fa-pencil" aria-hidden="true"></span>
Edit this tenant
</a>
{% edit_button tenant %}
{% endif %}
{% if perms.tenancy.delete_tenant %}
<a href="{% url 'tenancy:tenant_delete' slug=tenant.slug %}" class="btn btn-danger">
<span class="fa fa-trash" aria-hidden="true"></span>
Delete this tenant
</a>
{% delete_button tenant %}
{% endif %}
</div>
<h1>{% block title %}{{ tenant }}{% endblock %}</h1>