{% extends "base.html" %} {% from '_archive.html' import show_archived_toggle %} {% block title %}Timeline{% if scope_type %} — {{ entity_label }}{% endif %}{% endblock %} {% block content %} {%- set view = view_mode or 'notes' -%} {# Build the base URL for the current scope so the view toggle preserves it. #} {%- if is_global -%} {%- set view_base = '/timeline' -%} {%- if scope_type and scope_id -%}{%- set view_base = view_base ~ '?scope_type=' ~ scope_type ~ '&scope_id=' ~ scope_id -%}{%- endif -%} {%- else -%} {%- set view_base = '/timeline/' ~ entity_type ~ '/' ~ entity_id -%} {%- endif -%} {%- set view_join = '&' if '?' in view_base else '?' -%} {% if is_global %}

Timeline

{{ 'All mutations, newest first.' if view == 'log' else 'All garden commentary, newest first.' }} {{ show_archived_toggle(show_archived, '/timeline') }}

{% else %}

Timeline — {{ entity_type }}: {{ entity_label }}

{{ show_archived_toggle(show_archived, '/timeline/' ~ entity_type ~ '/' ~ entity_id) }}

{% endif %}
{% if view == 'notes' %}✓{% else %}○{% endif %} Notes {% if view == 'log' %}✓{% else %}○{% endif %} Detailed log
{# ---- Filter bar ---- #} {% if filter_options %}
{# keep current children/related on scope change via the hidden inputs below; parsed server-side #} {% if include_children %}{% else %}{% endif %} {% if include_related %}{% else %}{% endif %}
{% if scope_type %}
{% if supports_children %} {% set children_flip = 0 if include_children else 1 %} {% if include_children %}✓{% else %}○{% endif %} child comments {% endif %} {% set related_flip = 0 if include_related else 1 %} {% if include_related %}✓{% else %}○{% endif %} related comments × clear filter
{% endif %} {% endif %} {% if view == 'log' %} {% if log_entries %} {% else %}

No mutations recorded{% if scope_type %} for this {{ scope_type }}{% endif %}.

{% endif %} {% else %} {% if comments %} {% else %}

No comments{% if scope_type %} matching this filter{% endif %} yet.

{% endif %} {% endif %} {% endblock %}