<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
<cal:calendar.isAdmin calendar="{calendar}">
    <f:if condition="{eventsToApprove}">
        <div class="ig-reservations-approval-list frame-space-after-small">
            <h3>
                <f:translate key="events.unapproved" />
            </h3>
            <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.category" />
                    </th>
                    <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:for each="{eventsToApprove}" as="event">
                    <tr>
                        <td>{event.startDate->f:format.date(format: 'd.m.Y')} - {event.timeslot.name}</td>
                        <td>{event.category.name}</td>
                        <td>{event.status.name}</td>
                        <td>
                            <f:translate key="tx_igreservations_domain_model_address.salutation.{event.address.salutation}" /> {event.address.firstName} {event.address.lastName}</td>
                        <td>
                            <f:link.action action="show" controller="Event" arguments="{event: event}">
                                <f:translate key="events.show" />
                            </f:link.action>
                        </td>
                    </tr>
                </f:for>
            </table>
        </div>
    </f:if>

</cal:calendar.isAdmin>

</html>
