{% load i18n %}{% spaceless %}
<div class="cms-toolbar-item cms-toolbar-item-buttons cms-toolbar-item-switch-save-edit">
    {% if cms_toolbar.edit_mode_active %}
    <a class="cms-btn cms-btn-switch-save"
        href="{{ cms_toolbar.get_object_preview_url }}">
        <span>{% trans "Preview" %}</span>
    </a>
    {% else %}
    <a class="cms-btn cms-btn-action cms-btn-switch-edit"
        href="{{ cms_toolbar.get_object_edit_url }}">
        {% trans "Edit" %}
    </a>
    {% endif %}
</div>
{% endspaceless %}
