{% extends "admin/change_form.html" %} {% load i18n %} {# --- Draft Inspector --------------------------------------------------- #} {# Read-only panel showing what is currently staged per language. Inspired #} {# by django-reversion's history sidebar: the admin only OBSERVES the #} {# staged state and acts on it (Publish / Discard from object-tools). #} {# Authoring drafts happens through the /draft/ API endpoint, not here. #} {% block field_sets %} {% if lifecycle_draft_diff %}

{% translate "Pending draft" %}

{% for lang, rows in lifecycle_draft_diff %}

[{{ lang }}]

{% for field, live, draft_val in rows %} {% endfor %}
{% translate "Field" %} {% translate "Live" %} {% translate "Draft" %}
{{ field }} {{ live|default_if_none:"—"|truncatechars:80 }} {{ draft_val|default_if_none:"—"|truncatechars:80 }}
{% endfor %}
{% endif %} {{ block.super }} {% endblock %} {% block object-tools-items %} {% if original.pk %} {# Lifecycle badge — same colour palette as the changelist column. #}
  • {{ lifecycle_status_label }}
  • {# Author preview — only Page (not other AbstractPage subclasses) has the #} {# render endpoint registered. Hidden otherwise so editors don't see a #} {# 404'ing link. #} {% if lifecycle_render_url %}
  • {% translate "Preview" %}
  • {% endif %} {# Lifecycle transitions. The form itself still edits the live row; #} {# these are the explicit verbs (publish / discard draft / trash etc.) #} {# that the model layer exposes. #}
  • {% translate "Publish now" %}
  • {% if lifecycle_has_draft %}
  • {% translate "Discard draft" %}
  • {% endif %} {% if lifecycle_is_trashed %}
  • {% translate "Restore from trash" %}
  • {% else %}
  • {% translate "Trash" %}
  • {% endif %} {% endif %} {{ block.super }} {% endblock %}