<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" xmlns:cal="http://typo3.org/ns/Ig/IgReservations/ViewHelpers" data-namespace-typo3-fluid="true">
<table width="600">
    <f:if condition="{showOwner} && {event.owner}">
        <tr>
            <th valign="top" style="vertical-align:top;text-align: left; width: 200px;">
                <f:translate extensionName="IgReservations" languageKey="{reservation.languageConfig.locale.languageCode}" key="tx_igreservations_domain_model_event.owner" />
            </th>
            <td valign="top" style="vertical-align: top;">{event.owner.firstName} {event.owner.lastName}</td>
        </tr>
    </f:if>
    <cal:event.bookingTypeForLanguage event="{event}">
        <f:if condition="{bookingType}">
            <tr>
                <th valign="top" style="vertical-align:top;text-align: left; width: 200px;">
                    <f:translate extensionName="IgReservations" languageKey="{reservation.languageConfig.locale.languageCode}" key="tx_igreservations_domain_model_event.booking_type" />
                </th>
                <td valign="top" style="vertical-align: top;">{bookingType.name}</td>
            </tr>
        </f:if>
    </cal:event.bookingTypeForLanguage>
    <tr>
        <th valign="top" style="vertical-align:top;text-align: left; width: 200px;">
            <f:translate extensionName="IgReservations" languageKey="{reservation.languageConfig.locale.languageCode}" key="events.date_and_time" />
        </th>
        <td valign="top" style="vertical-align: top;">
            <f:if condition="{event.calendar.isDateTimeMode}">
                <f:then>
                    {event.startEndDateTime}
                    <f:translate extensionName="IgReservations" key="tx_igreservations.time-after-text" />
                </f:then>
                <f:else>
                    {event.startDate->f:format.date(format: '%A, %d.%m.%Y')} - {event.timeslot.name}
                </f:else>
            </f:if>
        </td>
    </tr>
    <f:if condition="{event.calendar.room}">
        <f:then>
            <tr>
                <th valign="top" style="vertical-align:top;text-align: left; width: 200px;">
                    <f:translate extensionName="IgReservations" key="tx_igreservations_domain_model_calendar.room" />
                </th>
                <td valign="top" style="vertical-align: top;">{event.calendar.room.name}</td>
            </tr>
        </f:then>
        <f:else>
            <tr>
                <th valign="top" style="vertical-align:top;text-align: left; width: 200px;">
                    <f:translate extensionName="IgReservations" key="tx_igreservations_domain_model_event.calendar" />
                </th>
                <td valign="top" style="vertical-align: top;">{event.calendar.name}</td>
            </tr>
        </f:else>
    </f:if>
    <f:if condition="{event.purpose}">
        <tr>
            <th valign="top" style="vertical-align:top;text-align: left; width: 200px;">
                <f:translate extensionName="IgReservations" languageKey="{reservation.languageConfig.locale.languageCode}" key="tx_igreservations_domain_model_event.purpose" />
            </th>
            <td valign="top" style="vertical-align: top;">{event.purpose}</td>
        </tr>
    </f:if>
    <f:if condition="{event.numParticipants}">
        <tr>
            <th valign="top" style="vertical-align:top;text-align: left; width: 200px;">
                <f:translate extensionName="IgReservations" languageKey="{reservation.languageConfig.locale.languageCode}" key="tx_igreservations_domain_model_event.num_participants" />
            </th>
            <td valign="top" style="vertical-align: top;">{event.numParticipants}</td>
        </tr>
    </f:if>
    <f:for each="{event.reservations}" as="reservation">
        <cal:reservation.reservationTypeForLanguage reservation="{reservation}">
            <f:if condition="{reservationType}">
                <tr>
                    <th valign="top" style="vertical-align:top;text-align: left; width: 200px;">
                        <f:translate extensionName="IgReservations" languageKey="{reservation.languageConfig.locale.languageCode}"
                            key="tx_igreservations_domain_model_reservationtype" />
                    </th>
                    <td valign="top" style="vertical-align: top;">{reservationType.name}</td>
                </tr>
            </f:if>
        </cal:reservation.reservationTypeForLanguage>
        <cal:reservation.eventCategoryForLanguage reservation="{reservation}">
            <f:if condition="{category}">
                <tr>
                    <th valign="top" style="vertical-align:top;text-align: left; width: 200px;">
                        <f:translate extensionName="IgReservations" languageKey="{reservation.languageConfig.locale.languageCode}"
                            key="tx_igreservations_domain_model_event.category" />
                    </th>
                    <td valign="top" style="vertical-align: top;">{category.name}</td>
                </tr>
            </f:if>
        </cal:reservation.eventCategoryForLanguage>
        <cal:reservation.eventLocationForLanguage reservation="{reservation}">
            <f:if condition="{location}">
                <tr>
                    <th valign="top" style="vertical-align:top;text-align: left; width: 200px;">
                        <f:translate extensionName="IgReservations" languageKey="{reservation.languageConfig.locale.languageCode}"
                            key="tx_igreservations_domain_model_location" />
                    </th>
                    <td valign="top" style="vertical-align: top;">
                        {location.name}
                        <f:if condition="{location.address}">
                            <br />{location.address}
                        </f:if>
                        <f:if condition="{location.zip}">
                            <br />{location.zip} {location.city}
                        </f:if>
                    </td>
                </tr>
            </f:if>
        </cal:reservation.eventLocationForLanguage>
        <cal:reservation.eventStatusForLanguage reservation="{reservation}">
            <tr>
                <th valign="top" style="vertical-align:top;text-align: left; width: 200px;">
                    <f:translate extensionName="IgReservations" languageKey="{reservation.languageConfig.locale.languageCode}" key="tx_igreservations_domain_model_event.status" />
                </th>
                <td valign="top" style="vertical-align: top;">{status.name}</td>
            </tr>
        </cal:reservation.eventStatusForLanguage>
        <f:if condition="{reservation.numParticipants}">
            <tr>
                <th valign="top" style="vertical-align:top;text-align: left; width: 200px;">
                    <f:translate extensionName="IgReservations" languageKey="{reservation.languageConfig.locale.languageCode}"
                        key="tx_igreservations_domain_model_event.num_participants" />
                </th>
                <td valign="top" style="vertical-align: top;">{reservation.numParticipants}</td>
            </tr>
        </f:if>
        <tr>
            <th valign="top" style="vertical-align:top;text-align: left; width: 200px;">
                <f:translate extensionName="IgReservations" languageKey="{reservation.languageConfig.locale.languageCode}" key="tx_igreservations_domain_model_event.name" />
            </th>
            <td valign="top" style="vertical-align: top;">
                <f:translate extensionName="IgReservations" languageKey="{reservation.languageConfig.locale.languageCode}" key="tx_igreservations_domain_model_address.salutation.{reservation.salutation}" /> {reservation.firstName} {reservation.lastName}
            </td>
        </tr>
        <f:if condition="{reservation.company}">
            <tr>
                <th valign="top" style="vertical-align:top;text-align: left; width: 200px;">
                    <f:translate extensionName="IgReservations" languageKey="{reservation.languageConfig.locale.languageCode}" key="tx_igreservations_domain_model_address.company" />
                </th>
                <td valign="top" style="vertical-align: top;">{reservation.company}</td>
            </tr>
        </f:if>
        <tr>
            <th valign="top" style="vertical-align:top;text-align: left; width: 200px;">
                <f:translate extensionName="IgReservations" languageKey="{reservation.languageConfig.locale.languageCode}" key="tx_igreservations_domain_model_address.address" />
            </th>
            <td valign="top" style="vertical-align: top;">{reservation.address}</td>
        </tr>
        <tr>
            <th valign="top" style="vertical-align:top;text-align: left; width: 200px;">
                <f:translate extensionName="IgReservations" languageKey="{reservation.languageConfig.locale.languageCode}" key="tx_igreservations_domain_model_address.zip" /> /
                <f:translate extensionName="IgReservations" languageKey="{reservation.languageConfig.locale.languageCode}" key="tx_igreservations_domain_model_address.city" />
            </th>
            <td valign="top" style="vertical-align: top;">{reservation.zip} {reservation.city}</td>
        </tr>
        <tr>
            <th valign="top" style="vertical-align:top;text-align: left; width: 200px;">
                <f:translate extensionName="IgReservations" languageKey="{reservation.languageConfig.locale.languageCode}" key="tx_igreservations_domain_model_address.email" />
            </th>
            <td valign="top" style="vertical-align: top;"><a href="mailto:{reservation.email}">{reservation.email}</a></td>
        </tr>
        <tr>
            <th valign="top" style="vertical-align:top;text-align: left; width: 200px;">
                <f:translate extensionName="IgReservations" languageKey="{reservation.languageConfig.locale.languageCode}" key="tx_igreservations_domain_model_address.phone" />
            </th>
            <td valign="top" style="vertical-align: top;">{reservation.phone}</td>
        </tr>
        <f:if condition="{event.notes}">
            <tr>
                <th valign="top" style="vertical-align:top;text-align: left; width: 200px;">
                    <f:translate extensionName="IgReservations" languageKey="{reservation.languageConfig.locale.languageCode}" key="tx_igreservations_domain_model_event.notes" />
                </th>
                <td valign="top" style="vertical-align: top;">{event.notes->f:format.nl2br()}</td>
            </tr>
        </f:if>
        <f:if condition="{reservation.notes}">
            <tr>
                <th valign="top" style="vertical-align:top;text-align: left; width: 200px;">
                    <f:translate extensionName="IgReservations" languageKey="{reservation.languageConfig.locale.languageCode}" key="tx_igreservations_domain_model_event.notes" />
                </th>
                <td valign="top" style="vertical-align: top;">{reservation.notes->f:format.nl2br()}</td>
            </tr>
        </f:if>
        <f:if condition="{reservation.companyAddress}">
            <tr>
                <th valign="top" style="vertical-align:top;text-align: left; width: 200px;">
                    <f:translate extensionName="IgReservations" languageKey="{reservation.languageConfig.locale.languageCode}" key="tx_igreservations_domain_model_reservation.company_address" />
                </th>
                <td valign="top" style="vertical-align: top;">{reservation.companyAddress}</td>
            </tr>
        </f:if>
        <f:if condition="{reservation.companyZip}">
            <tr>
                <th valign="top" style="vertical-align:top;text-align: left; width: 200px;">
                    <f:translate extensionName="IgReservations" languageKey="{reservation.languageConfig.locale.languageCode}" key="tx_igreservations_domain_model_reservation.company_zip" />
                </th>
                <td valign="top" style="vertical-align: top;">{reservation.companyZip}</td>
            </tr>
        </f:if>
        <f:if condition="{reservation.companyCity}">
            <tr>
                <th valign="top" style="vertical-align:top;text-align: left; width: 200px;">
                    <f:translate extensionName="IgReservations" languageKey="{reservation.languageConfig.locale.languageCode}" key="tx_igreservations_domain_model_reservation.company_city" />
                </th>
                <td valign="top" style="vertical-align: top;">{reservation.companyCity}</td>
            </tr>
        </f:if>
        <f:if condition="{reservation.companyPhone}">
            <tr>
                <th valign="top" style="vertical-align:top;text-align: left; width: 200px;">
                    <f:translate extensionName="IgReservations" languageKey="{reservation.languageConfig.locale.languageCode}" key="tx_igreservations_domain_model_reservation.company_phone" />
                </th>
                <td valign="top" style="vertical-align: top;">{reservation.companyPhone}</td>
            </tr>
        </f:if>
        <f:if condition="{reservation.hasBillAddress}">
            <f:if condition="{reservation.billAddress}">
                <tr>
                    <th valign="top" style="vertical-align:top;text-align: left; width: 200px;">
                        <f:translate extensionName="IgReservations" languageKey="{reservation.languageConfig.locale.languageCode}" key="tx_igreservations_domain_model_reservation.bill_address" />
                    </th>
                    <td valign="top" style="vertical-align: top;">{reservation.billAddress}</td>
                </tr>
            </f:if>
            <f:if condition="{reservation.billZip}">
                <tr>
                    <th valign="top" style="vertical-align:top;text-align: left; width: 200px;">
                        <f:translate extensionName="IgReservations" languageKey="{reservation.languageConfig.locale.languageCode}" key="tx_igreservations_domain_model_reservation.bill_zip" />
                    </th>
                    <td valign="top" style="vertical-align: top;">{reservation.billZip}</td>
                </tr>
            </f:if>
            <f:if condition="{reservation.billCity}">
                <tr>
                    <th valign="top" style="vertical-align:top;text-align: left; width: 200px;">
                        <f:translate extensionName="IgReservations" languageKey="{reservation.languageConfig.locale.languageCode}" key="tx_igreservations_domain_model_reservation.bill_city" />
                    </th>
                    <td valign="top" style="vertical-align: top;">{reservation.billCity}</td>
                </tr>
            </f:if>
        </f:if>
        <f:if condition="{reservation.purpose}">
            <tr>
                <th valign="top" style="vertical-align:top;text-align: left; width: 160px;">Zweck Buchung</th>
                <td valign="top" style="vertical-align: top;">{reservation.purpose.name}</td>
            </tr>
        </f:if>
    </f:for>
</table>
</html>
