{#- A wiki page as it reads: its text, the links to other pages (a page not written yet dashed), its files, who changed it last; editing in sight, the rest behind ⋮. Drawn in `mockups/templates/wiki-page.html`. -#} {% extends "wiki/_base.html" %} {% import "wiki/macros.html" as w with context %} {% set last = page.last_revision %} {% set kw = {"community_id": g.community.slug, "title": page.title} %} {% block wiki_title %}{{ page.title }}{% endblock %} {% block wiki_content %}
{{ w.page_head(page) }} {%- if last.author %}{{ _("Modified by") }} {{ m.avatar(last.author, "ads-avatar--xs") }}{{ last.author.name }},{% else %}{{ _("Modified") }}{% endif %} {{ m.time(last.created_at) }} · {{ ngettext("%(num)d revision", "%(num)d revisions", page.revisions | length) }}
{{ icon("pencil") }}{{ _("Edit") }}
{{ icon("dots-vertical") }}
{{ icon("history") }}{{ _("History") }} {{ icon("file-text") }}{{ _("Source") }} {% if viewers %}{{ icon("eye") }}{{ _("Readers list") }}{% endif %}
{{ page.body_html | safe }}
{% if page.attachments %}

{{ _("Attachments") }}

{% endif %}
{% endblock %} {% block overlays %} {% call w.dialog("upload-files", _("Attach files to the page"), url_for(".attachment_upload", **kw), "upload") %} {% endcall %} {% call w.dialog("modal-delete", _("Delete the page “%(title)s”?", title=page.title), url_for(".page_delete", community_id=g.community.slug), danger=true) %}

{{ _("Its text and its history go for everyone in the community. This cannot be undone.") }}

{% endcall %} {% for attachment in page.attachments %} {% call w.dialog("modal-delete-attachment-%d" % attachment.id, _("Delete “%(name)s”?", name=attachment.name), url_for(".attachment_delete", attachment=attachment.id, **kw), danger=true) %}

{{ _("It goes for everyone in the community. This cannot be undone.") }}

{% endcall %} {% endfor %} {% endblock %}