{% load i18n %}{% load molly_utils %}{% load molly_maps %}{% load compressed %}
<!DOCTYPE html>
<html>
<head>
    <title>{{ tour.name }}</title>
    {% compressed_css 'tours-print' %}
</head>
<body>
    <!-- Icons on this page are from FamFamFam silk, CC-BY http://www.famfamfam.com/lab/icons/silk/ -->
    <h1>{{ tour.name }}</h1>
    
    {% if first_directions %}
        {% if p_and_r %}
            <h2>{% blocktrans with p_and_r.start.title as start and p_and_r.closest_stop.title as end %}Park &amp; Ride from {{ start }} to {{ end }}{% endblocktrans %}</h2>
            <p>{% blocktrans count p_and_r.routes|length as num_routes with p_and_r.routes|join:', ' as route_numbers and p_and_r.start.title as start and p_and_r.origin_stop.entity.title as origin_stop %}At {{ start }} take service {{ route_numbers }} from {{ origin_stop }}.{% plural %}At {{ start }} take any of services {{ route_numbers }} from stop {{ origin_stop }}.{% endblocktrans %}
            <p>{% blocktrans with p_and_r.closest_stop.title as end %}When the service reaches {{ end }}, disembark and continue by foot using the directions below.{% endblocktrans %}</p>
        {% endif %}
        
        <h2>{% blocktrans with directions_end.title as dest_title and directions_start.title as origin_title %}Directions from {{ origin_title }} to {{ dest_title }}{% endblocktrans %}</h2>
        <p>{% blocktrans with first_directions.total_time|humanise_seconds as time and first_directions.total_distance|humanise_distance as distance %}This route will take {{ time }} and cover {{ distance }}.{% endblocktrans %}</p>
        <ol class="directions-list">
            {% for waypoint in first_directions.waypoints %}
            <li class="direction-{{ waypoint.waypoint_type }}">
                {{ waypoint.instruction }}<br />
                <span class="additional">{{ waypoint.additional }}</span>
                {% if waypoint.map %}{% render_map waypoint.map 'printable' %}{% endif %}
            </li>
            {% endfor %}
        </ol>
        
    {% endif %}
    
    {% for stop in stops %}
        {% if stop.directions_to %}
            <h2>{% blocktrans with stop.entity.title as dest_title %}Directions to {{ dest_title }}{% endblocktrans %}</h2>
            <p>{% blocktrans with stop.directions_to.total_time|humanise_seconds as time and stop.directions_to.total_distance|humanise_distance as distance %}This route will take {{ time }} and cover {{ distance }}.{% endblocktrans %}</p>
            <ol class="directions-list">
                {% for waypoint in stop.directions_to.waypoints %}
                    <li class="direction-{{ waypoint.waypoint_type }}">
                        <p>{{ waypoint.instruction }}<br />
                        <span class="additional">{{ waypoint.additional }}</span></p>
                        <p>{% render_map waypoint.map 'printable' %}</p>
                    </li>
                {% endfor %}
            </ol>
        {% endif %}
        
        <h2>{{ stop.entity.title }}</h2>
        <p>{% render_location_map stop.entity.location 'printable' %}</p>
        {% if stop.description %}{{ stop.description }}{% endif %}
        
    {% endfor %}
    
    <p>{% trans 'Please note that the route information provided should be followed at your own risk.' %}</p>
    {% url maps:osm-about as about_link %}
    <p>{% blocktrans %}Maps &copy; <a href="{{ about_link }}">OpenStreetMap</a> and contributors, CC-BY-SA{% endblocktrans %}</p>
 
</body>
</html>
