<? use CityMountain\CourseManagementBundle\Utils\OperationCM; ?>
<div class="event layout_full block<?= $this->class ?>" id="cmEvent">
<h1><?= $this->title ?></h1>
<div class="ce_text"> <table width="100%" border="0"> <tr> <td class="cmEventHeader" colspan="2">Veranstaltung:</td> </tr> <tr> <td>Veranstalter:</td> <td>{{CMEvent::unitLink::<?php echo $this->id; ?>}}</td>
</tr> <tr> <td>Art der Veranstaltung:</td> <td>{{CMEvent::eventType::<?php echo $this->id; ?>}}</td>
</tr> <tr> <td width="">Wann:</td> <td>{{CMEvent::when::<?php echo $this->id; ?>}}</td>
</tr> <tr> <td>Ort:</td> <td><?php echo $this->cmLocation; ?></td>
</tr> {{CMEvent::hybridTable::<?php echo $this->id; ?>}}
{{CMEvent::curseCostTable::<?php echo $this->id; ?>}}
{{CMEvent::deadlineTable::<?php echo $this->id; ?>}}
<tr> <td>Leiter/-in:</td> <td><?php echo $this->cmCoursLeader; ?></td>
</tr> {{CMEvent::targetTable::<?php echo $this->id; ?>}}
<tr> <td>Beschreibung/Bemerkungen:</td> <td><?php echo $this->teaser; ?></td>
</tr> <?php if ($this->enclosure): ?>
<tr>
<td>Weitere Informationen:</td> <td> <div class="enclosure"> <?php foreach ($this->enclosure as $enclosure): ?>
<p>
<img src="<?php echo $enclosure['icon']; ?>" width="18" height="18" alt="<?php echo $enclosure['mime']; ?>" class="mime_icon"> <a href="<?= $enclosure['href'] ?>" title="<?= $enclosure['title'] ?>"><?= $enclosure['link'] ?> <span class="size">(<?= $enclosure['filesize'] ?>)</span></a>
</p> <?php endforeach; ?>
</div>
</td> <?php endif; ?>
<?php if (OperationCM::checkEventContact($this->id)): ?>
<tr> <td>Kontakt:</td> <td>{{CMEvent::contact::<?php echo $this->id; ?>}}</td>
</tr> <?php endif; ?>
</table> </div> <?php if(!OperationCM::replaceInsertTags('CMEvent::noRegistration::'.$this->id)): ?><!-- Buchungen sind erlaubt -->
<?php $tmpBookableArray = OperationCM::replaceInsertTags('CMEvent::bookableArray::'.$this->id); ?>
<?php if(!$tmpBookableArray['registrationDeadline'] && !$tmpBookableArray['eventHasStarted'] && !$tmpBookableArray['fullyBooked']
&& !$tmpBookableArray['canceled']): ?><!-- Buchbar -->
<div class="cmEventBooking" align="center"> <a target="_new" href="<?= OperationCM::replaceInsertTags('CMEvent::registrationLink::'.$this->id); ?>">[ Buchen ]</a>
</div> <?php else: ?><!-- Buchung nicht mehr möglich -->
<?php if($tmpBookableArray['canceled']): ?>
<div class="cmEventFullyBooked" align="center">
[ Veranstaltung wurde abgesagt ] </div> <?php elseif($tmpBookableArray['fullyBooked']): ?>
<div class="cmEventFullyBooked" align="center">
[ Veranstaltung ist ausgebucht ] </div> <?php elseif($tmpBookableArray['registrationDeadline']): ?>
<div class="cmEventWarning" align="center">
[ Anmeldefrist abgelaufen, es hat aber noch freie Plätze. ]<br />Bitte kontaktieren Sie das Kurssekretariat Tel. +41 41 594 50 00 oder info@schluechthof.ch </div> <?php elseif($tmpBookableArray['eventHasStarted']): ?>
<div class="cmEventWarning" align="center">
[ Veranstaltung hat angefangen und ist nicht mehr buchbar ] </div> <?php else: ?>
<div class="cmEventFullyBooked" align="center">
[ Veranstaltung ist ausgebucht ] </div> <?php endif; ?><!-- Buchung nicht mehr möglich ENDE-->
<?php endif; ?><!-- Buchbar / Buchung nicht mehr möglich ENDE-->
<?php else: ?>
<!-- Event muss nicht gebucht werden -->
<div class="cmEventWarning" align="center"> [ Keine Anmeldung erforderlich ] </div> <?php endif; ?><!-- Buchungen sind erlaubt/Event muss nicht gebucht werden ENDE -->
</div>