{% from 'components/page-heading.html' import page_heading %} {% from 'components/pagination.html' import pagination %} {% if topic_artifact and topic_revision %}
← {{ t.topic_inventory }} {% if errors.get('topic_memory_selected') %}{{ read_error(errors.topic_memory_selected,t.topic_memory) }}{% elif data.topic_memory_selected %}{% set topic=data.topic_memory_selected %}
{{ t.topic_memory }} · {{ t.revision }} {{ topic.artifact.revision }}{{ t.current_revision if topic.is_current else t.historical_revision }}

{{ topic.title }}

{{ topic.summary }}

{% if not topic.is_current %}{{ t.view_current_revision }} →{% endif %}
{{ topic.detail|markdown }}
{{ t.source_references }}{% for source in topic.source_refs %}

{% if source.name == 'content' %}{{ t.source_original }} {{ loop.index }} →{% else %}{{ source.name }}/{{ source.source_id }}{% endif %}

{% else %}

{{ t.no_sources }}

{% endfor %}
{% endif %}{% include 'components/revision-history.html' %}
{{ t.topic_inventory }}{% for item in data.topic_memory %}{{ item.title }}{% endfor %}{{ pagination(topic_memory_pager,t) }}
{% else %}{{ page_heading(t.topic_memory,t.topics_subtitle) }} {% if errors.get('topic_memory') %}{{ read_error(errors.topic_memory,t.topic_memory) }}{% endif %}
{% for item in data.topic_memory %}

{{ item.title }}

{{ item.summary|truncate(240,true) }}

{{ t.revision }} {{ item.artifact.revision }} {{ t.full_detail }} →
{% else %}{% if not errors.get('topic_memory') %}

{{ t.topic_memory_empty }}

{{ t.topic_memory_empty_body }}

{% endif %}{% endfor %}
{{ pagination(topic_memory_pager,t) }}{% endif %}