Commit 4e1abb28 authored by Volker Krause's avatar Volker Krause

Add support for boarding pass download actions

Also, make the visual representations of inline actions a bit more compact.
parent 19db1590
......@@ -195,6 +195,7 @@ class FlightReservation : protected Reservation
// Google extensions
SEMANTIC_PROPERTY(QString, airplaneSeat)
SEMANTIC_PROPERTY(QString, boardingGroup)
SEMANTIC_PROPERTY(QUrl, ticketDownloadUrl)
};
class TrainReservation : protected Reservation
......
......@@ -22,20 +22,43 @@
<td>{{ item.reservationFor.arrivalTimeLocalized }}</td>
</tr>
<tr><td colspan="3">
{% if item.reservationFor.departureGate %}
{% i18n "Gate: %1" item.reservationFor.departureGate %}
{% endif %}
<div style="float:left">
{% if item.reservationFor.departureGate %}
{% i18n "Gate: %1" item.reservationFor.departureGate %}
{% endif %}
{% if item.reservationFor.boardingTimeLocalized %}
{% i18n "Boarding: %1" item.reservationFor.boardingTimeLocalized %}
{% endif %}
{% if item.boardingGroup %}
{% i18n "Group: %1" item.boardingGroup %}
{% endif %}
{% if item.airplaneSeat %}
{% i18n "Seat: %1" item.airplaneSeat %}
{% endif %}
</div>
<div style="float:right">
{% if item.ticketDownloadUrl %}
<a href="{{ item.ticketDownloadUrl }}">{% i18n "Download" %}</a>
{% if item.url or item.modifyReservationUrl or item.cancelReservationUrl %}|{% endif %}
{% endif %}
{% if item.reservationFor.boardingTimeLocalized %}
{% i18n "Boarding: %1" item.reservationFor.boardingTimeLocalized %}
{% endif %}
{% if item.url %}
<a href="{{ item.url }}"/>{% i18n "View" %}</a>
{% if item.modifyReservationUrl or item.cancelReservationUrl %}|{% endif %}
{% endif %}
{% if item.boardingGroup %}
{% i18n "Group: %1" item.boardingGroup %}
{% endif %}
{% if item.modifyReservationUrl %}
<a href="{{ item.modifyReservationUrl }}"/>{% i18n "Modify" %}</a>
{% if item.cancelReservationUrl %}|{% endif %}
{% endif %}
{% if item.airplaneSeat %}
{% i18n "Seat: %1" item.airplaneSeat %}
{% endif %}
{% if item.cancelReservationUrl %}
<a href="{{ item.cancelReservationUrl }}"/>{% i18n "Cancel" %}</a>
{% endif %}
</div>
</td></tr>
</table>
<div style="font-size:125%;">{{ item.reservationFor.name }} {{ item.checkinDateLocalized }} - {{ item.checkoutDateLocalized }}</div>
<div>{{ item.reservationFor.address.streetAddress }}</div>
<div>{{ item.reservationFor.address.postalCode }} {{ item.reservationFor.address.addressLocality }}</div>
<div>{{ item.reservationFor.address.addressCountry }}</div>
<div style="float:left;">{{ item.reservationFor.address.addressCountry }}</div>
<div style="float:right;">
{% if item.url %}
<a href="{{ item.url }}"/>{% i18n "View" %}</a>
{% if item.modifyReservationUrl or item.cancelReservationUrl %}|{% endif %}
{% endif %}
{% if item.modifyReservationUrl %}
<a href="{{ item.modifyReservationUrl }}"/>{% i18n "Modify" %}</a>
{% if item.cancelReservationUrl %}|{% endif %}
{% endif %}
{% if item.cancelReservationUrl %}
<a href="{{ item.cancelReservationUrl }}"/>{% i18n "Cancel" %}</a>
{% endif %}
</div>
<div style="clear:both;"></div>
......@@ -11,18 +11,6 @@
{% include ":/org.kde.messageviewer/semantic/trainreservation.html" %}
{% endif %}
{% if item.url %}
<a href="{{ item.url }}"/>{% i18n "View..." %}</a>
{% endif %}
{% if item.modifyReservationUrl %}
<a href="{{ item.modifyReservationUrl }}"/>{% i18n "Modify..." %}</a>
{% endif %}
{% if item.cancelReservationUrl %}
<a href="{{ item.cancelReservationUrl }}"/>{% i18n "Cancel..." %}</a>
{% endif %}
{% if not forloop.last %}
<hr/>
{% endif %}
......
......@@ -21,13 +21,32 @@
</td>
<td>{{ item.reservationFor.arrivalTimeLocalized }}</td>
</tr>
<tr colspan="3"><td>
{% if item.reservedTicket.ticketedSeat.seatSection %}
{% i18n "Coach: %1" item.reservedTicket.ticketedSeat.seatSection %}
{% endif %}
<tr><td colspan="3">
<div style="float:left">
{% if item.reservedTicket.ticketedSeat.seatSection %}
{% i18n "Coach: %1" item.reservedTicket.ticketedSeat.seatSection %}
{% endif %}
{% if item.reservedTicket.ticketedSeat.seatNumber %}
{% i18n "Seat: %1" item.reservedTicket.ticketedSeat.seatNumber %}
{% endif %}
</div>
<div style="float:right">
{% if item.url %}
<a href="{{ item.url }}"/>{% i18n "View" %}</a>
{% if item.modifyReservationUrl or item.cancelReservationUrl %}|{% endif %}
{% endif %}
{% if item.modifyReservationUrl %}
<a href="{{ item.modifyReservationUrl }}"/>{% i18n "Modify" %}</a>
{% if item.cancelReservationUrl %}|{% endif %}
{% endif %}
{% if item.cancelReservationUrl %}
<a href="{{ item.cancelReservationUrl }}"/>{% i18n "Cancel" %}</a>
{% endif %}
</div>
{% if item.reservedTicket.ticketedSeat.seatNumber %}
{% i18n "Seat: %1" item.reservedTicket.ticketedSeat.seatNumber %}
{% endif %}
</td></tr>
</table>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment