{% extends non_publishing_change_form_template %} {% load i18n admin_modify admin_static admin_urls polymorphic_admin_tags compress publishing_tags %} {% block breadcrumbs %} {% breadcrumb_scope base_opts %} {% endbreadcrumb_scope %} {% endblock %} {% block extrahead %} {{ block.super }} {% endblock %} {% block submit_buttons_bottom %}
{{ block.super }}
{% if has_been_published and is_dirty %}

This version is newer than the published version

{% endif %} {% if has_publish_permission %} {% if publish_btn %} Publish {% endif %} {% if unpublish_btn %} Unpublish {% endif %} {% endif %}
{% endblock %} {% block object-tools-items %} {# Overriding view on site behaviour to remove 'view on site' for unpublished items #} {# copied from django_object_actions/change_form.html #} {% for tool in objectactions %}
  • {{ tool.label|capfirst }}
  • {% endfor %}
  • {% url opts|admin_urlname:'history' original.pk|admin_urlquote as history_url %} {% trans "History" %}
  • {% with original.get_absolute_url as preview_url %} {% if preview_url and has_preview_permission %}
  • Preview draft
  • {% endif %} {% endwith %} {% if has_absolute_url and has_been_published %}
  • {% trans "View published" %}
  • {% endif %} {% endblock %}