{% comment %}Render a simple leave list with data attributes so client JS can read them{% endcomment %}
{% for l in leaves %}
{{ l.start_date }} → {{ l.end_date }}{% if l.reason %} ({{ l.reason }}){% endif %}
{% comment %}Only show delete control when the current request is allowed to delete:{% endcomment %}
{% if request.user.is_staff or request.user.is_authenticated and request.user.email and request.user.email == l.worker.email or token %}
{% endif %}