{% load i18n admin_urls %}
<div class="submit-row">
    {% block submit-row %}
        {% if show_change %}
            {% url opts|admin_urlname:'change' original.pk|admin_urlquote as change_url %}
            <a href="{{ change_url }}" class="br-button primary">{% translate 'Change' %}</a>
        {% endif %}
        {% if show_save %}
            <input type="submit" value="{% translate 'Save' %}"                 class="br-button primary" class="default" name="_save">
        {% endif %}
        {% if show_save_as_new %}
            <input type="submit" value="{% translate 'Save as new' %}"          class="br-button secondary small" name="_saveasnew">
        {% endif %}
        {% if show_save_and_add_another %}
            <input type="submit" value="{% translate 'Save and add another' %}" class="br-button secondary small ml-3" name="_addanother">
        {% endif %}
        {% if show_save_and_continue %}
            <input type="submit" value="{% if can_change %}{% translate 'Save and continue editing' %}{% else %}{% translate 'Save and view' %}{% endif %}" class="br-button secondary small" name="_continue">
        {% endif %}
        {% if show_change_form_export %}
            <input type="submit" value="{% translate 'Export' %}"               class="br-button secondary small ml-3" name="_export-item">
        {% endif %}        
        {% if show_close %}
            {% url opts|admin_urlname:'changelist' as changelist_url %}
            <a href="{% add_preserved_filters changelist_url %}" class="br-button secondary">{% translate 'Listagem' %}</a>
        {% endif %}
        {% if not show_change %}
            {% url opts|admin_urlname:'view' original.pk|admin_urlquote as view_url %}
            <a href="{% add_preserved_filters view_url %}" class="br-button secondary small">{% translate "Cancel" %}</a>
        {% endif %}
        {% if show_delete_link and original %}
            {% url opts|admin_urlname:'delete' original.pk|admin_urlquote as delete_url %}
            <a href="{% add_preserved_filters delete_url %}" class="br-button secondary small danger">{% translate "Delete" %}</a>
        {% endif %}
        {{related_modeladmin}}
        {% block submit-row-before-delete %}
        {% endblock %}
    {% endblock %}
</div>
