{# One timeline entry's parts, shared by the Timeline page and a host's card. `item` is a timeline.service.view() row. #} {# What happened: its kind, the sentence, a note, and the full record while it is kept; a change the reader recorded (or any, for an admin) can be edited, returning to `back`. #} {% macro entry_what(item, back="/timeline/") -%} {%- set e = item.entry -%}
{%- if item.kind_label %}{{ item.kind_label }} · {% endif -%} {{ e.summary }}
{%- if item.note %}
{{ item.note }}
{% endif %} {%- if item.url %}
Details
{%- elif item.gone %}
Details no longer kept
{% endif %} {%- if item.editable %}
Edit
{% endif %} {%- endmacro %} {# Where: the hosts it happened on, each linked to its timeline, and what it happened to. #} {% macro entry_where(e) -%} {%- for h in e.hosts %}{{ h }}{{ ", " if not loop.last }}{% endfor -%} {%- if e.subject and e.subject not in e.hosts %}{% if e.hosts %}
{% endif %}{{ e.subject }}{% endif -%} {%- if not e.hosts and not e.subject %}—{% endif -%} {%- endmacro %}