{% extends "base.html" %} {% block main_class %}grid-page{% endblock %} {% block content %}

{{ t('plan_title') }}

◀ {{ t('plan_today') }} ▶ {{ p.start.isoformat()|date }} – {{ p.last|date }} {{ t('plan_weeks_4') }} {{ t('plan_weeks_8') }} {{ t('plan_guests_one') if p.guests_today == 1 else t('plan_guests', guests=p.guests_today) }} · {{ t('plan_free_one') if p.free_beds == 1 else t('plan_free', free=p.free_beds) }}
{% for m in p.months %}
{{ m.text }}
{% endfor %}
{% for d in p.days %}
{% if p.n_days <= 35 %}{{ d.dom }}{{ d.wd }} {% elif d.monday %}{{ d.label }}{% endif %}
{% endfor %}
{% for r in p.rooms %}
{{ t('plan_room', number=r.number) }} {% if r.long_term %} {{ t('plan_longterm_short') }} {% else %} {{ r.today_count }}/{{ r.capacity }} {% endif %}
{{ r.category }} · {{ r.unit }}
{# day lines live in their own full-height overlay: as grid items they could neither overlap the bars (auto-placement) nor reach below the last lane when the room label makes the row taller than the lane stack #}
{% for d in p.days %}{% endfor %}
{% if r.long_term and not r.bars %}
{{ t('plan_longterm') }}
{% endif %} {% for b in r.bars %} {{ b.name }} {% endfor %}
{% endfor %}
{{ t('plan_legend_current') }} {{ t('plan_legend_past') }} {{ t('plan_legend_future') }} {{ t('plan_legend_today') }} {% if p.unplaced %} {{ t('plan_no_room') }} {% for u in p.unplaced %} {{ u.name }} ({{ u.arrival|date }} – {{ u.departure|date if u.departure else t('plan_open') }}){{ ', ' if not loop.last }} {% endfor %} {% endif %}
{% endblock %}