<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="{eventsToApprove}">
            <f:for each="{eventsToApprove}" as="event">
                <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:for each="{event.reservations}" as="reservation">
                            <f:translate key="tx_igreservations_domain_model_address.salutation.{reservation.salutation}" /> {reservation.firstName} {reservation.lastName}<br />
                        </f:for>
                    </td>
                    <td>
                        <f:link.action action="show" controller="Event" arguments="{event: event, redirect: 'approvalList'}" class="button">
                             <core:icon identifier="actions-view" size="small" alternativeMarkupIdentifier="inline" />
                             <span class="label"><f:translate key="events.show" /></span>
                        </f:link.action>
                    </td>
                </tr>
            </f:for>
        </f:if>
    </table>

</html>
