{% extends "layout.html" %} {% block body %}
{% for vehicle in current_user.vehicles %} {% set vehicleloop = loop %}

{{vehicle.name}}

{% if vehicle.pitstops %} {% for pitstop in vehicle.pitstops|reverse %}
Date {{pitstop.date}}
Odometer {{pitstop.odometer}} km
{{ pitstop.consumable.name }} {{pitstop.amount}} {{ pitstop.consumable.unit }}
Costs {% if pitstop.costs %} {{pitstop.costs}} € {% else %} -- € {% endif %}
{% if loop.first %} edit delete {% endif %}
{% endfor %} {% else %} {% endif %}
{% endfor %}
{% endblock %}