<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" xmlns:cal="http://typo3.org/ns/Ig/IgReservations/ViewHelpers" xmlns:core="http://typo3.org/ns/TYPO3/CMS/Core/ViewHelpers" data-namespace-typo3-fluid="true">
<f:layout name="Default" />

<f:section name="content">

  <f:flashMessages />
  <f:comment>
    <f:form.validationResults>
      <f:if condition="{validationResults.flattenedErrors}">
	<ul class="errors">
          <f:for each="{validationResults.flattenedErrors}" as="errors" key="propertyPath">
            <li>{propertyPath}
              <ul>
		<f:for each="{errors}" as="error">
                  <li>{error.code}: {error}</li>
		</f:for>
              </ul>
            </li>
          </f:for>
	</ul>
      </f:if>
    </f:form.validationResults>
  </f:comment>

<f:if condition="{reservation.event}">
  <h2>{reservation.event.calendar.name}, <f:format.date format="%d.%m.%Y %H:%M">{reservation.event.startDateTime}</f:format.date> - <f:if condition="{event.startDate} < {event.endDate}"><f:then><f:format.date format="%d.%m.%Y %H:%M">{reservation.event.endDateTime}</f:format.date></f:then><f:else><f:format.date format="%H:%M">{reservation.event.endDateTime}</f:format.date></f:else></f:if> <f:translate key="tx_igreservations.time-after-text" /></h2>
</f:if>

  <f:form class="dp-form form-kontakt" action="update" name="reservation" object="{reservation}">
        <div class="ym-grid">
          <f:spaceless>
                <f:alias map="{edit: 1, pageType: 0}">
                    <f:render partial="Reservation/FormFieldsAdmin" arguments="{_all}" />
                </f:alias>
                <div class="ym-g100 ig-inline">
                    <f:form.submit value="{f:translate(key: 'events.update')}" />
                </div>
		<f:render partial="Event/Edit/Back" arguments="{_all}" />
                <cal:calendar.isAdmin calendar="{calendar}">
                    <div class="ym-gr ig-inline delete-link frame-space-before-small">
                        <f:link.action action="delete" arguments="{reservation: reservation}" data="{delete-text: '{f:translate(key: \'events.really_delete\')}'}">
                            <f:translate key="events.delete" />
                        </f:link.action>
                    </div>
                </cal:calendar.isAdmin>
            </f:spaceless>
        </div>
    </f:form>
</f:section>

</html>
