{% import "@StartPlatzEventBundle/Default/_macros.registration.html.twig" as registration %}
<div class="row">
<div class="col-12">
<dl class="row">
{% if event is defined %}
<dt class="col-3 text-right">{{ phrases.event_phrase_when | default('Wann:') }}</dt>
<dd class="col-9">
{% if isMultiBatchEvent and batch and batch.startDate %}
{{ batch.startDate|date('d.m.Y H:i') }}
{% if batch.endDate %}
- {{ batch.endDate|date('H:i') }} Uhr
{% endif %}
{% else %}
{{ registration.when(event, lang, phrases) }}
{% endif %}
</dd>
<dt class="col-3 text-right">{{ phrases.event_phrase_where | default('Wo:') }}</dt>
<dd class="col-9">{{ registration.where(event, lang, phrases) }}</dd>
{# Determine price source - batch takes precedence for multi-batch events #}
{% set displayPrice = null %}
{% set isTaxIncluded = false %}
{% set isFreeForKiCampus = false %}
{% set isFreeForCommunity = false %}
{% if isMultiBatchEvent and batch and batch.priceInEuroCent %}
{% set displayPrice = batch.priceInEuroCent %}
{% set isTaxIncluded = batch.isTaxIncluded %}
{% set isFreeForKiCampus = batch.isFreeForKiCampus %}
{% set isFreeForCommunity = batch.isFreeForCommunity %}
{% elseif event is defined and event and event.priceInEuroCent %}
{% set displayPrice = event.priceInEuroCent %}
{% set isTaxIncluded = event.isTaxIncluded %}
{% set isFreeForKiCampus = event.isFreeForKiCampus %}
{% set isFreeForCommunity = event.isFreeForCommunity %}
{% endif %}
{% if displayPrice %}
{#
<dt class="col-3 text-right" style="word-break: break-word;">{{ phrases.event_phrase_participation_fee | default('Teilnahmegebühr:') }}</dt>
#}
<dt class="col-3 text-right d-none d-md-block">{{ phrases.event_phrase_participation_fee | default('Teilnahmegebühr:') }}</dt>
<dt class="col-3 text-right d-md-none">{{ phrases.event_phrase_fee_short | default('Preis:') }}</dt>
<dd class="col-9">{{ (displayPrice/100)|number_format(2, ',', '.') ~ ' €' }}
{% if isTaxIncluded %}
{{ phrases.event_phrase_tax_included | default('incl. MwSt.') }}
{% else %}
{{ phrases.event_phrase_tax_excluded | default('zzgl. MwSt.') }}
{% endif %}
{% if isFreeForKiCampus %}
<div class="mt-2 p-2 bg-light border rounded w-100">
<span class="text-success">
<i class="fas fa-check-circle"></i>
{% if lang == 'DE' %}
Kostenlos für KI Campus Mitglieder
{% else %}
Free for KI Campus members
{% endif %}
</span>
<p class="mb-1 mt-1 small">
{% if lang == 'DE' %}
Werde Mitglied für nur 49€/Monat und erhalte Zugang zu diesem und vielen weiteren kostenlosen KI-Kursen und Events!
{% else %}
Join now for just €49/month and get access to this and many other free AI courses and events!
{% endif %}
</p>
<a target="_blank" href="https://ki-campus.onepage.me/" class="btn btn-sm btn-success mt-1">
{% if lang == 'DE' %}
Jetzt KI Campus Mitglied werden
{% else %}
Become a KI Campus member now
{% endif %}
</a>
</div>
{% endif %}
{% if isFreeForCommunity %}
<div class="mt-2 p-2 bg-light border rounded w-100">
<span class="text-success">
<i class="fas fa-check-circle"></i>
{% if lang == 'DE' %}
Kostenlos für Community Mitglieder
{% else %}
Free for Community members
{% endif %}
</span>
<p class="mb-1 mt-1 small">
{% if lang == 'DE' %}
Als Community Mitglied erhältst Du kostenlosen Zugang zu diesem Event!
{% else %}
As a Community member, you get free access to this event!
{% endif %}
</p>
</div>
{% endif %}
</dd>
{% elseif displayPrice is not null and displayPrice == 0 %}
<dt class="col-3 text-right">{{ phrases.event_phrase_participation_fee | default('Teilnahmegebühr:') }}</dt>
<dd class="col-9">{{ phrases.event_phrase_no_participation_fee | default('kostenlos') }}</dd>
{% endif %}
{% endif %}
{% if application.applicationStatus is defined and application.applicationStatus is not empty %}
<dt class="col-3 text-right">{{ phrases.event_phrase_application_status|default('Anmeldestatus:') }}</dt>
<dd class="col-9">
{% if application.applicationStatus == 'started' %}
{{ phrases.event_phrase_status_started|default('Du bist vorgemerkt. Sobald Du Deine E-Mail Adresse bestätigt hast, wird die Anmeldung gültig.') }}
{% elseif application.applicationStatus == 'applied' %}
{% if event is defined and event and event.isFormalLanguage %}
{{ phrases.event_phrase_status_applied_formal|default('Sie sind angemeldet. Wir freuen uns auf Sie!') }}
{% else %}
{{ phrases.event_phrase_status_applied|default('Du bist angemeldet. Wir freuen uns auf Dich!') }}
{% endif %}
{% else %}
{{ phrases.event_phrase_status_other|default('Du bist angemeldet mit dem Status ==') }} {{ application.applicationStatus }}
{% endif %}
</dd>
{% endif %}
</dl>
{% if application.applicationStatus is defined and application.applicationStatus is empty %}
{# show application form #}
{% set phrase_form_finish_label = phrases.register_now %}
{% if settings.maxNumber > 0 and batch.applicationsCount >= settings.maxNumber %}
{% if settings.hasWaitingList %}
<h2 class="text-center">{{ phrases.event_phrase_all_seats_booked_waiting_list|default('Alle Plätze sind gebucht - Bitte registriere Dich für die Warteliste') }}</h2>
{% include '@StartPlatzRheinlandPitchBundle/Apply/_edit.registration.event.widget.html.twig' %}
{% else %}
<h2 class="text-center">{{ phrases.event_phrase_all_seats_booked_no_registration|default('Alle Plätze sind gebucht - Eine Anmeldung ist leider nicht möglich') }}</h2>
{% endif %}
{% else %}
{% include '@StartPlatzRheinlandPitchBundle/Apply/_edit.registration.event.widget.html.twig' %}
{% endif %}
{% endif %}
</div>
</div>
{% if isMultiBatchEvent and futureBatches|length > 1 %}
<div class="row mt-5" id="{{ isEnglish ? 'OtherDates' : 'WeitereTermine' }}">
<div class="col-12">
<h3 class="text-center mb-4">{{ phrases.event_phrase_other_dates|default('Weitere Termine') }}</h3>
<div class="batch-selector">
<div class="list-group">
{% for futureBatch in futureBatches %}
{% if futureBatch.id != batch.id %} {# Don't show the currently selected batch #}
<a href="{{ path('event_show_single_by_date', {'slug': event.slug, 'date': futureBatch.startDate|date('Y-m-d')}) }}"
class="list-group-item list-group-item-action">
<div class="row align-items-center">
<div class="col-md-6">
<h5 class="mb-1">
{% if lang == 'DE' %}
{{ futureBatch.startDate|date('d. F Y', 'Europe/Berlin')|replace({
'January': 'Januar', 'February': 'Februar', 'March': 'März',
'April': 'April', 'May': 'Mai', 'June': 'Juni',
'July': 'Juli', 'August': 'August', 'September': 'September',
'October': 'Oktober', 'November': 'November', 'December': 'Dezember'
}) }}
{% else %}
{{ futureBatch.startDate|date('F d, Y') }}
{% endif %}
</h5>
<p class="mb-1">
{{ futureBatch.startDate|date('H:i') }} -
{% if futureBatch.endDate %}
{{ futureBatch.endDate|date('H:i') }} Uhr
{% else %}
{{ futureBatch.startDate|date_modify('+2 hours')|date('H:i') }} Uhr
{% endif %}
</p>
{% if futureBatch.name and futureBatch.name != batch.name %}
<small class="text-muted">{{ futureBatch.name }}</small>
{% endif %}
</div>
<div class="col-md-6 text-md-right">
{% set isBatchOpen = futureBatch.start and futureBatch.end and date(futureBatch.start) <= date() and date(futureBatch.end) >= date() %}
{% if settings.maxNumber > 0 and futureBatch.applicationsCount >= settings.maxNumber %}
<span class="badge badge-danger">Ausgebucht</span>
{% elseif not isBatchOpen %}
<span class="badge badge-secondary">Anmeldung geschlossen</span>
{% else %}
<span class="badge badge-success">
{% if settings.maxNumber > 0 %}
{{ settings.maxNumber - futureBatch.applicationsCount }} Plätze frei
{% else %}
Plätze verfügbar
{% endif %}
</span>
<button class="btn btn-sm btn-outline-primary ml-2">
Zu diesem Termin →
</button>
{% endif %}
</div>
</div>
</a>
{% endif %}
{% endfor %}
</div>
</div>
{% if selectedDate %}
<div class="mt-3 text-center">
<a href="{{ path('event_show_single', {'slug': event.slug}) }}" class="btn btn-link">
← Alle Termine anzeigen
</a>
</div>
{% endif %}
</div>
</div>
{% endif %}