{% extends "_base.html" %} {% load i18n %} {% load static %} {% load widget_tweaks %} {% load base_filters %} {% load content_filters %} {% load page_filters %} {% load rules %} {% load render_bundle from webpack_loader %} {% block content %} {% get_current_language as LANGUAGE_CODE %} {% has_perm 'cms.change_page_object' request.user page as can_edit_page %}
{% csrf_token %}

{% if page %} {% if page_translation_form.instance.id %} {% with page_translation_form.instance.title as page_title %} {% blocktrans %}Edit page "{{ page_title }}"{% endblocktrans %} {% endwith %} {% if LANGUAGE_CODE != language.slug %} {% if page.backend_translation %} ({% trans 'Title in' %} {% translated_language_name LANGUAGE_CODE %}: "{{ page.backend_translation.title }}") {% endif %} {% endif %} {% else %} {% trans 'Create new translation' %} {% endif %} {% else %} {% trans 'Create new page' %} {% endif %}

{% if not page_form.instance.id or not page_form.instance.archived %}
{% if can_edit_page %} {% endif %} {% has_perm 'cms.publish_page_object' request.user page as can_publish_page %} {% if can_publish_page %} {% else %} {% endif %}
{% endif %}
{% include "_form_language_tabs.html" with target='edit_page' instance=page_form.instance content_field="page_id" %}
{% if page_translation_form.instance.currently_in_translation %}
{% trans 'Translation in progress' %} ({% trans 'Cancel translation process' %})
{% endif %}
{% if page_translation_form.instance.id %}
{% trans 'Version' %}:
{{ page_translation_form.instance.version }} ({% trans 'Show' %})
{% trans 'Status' %}:
{% if page.explicitly_archived %} {% trans 'Archived' %} {% elif page.implicitly_archived %} {% trans 'Archived, because a parent page is archived' %} {% else %} {{ page_translation_form.instance.get_status_display }} {% endif %}
{% endif %}
{% render_field page_translation_form.title|add_error_class:"border-red-500" class+="mb-2" %} {% if page_translation_form.instance.id %} {% if request.region.short_urls_enabled and request.user.expert_mode %} {{ page_translation_form.instance.short_url }}
{% endif %} {% endif %} {% render_field page_translation_form.content class+="tinymce_textarea flex-auto" %}
{% if page %}

{% trans "Minor edit" %}

{% render_field page_translation_form.minor_edit %}
{% minor_edit_help_text request.region language page_translation_form %}
{% endif %}

{% trans 'Settings of the page' %}

{% render_field page_form.icon label=page_form.icon.label %}
{% render_field page_form|get_private_member:"ref_node_id" %} {% render_field page_form|get_private_member:"position" %} {% render_field page_form.parent id="parent" %}
{% include "pages/_page_order_table.html" %}
{% render_field page_form.mirrored_page_region id="mirrored_page_region" %}
{% include "pages/_mirrored_page_field.html" %}
{% render_field page_form.mirrored_page_first id="mirrored_page_first" %}
{% if request.user.expert_mode %}
{% render_field page_form.enable_api_token %}
{% render_field page_form.api_token|add_error_class:"border-red-500" class+="flex-grow text-ellipsis pointer-events-none !rounded-none !rounded-l" %}
{{ page_form.api_token.help_text }}
{% if perms.cms.grant_page_permissions and request.region.page_permissions_enabled %}

{% trans "This affects only users, who don't have the permission to change arbitrary pages anyway." %}

{% include "pages/_page_permission_table.html" %}
{% endif %} {% endif %} {% if page_form.organization.field.queryset.exists %}
{{ page_form.organization.help_text }}
{% render_field page_form.organization|add_error_class:"border-red-500" %}
{% endif %}
{% if page %}
{% if can_edit_page %}

{% trans 'Actions' %}

{% if page.explicitly_archived %} {% elif page.implicitly_archived %} {% for ancestor in page.explicitly_archived_ancestors %} {{ ancestor.best_translation.title }} {% endfor %} {% else %} {% endif %} {% if perms.cms.delete_page %} {% if not page.is_leaf %} {% with page.get_descendants.prefetch_translations as descendants %} {% for descendant in descendants %} {{ descendant.best_translation.title }} {% endfor %} {% endwith %} {% else %} {% endif %} {% endif %}
{% endif %}

{% trans 'Translator view' %}

{% trans 'Show translator view' %}
{% endif %}
{{ media_config_data|json_script:"media_config_data" }} {% if not can_edit_page or page_form.instance.id and page_form.instance.archived %} {% include '../_tinymce_config.html' with readonly=1 %} {% else %} {% include '../_tinymce_config.html' %} {% endif %} {% include "../generic_confirmation_dialog.html" %} {% endblock content %} {% block javascript %} {% render_bundle 'editor' 'js' %} {% endblock javascript %}