{% load base_tags %}
{% load perm_tags %}
{% load i18n %}

{% has_perm user locations.change_location opt_object as can_edit %}
{% has_perm user locations.delete_location opt_object as can_delete %}

{% if can_edit %}
<div class="t-iconrow">

	<span>{{ opt_object.status_detail|capfirst }}</span>
	<a class="option-link edit" href="{% url location.edit opt_object.pk %}">{% trans "Edit" %}</a>

	<div class="more-options-wrap">
	<a href="javascript:;" class="more-options-trigger">{% trans "More options" %} <small>&#9660;</small></a>
	<div class="more-options-target">
	    <ul>
			{% if can_delete %}
				<li>
					<a class="option-link delete" href="{% url location.delete opt_object.pk %}">{% trans "Delete" %}</a>
				</li>				
			{% endif %}
		 </ul>
	    </div>
	</div>

</div>
{% endif %}