{% extends  "admin/change_form.html" %}
{% comment %}Admin edit template to edit pages.{% endcomment %}
{% load admin_urls i18n static %}

{% if not is_popup %}
{% block breadcrumbs %}
<div class="breadcrumbs">
    <a href="{% url 'admin:index' %}">{% translate 'Home' %}</a>
    &rsaquo; <a href="{% url 'admin:app_list' app_label=opts.app_label %}">{{ opts.app_config.verbose_name }}</a>
    &rsaquo; {% if has_view_permission %}<a href="{% url opts|admin_urlname:'changelist' %}">{{ opts.verbose_name_plural|capfirst }}</a>{% else %}{{ opts.verbose_name_plural|capfirst }}{% endif %}

    {% if parent %}
    &rsaquo; <a href="{% url opts|admin_urlname:"changelist" %}?parent={{parent.id}}">{{ parent.title }}</a>
    {% endif %}

    &rsaquo; {% if add %}{% blocktranslate with name=opts.verbose_name %}Add {{ name }}{% endblocktranslate %}{% else %}{{ original|truncatewords:"18" }}{% endif %}
</div>
{% endblock %}
{% endif %}


{% block submit_buttons_bottom %}
{% if has_change_permission %}
<div class="columns is-size-5">
    <div class="column has-text-left">
        {% if original and not original.is_trash %}
        <button type="submit" name="status" value="32" class="button is-danger is-size-6">{% translate "Move to trash" %}</button>
        {% endif %}
        {% if original and not original.is_draft %}
        <button type="submit" name="status" value="0" class="button is-warning is-size-6">{% translate "Mark as draft" %}</button>
        {% endif %}
    </div>

    <div class="column has-text-right">
        <button type="submit" class="button is-secondary is-size-6">{% translate "Save" %}</button>
        <button type="submit" name="_continue" class="button is-secondary is-size-6">{% translate "Save and continue" %}</button>
        {% if not original.is_published %}
        <button type="submit" name="status" value="16" class="button is-primary is-size-6">{% translate "Publish" %}</button>
        {% endif %}
    </div>

{% endif %}
</div>
{% endblock %}
