flightreservation.html 3.78 KB
Newer Older
1
2
<table style="width:100%;">
    <tr>
3
4
5
6
7
8
9
10
        <td style="width:33%;" title="{{ trip.departureAirport.name }}">
            {% if trip.departureAirport.iataCode %}
                <span style="font-size:200%;">{{ trip.departureAirport.iataCode }}
            {% else %}
                <span style="font-size:120%;">{{ trip.departureAirport.name }}
            {% endif %}
            {% with trip.departureAirport as location %}{% include "org.kde.messageviewer/itinerary/location.html" %}{% endwith %}</span>
        </td>
11
12
13
14
15
16
17
        <td style="font-size:200%; width:33%; text-align:center;">
        {% if elem.reservations.0.reservation.reservationStatus == 1 %}
            {% icon "dialog-cancel" sizemedium _("Reservation canceled.") %}
        {% else %}
            &#9992;
        {% endif %}
        </td>
18
19
20
21
22
23
24
25
        <td style="width:33%;" title="{{ trip.arrivalAirport.name }}">
            {% if trip.arrivalAirport.iataCode %}
                <span style="font-size:200%;">{{ trip.arrivalAirport.iataCode }}
            {% else %}
                <span style="font-size:120%;">{{ trip.arrivalAirport.name }}
            {% endif %}
            {% with trip.arrivalAirport as location %}{% include "org.kde.messageviewer/itinerary/location.html" %}{% endwith %}</span>
        </td>
26
27
    </tr>
    <tr>
28
29
30
31
32
33
34
        <td>
            {% if trip.departureTime %}
                {{ trip.departureTime|formatDateTime }}
            {% else %}
                {{ trip.departureDay|formatDate }}
            {% endif %}
        </td>
35
36
        <td style="white-space: nowrap; text-align:center;" title="{{ trip.airline.name }}">{{ trip.airline.iataCode }} {{ trip.flightNumber }}</td>
        <td>{{ trip.arrivalTime|formatDateTime }}</td>
37
    </tr>
38
    <tr><td colspan="3">
39
        <div style="float:left">
40
41
        {% if elem.reservations.0.ticketToken or elem.reservations.size > 1 %}
            <a href="x-kmail:/bodypart/0//semanticExpand?{{ elem.groupId }}">
42
43
44
45
46
47
48
            {% if elem.state.expanded %}
                <img src="{{ style.collapseIcon }}" style="margin-right: 4px;"/>
            {% else %}
                <img src="{{ style.expandIcon }}" style="margin-right: 4px;"/>
            {% endif %}
            </a>
        {% endif %}
49
50
        {% if trip.departureGate %}
            {% i18n "Gate: %1" trip.departureGate %}
51
52
        {% endif %}

53
54
        {% if trip.boardingTime %}
            {% i18n "Boarding: %1" trip.boardingTime|formatTime %}
55
56
        {% endif %}

57
58
        {% if res.boardingGroup and elem.reservations.size == 1 and not elem.state.expanded %}
            {% i18n "Group: %1" res.boardingGroup %}
59
60
        {% endif %}

61
62
        {% if res.airplaneSeat and elem.reservations.size == 1 and not elem.state.expanded %}
            {% i18n "Seat: %1" res.airplaneSeat %}
63
64
        {% endif %}
        </div>
65
        {% if elem.reservations.size == 1 %}
Volker Krause's avatar
Volker Krause committed
66
            {% include "org.kde.messageviewer/itinerary/actions.html" %}
67
        {% endif %}
68
    </td></tr>
69
</table>
70
71

{% if elem.state.expanded %}
72
73
74
75
76
77
78
79
    {% for d in elem.reservations %}
        {% with d.reservation as res %}
        {% if res.underName.name %}
            <div>{{ res.underName.name }}</div>
        {% endif %}
        <div>
        {% if res.boardingGroup %} {% i18n "Group: %1" res.boardingGroup %} {% endif %}
        {% if res.airplaneSeat %} {% i18n "Seat: %1" res.airplaneSeat %} {% endif %}
80
        </div>
81
82
83
84
85
86
87
        {% if d.ticketToken %}
            <div style="text-align:center;">
                <div style="background-color: #ffffff; display: inline-block; padding: 4px;">
                <img src="{{ d.ticketToken }}"/>
                </div>
            </div>
        {% endif %}
88
        {% if elem.reservations.size > 1 %}
Volker Krause's avatar
Volker Krause committed
89
            {% include "org.kde.messageviewer/itinerary/actions.html" %}
90
        {% endif %}
91
92
        {% endwith %}
    {% endfor %}
93
{% endif %}