<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" xmlns:ig="http://typo3.org/ns/Internetgalerie/IgRender/ViewHelpers" data-namespace-typo3-fluid="true">
<cal:calendar.hasPermission calendar="{event.calendar}" permission="read">
  <f:then></f:then>
  <f:else>
      <br />
      <f:if condition="{settings.cancelRequestedStatus} && {event.status.uid} == {settings.cancelRequestedStatus}">
        <div class="frame-space-before-extra-small">
          <h4><f:translate key="cancel-requested" /></h4>
          <f:link.action class="link-button" pageUid="{settings.unapprovedListPageUid}" action="approveCancelRequest" controller="Reservation" pluginName="EventTodo" extensionName="IgReservations" arguments="{reservation: reservation}" absolute="1"><f:translate key="confirm-cancel-request" /></f:link.action>
          <f:link.action class="link-button" pageUid="{settings.unapprovedListPageUid}" action="unapproveCancelRequest" controller="Reservation" pluginName="EventTodo" extensionName="IgReservations" arguments="{reservation: reservation}" absolute="1"><f:translate key="decline-cancel-request" /></f:link.action>
        </div>
      </f:if>
  </f:else>
</cal:calendar.hasPermission>

<cal:calendar.hasPermission calendar="{event.calendar}" permission="user">
  <cal:calendar.hasPermission calendar="{event.calendar}" permission="admin,team">
    <f:else>
      <f:if condition="{settings.cancelRequestedStatus} && {event.status.uid} != {settings.cancelRequestedStatus} && {reservation.canCancel}">
        <f:then>
          <f:link.action pageUid="{settings.reservationListPageUid}" pluginName="PublicCalendar" controller="Reservation" action="cancelRequest" arguments="{reservation: reservation, redirect: redirect}" class="link-button">
            <core:icon identifier="actions-delete" size="small" alternativeMarkupIdentifier="inline" /><span class="label">
              <f:translate key="request-cancel" /></span>
          </f:link.action>
        </f:then>
        <f:else if="{settings.cancelRequestedStatus} && {event.status.uid} == {settings.cancelRequestedStatus}">
          <br />
          <div class="frame-space-before-extra-small">
            <h4><f:translate key="cancel-requested" /></h4>
          </div>
        </f:else>
      </f:if>
    </f:else>
  </cal:calendar.hasPermission>
</cal:calendar.hasPermission>
</html>
