{% load i18n %}{% spaceless %}
    <dl class="sub-nav">
        <dt class="hide">Sections:</dt>
        <dd{% if active_tab == 'edit' %} class="active"{% endif %}>
            <a href="{% url 'sveedocuments:page-edit' page_instance.slug %}">{% trans "Edit" %}</a>
        </dd>
        <dd{% if active_tab == 'history' %} class="active"{% endif %}>
            <a href="{% url 'sveedocuments:page-history' page_instance.slug %}">{% trans "History" %} <em>({% if revisions_count %}{{ revisions_count }}{% else %}0{% endif %})</em></a>
        </dd>
        <dd{% if active_tab == 'attachments' %} class="active"{% endif %}>
            <a href="{% url 'sveedocuments:page-attachments' page_instance.slug %}">{% trans "Attachments" %} <em>({% if files_count %}{{ files_count }}{% else %}0{% endif %})</em></a>
        </dd>
        {% if page_instance.visible %}<dd>
            <a target="_blank" href="{% url 'sveedocuments:page-details' page_instance.slug %}">{% trans "View on site" %}</a>
        </dd>{% endif %}
    </dl>
{% endspaceless %}