{% load molly_utils %}{% load i18n %}{% if entity.metadata.ldb %}

{{ entity.title }} ({% if board %}{% trans board %}{% else %}{% trans "departures" %}{% endif %}) - {{ entity.metadata.ldb.generatedAt|localize_utc|date:"H:i:s" }}

{% if entity.metadata.ldb.nrccMessages.message %} {% endif %} {% if entity.metadata.ldb.platformAvailable %} {% endif %} {% if entity.metadata.ldb.error %} {% else %} {% for service in entity.metadata.ldb.trainServices.service %} {% if entity.metadata.ldb.platformAvailable %} {% endif %} {% ifequal board "arrivals" %} {% else %} {% endifequal %} {% empty %} {% endfor %} {% endif %}
{% ifequal board "arrivals" %} {% trans "Origin" %} {% else %} {% trans "Destination" %} {% endifequal %} {% trans "Plat." %}{% trans "Scheduled" %} {% trans "Expected" %}

{% trans "There is currently a problem retrieving live departure information from the National Rail web site." %}

{% blocktrans with entity.identifiers.crs as crs %}Departure information may still be accesseddirectly from their web site.{% endblocktrans %}

{# This isn't that straight-forward - trains can split and go to multiple destinations #} {% ifequal board "arrivals" %} {% for location in service.origin.location %} {% if not forloop.first and not forloop.last %}, {% endif %} {% if not forloop.first and forloop.last %} & {% endif %} {% if not forloop.first %}
{% endif %} {{ location.locationName }} {% if location.via %}
{{ location.via }}{% if not forloop.last %}
{% endif %}{% endif %} {% endfor %} {% else %} {% for location in service.destination.location %} {% if not forloop.first and not forloop.last %}, {% endif %} {% if not forloop.first and forloop.last %} & {% endif %} {% if not forloop.first %}
{% endif %} {{ location.locationName }} {% if location.via %}
{{ location.via }}{% if not forloop.last %}
{% endif %}{% endif %} {% endfor %} {% endifequal %} {% if service.isCircularRoute %}
({% trans "Circular Route" %}){% endif %}
{{ service.platform }}{{ service.sta }} {{ service.eta }}{{ service.std }} {{ service.etd }}
{% ifequal board "arrivals" %} {% trans "There are currently no scheduled arrivals." %} {% else %} {% trans "There are currently no scheduled departures." %} {% endifequal%}
{% for attribution in attributions %} {% trans "For more information" %}
{{ attribution.title }}
{% endfor %}
{% endif %}