{% extends "base.html" %}
{% block content %}
    <h2>List of Leeway Simulations</h2>
    <table border=0>
        <tr>
            <th>ID</th>
            <th>Longitude</th>
            <th>Latitude</th>
            <th>Start Time</th>
            <th>Duration</th>
            <th>Radius</th>
            <th>Result</th>
        </tr>
        {% for simulation in simulations %}
            <tr>
                <td>{{ simulation.uuid }}</td>
                <td>{{ simulation.longitude }}</td>
                <td>{{ simulation.latitude }}</td>
                <td>{{ simulation.start_time }}</td>
                <td>{{ simulation.duration }}</td>
                <td>{{ simulation.radius }}</td>
                <td>
                    {% if simulation.error %}
                        <a href="{% url "simulation_detail" pk=simulation.pk %}">Error</a>
                    {% endif %}
                    {% if simulation.img %}<a href="{{ simulation.img.url }}">Image</a>{% endif %}
                    {% if simulation.netcdf %}<a href="{{ simulation.netcdf.url }}">NetCDF</a>{% endif %}
                    <a href="{% url "simulation_delete" pk=simulation.pk %}">Delete</a>
                </td>
            </tr>
        {% endfor %}
    </table>
{% endblock content %}
