{#- vim: set et ts=8 sts=4 sw=4 ai: -#} {% extends "page.html" %} {% from "snippets/diff_side_by_side.html" import diff_side_by_side %} {% block content %} {#- the delta is empty for less than a second ago -#} {%- macro time_ago(datetime) -%} {%- set ago = datetime|format_datetime("deltanow") -%} {{ ago ~ " ago" if ago else "just now" }} {%- endmacro -%} {%- set draft_saved = time_ago(draft_datetime) -%} {#- discarding the draft opens the editor with the latest saved version, which is the left side of the diff, unless the page has been changed since the draft was started -#} {%- if not changes %} {%- set discard_label = "Discard draft" %} {%- elif page_exists %} {%- set discard_label = "Discard draft, edit latest version" %} {%- else %} {%- set discard_label = "Discard draft, start a new page" %} {%- endif %} {%- macro draft_button(action, label, classes) -%}
{%- endmacro %}Compared to the stored version, since the version the draft is based on is not available.
{% endif %} {% if draft_diff %} {%- macro revision_link(revision) -%} {%- if page_exists %} {{revision}} {%- else %} {{revision}} {%- endif -%} {%- endmacro %} {% call diff_side_by_side(draft_diff, id="draft-diff") %}The draft has no changes.
{% endif %} {% endblock %}