{% for elem in data %}
{% with elem.reservations.0.reservation as res %}
{% with elem.reservations.0.reservation.reservationFor as trip %}
{% if res.className == "FlightReservation" %}
{% include ":/org.kde.messageviewer/semantic/flightreservation.html" %}
{% elif res.className == "LodgingReservation" %}
{% include ":/org.kde.messageviewer/semantic/lodgingreservation.html" %}
{% elif res.className == "TrainReservation" %}
{% include ":/org.kde.messageviewer/semantic/trainreservation.html" %}
{% elif res.className == "BusReservation" %}
{% include ":/org.kde.messageviewer/semantic/busreservation.html" %}
{% endif %}
{% if not forloop.last %}
{% endif %}
{% endwith %}
{% endwith %}
{% endfor %}