{% extends "base.html" %} {% block title %}{{ 'New page' if is_new else 'Editing ' + page.title }} — Waikiki{% endblock %} {% block content %} {% if missing %}

No page “{{ missing }}” yet — create it below.

{% endif %} {% if collab %}
Live editing
{% endif %} {# Pin the target wiki explicitly. Without it these writes resolve via the cookie, so opening this editor with ?wiki=X while the cookie says Y would silently save your work into Y. #}
{%- if cap_state.generation == 'unavailable' %} {# No id="ai-go": the editor script binds on that id, and there is nothing here for it to bind to. The control stays visible, greyed, and points at the fix instead of streaming an error into the page. #} ✦ Generate {# Guests can't open Settings (auth.guest_may), so pointing one there would be a dead end. They get the state without the link. #} unavailable{% if role != 'guest' %} — see Capabilities{% endif %} {%- else %} {%- endif %}
{# In collab mode the textarea starts empty; the CRDT room delivers the content. #}
{% if not is_new %}Done{% endif %}
{# Where a page sits in the tree is part of writing it, so it lives here rather than in Page options. Its own form on purpose: nested forms are invalid HTML, and moving a page is a separate action from saving its text. #} {% if not is_new %}
Children are hidden from the sidebar and the main search.
{% endif %} {% endblock %} {% block scripts %} {% endblock %}