Fixing a nesting/logic issue on device type edit/delete buttons

This commit is contained in:
Nick Peelman 2016-07-05 14:59:29 -04:00
parent 8b7d86df5a
commit db9b0dcaef
No known key found for this signature in database
GPG Key ID: 69A0803B5999940F

View File

@ -14,8 +14,10 @@
</ol> </ol>
</div> </div>
</div> </div>
{% if perms.dcim.change_devicetype %}
{% if perms.dcim.change_devicetype or perms.dcim.delete_devicetype %}
<div class="pull-right"> <div class="pull-right">
{% if perms.dcim.change_devicetype %}
<a href="{% url 'dcim:devicetype_edit' pk=devicetype.pk %}" class="btn btn-warning"> <a href="{% url 'dcim:devicetype_edit' pk=devicetype.pk %}" class="btn btn-warning">
<span class="glyphicon glyphicon-pencil" aria-hidden="true"></span> <span class="glyphicon glyphicon-pencil" aria-hidden="true"></span>
Edit this device type Edit this device type
@ -26,8 +28,10 @@
<span class="glyphicon glyphicon-trash" aria-hidden="true"></span> <span class="glyphicon glyphicon-trash" aria-hidden="true"></span>
Delete this device type Delete this device type
</a> </a>
{% endif %}
</div> </div>
{% endif %} {% endif %}
<h1>{{ devicetype }}</h1> <h1>{{ devicetype }}</h1>
<div class="row"> <div class="row">
<div class="col-md-6"> <div class="col-md-6">