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

  <f:section name="content">

    <div class="frame-space-after-extra-small event-info">
      <div class="event-calendar">
	<f:translate key="tx_igreservations_domain_model_event.calendar" />:
	{event.calendar.name}
      </div>
      <div class="event-info-date-time">
	<f:translate key="events.date_and_time" />:
	<f:if condition="{event.timeslot}">
	  <f:then>
	    {event.startDate->f:format.date(format: 'd.m.Y')} - {event.timeslot.name}
	  </f:then>
	  <f:else>
	    {event.startEndDateTime}
	  </f:else>
	</f:if>
      </div>
      <f:if condition="{event.name}">
	<div class="event-info-name">
	  <f:translate key="tx_igreservations_domain_model_event.name" />:
	  {event.name}
	</div>
      </f:if>
      <f:if condition="{event.purpose}">
	<div class="event-info-.purpose">
	  <f:translate key="tx_igreservations_domain_model_event..purpose" />:
	  {event.purpose}
	</div>
      </f:if>
    </div>
    
    <f:if condition="{event.calendarGroup}">
      <div class="calendargroup frame-space-after-extra-small">
        <p>Diese Veranstaltung befindet sich auch in folgenden Räumen:</p>
        <ul>
          <f:for each="{event.calendarGroup.calendars}" as="cal">
            <f:if condition="{calendar.uid} != {cal.uid}">
              <li class="calendargroup-calendar">{cal.name}</li>
            </f:if>
          </f:for>
        </ul>
      </div>
    </f:if>
    <f:if condition="{event.eventGroup} && {event.eventGroup.repetition} != 'None'">
      <f:then>
        <div class="frame-space-after-extra-small">Was wollen Sie löschen?</div>
        <f:link.action class="link-button" action="delete" controller="Event" pluginName="EventTodo" arguments="{event: event, applyTo: 'this', source: source}" data="{delete-text: '{f:translate(key: \'events.really_delete\')}'}">
          Nur diese Veranstaltung
        </f:link.action>
        <f:link.action class="link-button" action="delete" controller="Event" pluginName="EventTodo" arguments="{event: event, applyTo: 'after', source: source}" data="{delete-text: '{f:translate(key: \'events.really_delete\')}'}">
          Dieses und alle Nachfolgenden Veranstaltungen löschen?
        </f:link.action>
        <f:link.action class="link-button" action="delete" controller="Event" pluginName="EventTodo" arguments="{event: event, applyTo: 'all', source: source}" data="{delete-text: '{f:translate(key: \'events.really_delete\')}'}">
          Alle Veranstaltungen der Serie löschen?
        </f:link.action>
      </f:then>
      <f:else>
        <div class="frame-space-after-extra-small">Veranstaltung wirklich löschen?</div>
        <f:link.action class="link-button" action="delete" controller="Event" pluginName="EventTodo" arguments="{event: event, applyTo: 'this', source: source}" data="{delete-text: '{f:translate(key: \'events.really_delete\')}'}">
          Ja
        </f:link.action>
        <f:link.action class="link-button" action="show" controller="Event" pluginName="EventTodo" arguments="{event: event, source: source}">Nein</f:link.action>
      </f:else>
    </f:if>
  </f:section>

</html>
