{#- What the wiki's views share. Imported `with context`. -#} {#- The path to a page and its title, at the head of the page and of each of its views; `view` names the view. -#} {% macro page_head(page, view="") %}
  1. {{ _("Wiki") }}
  2. {% if view %}
  3. {{ page.title }}
  4. {% endif %}

{{ view or page.title }}

{% endmacro %} {#- Lines of a comparison (`difflib`): " " kept, "- " gone, "+ " new, each with its sign for those who do not see the colours. -#} {% macro diff_lines(diff, label) %}
    {% for line in diff %} {% set op = line[0] %}
  1. {%- if op == "-" %}{{ _("Removed:") }} {% elif op == "+" %}{{ _("Added:") }} {% endif -%} {{ line[2:] | trim("\n") }}
  2. {% endfor %}
{% endmacro %} {#- A dialog holding a form: a title, what it says, Cancel and the button that sends it, named `action` with `value` (the attachment views read it). -#} {% macro dialog(id, title, action, value="", danger=false) %}
{{ csrf.field() }}

{{ title }}

{{ caller() }}
{% if danger %} {% else %} {% endif %}
{% endmacro %}