{#- Writing a wiki page, new or not: its title, its text in Markdown, its files, and a word on what changed, which the history shows. If someone saved it meanwhile, the error under the text says what each changed. The text shows beside it as the page will, as it is typed (`vite/src/preview.js`). Files are attached or removed when the page is saved: a file to remove is a ticked box, with no script. Drawn in `mockups/templates/wiki-edit.html`. -#} {% extends "wiki/_base.html" %} {% import "wiki/macros.html" as w with context %} {% import "forum/_post_fields.html" as fields %} {% set creating = not (page and page.id) %} {% block wiki_title %}{{ _("New page") if creating else _("Edit the page") }}{% endblock %} {% block wiki_content %}
{{ form.csrf_token }}{{ form.page_id }}{{ form.last_revision_id }}
{% if creating %}
  1. {{ _("Wiki") }}

{{ _("New page") }}

{% else %}{{ w.page_head(page, _("Edit the page")) }}{% endif %}
{{ fields.errors(form.title) }}
{#- Side by side while both fit, the preview under the text on a narrow screen. -#}
{{ _("In Markdown: **bold**, ## heading, - list, [[Title of a page]] for a link to another page.") }} {{ _("Syntax help") }} {{ fields.errors(form.body_src) }}
{{ _("Preview") }}
{{ m.files_field([] if creating else page.attachments) }}
{{ _("Optional. The page's history shows it, with your name and the date.") }}
{{ _("Cancel") }}
{% endblock %}