{% load i18n guardian_tags %}{% spaceless %}
{% get_obj_perms user for page_instance as "page_perms" %}
<div class="clearfix">
    <p class="document_action_menu right">
        <a href="#" data-dropdown="document-actions-drop" class="button medium radius secondary dropdown">{% trans "Actions on this document" %}</a><br>
        <ul id="document-actions-drop" data-dropdown-content class="f-dropdown">
            {% if "change_page" in page_perms %}
            <li><a href="{% url 'sveedocuments:page-edit' page_instance.slug %}">{% trans "Edit" %}</a></li>
            <li class="divider"></li>
            {% endif %}
            {% if "delete_page" in page_perms %}
            <li><a href="{% url 'sveedocuments:page-delete' page_instance.slug %}">{% trans "Delete" %}</a></li>
            <li class="divider"></li>
            {% endif %}
            <li><a href="{% url 'sveedocuments:page-source' page_instance.slug %}">{% trans "Plain text version" %}</a></li>
            {% if pdf_export_enabled %}<li class="divider"></li>
            <li><a href="{% url 'sveedocuments:page-pdf' page_instance.slug %}">{% trans "PDF version" %}</a></li>{% endif %}
        </ul>
    </p>
</div>
{% endspaceless %}