<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
    <table class="ce-table ce-table-striped">
        <tr>
            <th>
                <f:translate key="events.date_and_time" />
            </th>
            <th>
                <f:translate key="tx_igreservations_domain_model_event.calendar" />
            </th>
            <f:if condition="{eventsToApprove.0.category}">
                <th>
                    <f:translate key="tx_igreservations_domain_model_event.category" />
                </th>
            </f:if>
            <th>
                <f:translate key="tx_igreservations_domain_model_event.status" />
            </th>
            <th>
                <f:translate key="tx_igreservations_domain_model_event.name" />
            </th>
            <th>&nbsp;</th>
        </tr>
        <f:if condition="{reservations}">
            <f:for each="{reservations}" as="reservation">
                <f:alias map="{event: reservation.event, calendar: reservation.event.calendar}">
                    <tr>
                        <td>{event.startEndDateTime} <f:translate key="tx_igreservations.time-after-text" /></td>
                        <td>{event.calendar.name}</td>
                        <f:if condition="{eventsToApprove.0.category}">
                            <td>{event.category.name}</td>
                        </f:if>
                        <td>{event.status.name}</td>
                        <td>
                            <f:translate key="tx_igreservations_domain_model_address.salutation.{reservation.salutation}" /> {reservation.firstName} {reservation.lastName}<br />
                        </td>
                        <td>
                            <f:if condition="{settings.cancelRequestedStatus} != {reservation.event.status.uid} && {reservation.canCancel}">
                                <f:link.action action="cancelRequest" controller="Reservation" pluginName="MyReservations" arguments="{reservation: reservation, redirect: 'list'}" class="link-button">
                                    <core:icon identifier="actions-delete" size="small" alternativeMarkupIdentifier="inline" />
                                    <span class="label"><f:translate key="request-cancel" /></span>
                                </f:link.action>
                            </f:if>
                        </td>
                    </tr>
                </f:alias>
            </f:for>
        </f:if>
    </table>

</html>
