{# SPDX-License-Identifier: AGPL-3.0-or-later #} {# SPDX-FileCopyrightText: 2026 JWP Consulting GK #} {% extends "admin/change_form.html" %} {% load i18n %} {% load static %} {# for add_preserved_filters #} {% load admin_urls %} {% block extrahead %} {{ block.super }} {% endblock %} {% block content_title %}

{% if original.pk %} {% translate 'Edit page' %} {% else %} {% translate 'Add new page' %} {% endif %}

{% endblock %} {% block content_subtitle %}{% endblock %} {% block object-tools-items %}{% endblock %} {% partialdef submit_buttons %} {% if original.pk and not original.draft %} {% else %} {% endif %} {% endpartialdef %} {% partialdef resources %}

{% trans 'Page resources' %}

{# Show resources only when there's a saved page #} {% if original.pk %} {% with resources=original.pageresource_set.all %} {% if resources %}
{% for resource in resources %}
{% csrf_token %} {% if resource.name in unused %} {% trans 'Unused' %} {% endif %} {% if resource.type == 'IMAGE' and resource.image_instance %} {{ resource.name }} {% endif %}

{{ resource.name }}

{% endfor %}
{% else %}

{% trans "This is where this page's images show up. Try adding an image by copying and pasting it or drag and dropping it into the editor." %}

{% endif %} {% endwith %} {% else %}

{% trans 'Save this page to add page resources.' %}

{% endif %}
{% endpartialdef %} {% block content %}
{% csrf_token %}
{% trans 'Page contents' %}
{{ adminform.form.title.errors }} {{ adminform.form.slug.errors }} {{ adminform.form.title }}

{% if original.pk %} {% blocktrans %} Press Edit address to change the page address. {% endblocktrans %} {% else %} {% blocktrans %} Determines page title when you press Save draft or Publish. {% endblocktrans %} {% endif %}

{% if original.pk %} {{ original.address }} {% if not original.is_root %} {% trans "Edit address" %} {{ parent_link }} {% endif %} {% else %} {{ parent_link }} {{ adminform.form.parent }} {% endif %}

{% partial submit_buttons %}
{{ adminform.form.content_md.errors }} {{ adminform.form.content_md }}
{% partial resources %}

{% trans "Publish" %}

{% if original.pk %}

{% trans 'View on site' %}

{% endif %}
{% if original.pk and not original.draft %}

{% blocktranslate with date=original.publish_date %} Published on {{ date }} {% endblocktranslate %} {% trans "Edit" %}

{% else %} {% translate 'This page is a draft and not public.' %} {% endif %}
{{ adminform.form.visibility.errors }} {{ adminform.form.visibility }}
{{ adminform.form.visibility.help_text }}
{{ adminform.form.author.errors }} {{ adminform.form.author }}
{{ adminform.form.author.help_text }}
{% partial submit_buttons %} {% if original and original.pk %} {# from django/contrib/admin/templates/admin/submit_line.html #} {% url opts|admin_urlname:'delete' original.pk|admin_urlquote as delete_url %} {% translate "Delete" %} {% endif %}

{% trans "Tags" %}

{% trans 'Tags' %}
{{ adminform.form.tags.errors }} {{ adminform.form.tags }}
{{ adminform.form.tags.help_text }}
{% if original and original.pk %}

{% trans "Page hierarchy" %}

{% if original.is_root %} {% trans 'This is your CMS root page.' %} {% else %} {{ parent_link }} {% endif %}

{% trans 'Children' %}

{% if original.is_branch %} {% if children %} {% if children|length > 10 %} {% trans 'View all children' %} {% endif %}

{% trans 'Add child page' %}

{% else %}

{% translate 'This page has no children.' %} {% trans 'Add child page' %}

{% if not original.is_root %} {% trans "Convert to leaf" %} {% endif %}

{% endif %}
{{ adminform.form.date_prefix_children.errors }} {{ adminform.form.date_prefix_children }}
{% trans 'Add the publish date (YYYY-MM-DD-) to the auto-generated slugs of child pages.' %}

{% blocktrans %} Example: blog/slug.htmlblog/1999-12-31-slug.html {% endblocktrans %}

{% blocktrans %} Updating this setting only changes how new page Koriander generates new page slugs. Change existing slugs using the page address Edit link. {% endblocktrans %}

{% else %}

{% trans "Convert to branch" %}

{% endif %}

{% trans "View entire page hierarchy" %}

{% endif %}

{% trans "Options" %}

{% trans "Options" %}
{{ adminform.form.display_toc.errors }} {{ adminform.form.display_toc }}
{% trans 'Show table of contents when rendering this article.' %}
{% if original and original.pk %}

{% trans "Page aliases" %}

{% with aliases=original.alias_set.all %} {% if aliases %}

{% blocktrans with address=original.address %} These page aliases redirect to {{ address }}: {% endblocktrans %}

{% else %}

{% blocktrans with address=original.address %} No page aliases redirect to {{ address }}. {% endblocktrans %}

{% endif %} {% endwith %}

{% trans "Add page alias" %}

{% with history=original.pageedithistory_set.all %}

{% blocktrans count counter=history|length %} Page edit history ({{counter}} edit) {% plural %} Page edit history ({{counter}} edits) {% endblocktrans %}

{% if history %}

{% trans "View all page edits" %}

{% else %}

{% trans "No edit history." %}

{% endif %} {% endwith %}
{% endif %}
{% endblock content %}