{% extends "base.html" %} {#- One project document. Expects: project, doc (with shown_version and author), body_html, toc (headings of level 1-2, each with the deeper ones under it), versions (newest first; none for a file document), changes (a file document's document.updated events), edit_url (None for an older version, a document that lives in a repository or in a file), q, hits and search_error (search in this document), optional message. -#} {%- macro version_select(name, selected) -%} {%- endmacro %} {%- macro toc_link(r) -%} {{ r.title or r.anchor }} {{ r.chars|chars }} {%- endmacro %} {% block title %}{{ doc.title }} · {{ project.name }} · relaybay{% endblock %} {% block scripts %}{% endblock %} {% block crumbs %}/{{ project.name }}/Docs & rules/{{ doc.slug }}{% endblock %} {% block content %}

{{ doc.title }}

{{ doc.slug }} · {{ doc.kind }} · {% if doc.is_file %}a file on disk{% elif doc.shown_version == doc.version %}version {{ doc.version }}{% else %}version {{ doc.shown_version }} of {{ doc.version }} · current{% endif %}{% if doc.author %} · by {{ doc.author }}{% endif %} {% if edit_url %}Edit{% endif %}
{% if message %}

{{ message }}

{% endif %} {% if doc.source_url %}{% set repo_href = doc.source_url|http_url %}

Lives in the repository: {% if repo_href %}{{ doc.source_url }}{% else %}{{ doc.source_url }}{% endif %}. Change it there; the board does not edit it.

{% endif %} {% if doc.is_file %}

Lives in {{ doc.place or doc.source_path }}{% if doc.place and doc.place != doc.source_path %} ({{ doc.source_path }}){% endif %}{% if doc.file_seen_at %} · read {% endif %} · changed {% if doc.file_hash %} · hash {{ doc.file_hash[:12] }}{% endif %}{% if doc.masked_lines %} · {{ doc.masked_lines }} line(s) masked in the index{% endif %}. The board does not edit it; {% if doc.file_writable %}doc_update writes it (writes through relaybay are on){% else %}edit the file itself (writes through relaybay are off){% endif %}.

{% if doc.file_problem %}{% endif %} {% endif %} {% if q %}

Search: {{ q }} {{ hits|length }}

{% if search_error %} {% elif hits %} {% else %}

Nothing found in this document.

{% endif %}
{% endif %}
{% if toc %} {% endif %} {% if doc.body or not (doc.source_url or doc.is_file) %}
{{ body_html }}
{% endif %}
{% if doc.is_file %}

Changes seen in the file {{ changes|length }}

{% else %}

History {{ versions|length }}

{% if versions|length > 1 %}
{% endif %} {% endif %}
{% endblock %}