{% load humanize %} {% load notification_tags %} {% comment %} REP_LIVE_SESSION_STARTING — countdown card with prominent Join now button. Expects on notification.data: - course_title: string - session_title: string - session_id: int - course_slug: string - starts_at: ISO 8601 string - minutes_until: int (snapshot at notification time) notification.action_url is the canonical session_join URL; the notification_go redirect path marks the row read on click. {% endcomment %} {% with d=notification.data %}
{% if not notification.is_read %} {% endif %} {# Live-now / starting-soon accent rail. ≤5 min gets the live-pulse green. #} {% if d.minutes_until <= 5 %} {% endif %} {% notification_icon notification.verb %}

{{ d.course_title|default:"Live session" }}

{{ d.session_title|default:notification.message|truncatechars:80 }}

{% if d.minutes_until <= 0 %} Live now — join immediately {% elif d.minutes_until == 1 %} Starts in 1 minute {% elif d.minutes_until <= 5 %} Starts in {{ d.minutes_until }} minutes {% else %} Starts in {{ d.minutes_until }} minutes {% endif %} {% if d.starts_at %} · {% endif %}

{% if not notification.is_read %} New {% endif %}
{% if notification.action_url %} {% if d.minutes_until <= 0 %}Join now{% else %}Join{% endif %} {% endif %} {% if not notification.is_read %}
{% csrf_token %}
{% endif %}
{% endwith %}