{% 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 %} {% if page_form.instance.id and can_edit_page and not page.archived %}
{% csrf_token %}
{% endif %}
{% 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 %} ({% translate "Title in" %} {% translated_language_name LANGUAGE_CODE %}: "{{ page.backend_translation.title }}") {% endif %} {% endif %} {% else %} {% translate "Create new translation" %} {% endif %} {% else %} {% translate "Create new page" %} {% endif %}

{% if not page_form.instance.id or not page_form.instance.archived %}
{% has_perm 'cms.publish_page_object' request.user page as can_publish_page %} {% if can_publish_page %} {% elif can_edit_page %} {% 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 %}
{% translate "Translation in progress" %} ({% translate "Cancel translation process" %})
{% endif %}
{% if page_translation_form.instance.id %}
{% translate "Version" %}:
{{ page_translation_form.instance.version }} ({% translate "Show" %})
{% translate "Publication status" %}:
{% if page.explicitly_archived %} {% translate "Archived" %} {% elif page.implicitly_archived %} {% translate "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 %} {% endif %} {% endif %} {% render_field page_translation_form.content class+="tinymce_textarea flex-auto" %}
{% if language.slug in TEXTLAB_API_LANGUAGES and request.region.hix_enabled and TEXTLAB_API_ENABLED %} {% include "../hix_widget.html" %} {% endif %} {% if page %} {% include "./page_form_sidebar/minor_edit_box.html" with box_id="page-minor-edit" %} {% endif %} {% include "./page_form_sidebar/settings_box.html" with box_id="page-setting" %}
{% if page %}
{% if can_edit_page %} {% include "./page_form_sidebar/actions_box.html" with box_id="page-actions" %} {% endif %} {% include "./page_form_sidebar/translator_view_box.html" with box_id="page-side-by-side" %}
{% 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" %} {% if page_form.instance.id %} {% include "../_content_edit_lock.html" with lock_key=page.edit_lock_key %} {% endif %} {% endif %} {% include "../generic_confirmation_dialog.html" %} {% include "pages/_page_preview_overlay.html" %} {% endblock content %} {% block javascript %} {% render_bundle "editor" "js" %} {% endblock javascript %}