<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
<div class="approvalList-search frame-space-after-small">
    <f:form class="form-kontakt" action="approvalList">
        <div class="ym-grid block-left">
            <div class="ym-g100 ig-inline">
                <div class="selectIeFix">
                    <f:form.select name="search[mode]" value="{search.mode}">
                        <f:form.select.option value="unapproved">Ausstehende Buchungen</f:form.select.option>
                        <f:form.select.option value="approved">Bestätigte Buchungen</f:form.select.option>
                        <f:form.select.option value="all">Alle Buchungen</f:form.select.option>
                    </f:form.select>
                </div>
            </div>
        </div>
    </f:form>
</div>
<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:if condition="{eventsToApprove}">
        <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: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" class="button" arguments="{event: event}">
                        <core:icon identifier="actions-view" size="small" alternativeMarkupIdentifier="inline" /> <f:translate key="events.show" />
                    </f:link.action>
                </td>
            </tr>
        </f:for>
    </f:if>
</table>
</html>
