src/StartPlatz/Bundle/EventBundle/Resources/views/Default/_registration.batch.html.twig line 1

Open in your IDE?
  1. {% import "@StartPlatzEventBundle/Default/_macros.registration.html.twig" as registration %}
  2. <div class="row">
  3.     <div class="col-12">
  4.         <dl class="row">
  5.             {% if event is defined %}
  6.                 <dt class="col-3 text-right">{{ phrases.event_phrase_when | default('Wann:') }}</dt>
  7.                 <dd class="col-9">
  8.                     {% if isMultiBatchEvent and batch and batch.startDate %}
  9.                         {{ batch.startDate|date('d.m.Y H:i') }}
  10.                         {% if batch.endDate %}
  11.                             - {{ batch.endDate|date('H:i') }} Uhr
  12.                         {% endif %}
  13.                     {% else %}
  14.                         {{ registration.when(event, lang, phrases) }}
  15.                     {% endif %}
  16.                 </dd>
  17.                 <dt class="col-3 text-right">{{ phrases.event_phrase_where | default('Wo:') }}</dt>
  18.                 <dd class="col-9">{{ registration.where(event, lang, phrases) }}</dd>
  19.                 {# Determine price source - batch takes precedence for multi-batch events #}
  20.                 {% set displayPrice = null %}
  21.                 {% set isTaxIncluded = false %}
  22.                 {% set isFreeForKiCampus = false %}
  23.                 {% set isFreeForCommunity = false %}
  24.                 
  25.                 {% if isMultiBatchEvent and batch and batch.priceInEuroCent %}
  26.                     {% set displayPrice = batch.priceInEuroCent %}
  27.                     {% set isTaxIncluded = batch.isTaxIncluded %}
  28.                     {% set isFreeForKiCampus = batch.isFreeForKiCampus %}
  29.                     {% set isFreeForCommunity = batch.isFreeForCommunity %}
  30.                 {% elseif event is defined and event and event.priceInEuroCent %}
  31.                     {% set displayPrice = event.priceInEuroCent %}
  32.                     {% set isTaxIncluded = event.isTaxIncluded %}
  33.                     {% set isFreeForKiCampus = event.isFreeForKiCampus %}
  34.                     {% set isFreeForCommunity = event.isFreeForCommunity %}
  35.                 {% endif %}
  36.                 
  37.                 {% if displayPrice %}
  38.                         {#
  39.                         <dt class="col-3 text-right" style="word-break: break-word;">{{ phrases.event_phrase_participation_fee | default('Teilnahmegebühr:') }}</dt>
  40.                         #}
  41.                         <dt class="col-3  text-right d-none d-md-block">{{ phrases.event_phrase_participation_fee | default('Teilnahmegebühr:') }}</dt>
  42.                         <dt class="col-3  text-right d-md-none">{{ phrases.event_phrase_fee_short | default('Preis:') }}</dt>
  43.                         <dd class="col-9">{{ (displayPrice/100)|number_format(2, ',', '.') ~ ' €' }}
  44.                             {% if isTaxIncluded %}
  45.                                 {{ phrases.event_phrase_tax_included | default('incl. MwSt.') }}
  46.                             {% else %}
  47.                                 {{ phrases.event_phrase_tax_excluded | default('zzgl. MwSt.') }}
  48.                             {% endif %}
  49.                             {% if isFreeForKiCampus %}
  50.                                 <div class="mt-2 p-2 bg-light border rounded w-100">
  51.             <span class="text-success">
  52.                 <i class="fas fa-check-circle"></i>
  53.                 {% if lang == 'DE' %}
  54.                     Kostenlos für KI Campus Mitglieder
  55.                 {% else %}
  56.                     Free for KI Campus members
  57.                 {% endif %}
  58.             </span>
  59.                                     <p class="mb-1 mt-1 small">
  60.                                         {% if lang == 'DE' %}
  61.                                             Werde Mitglied für nur 49€/Monat und erhalte Zugang zu diesem und vielen weiteren kostenlosen KI-Kursen und Events!
  62.                                         {% else %}
  63.                                             Join now for just €49/month and get access to this and many other free AI courses and events!
  64.                                         {% endif %}
  65.                                     </p>
  66.                                     <a target="_blank" href="https://ki-campus.onepage.me/" class="btn btn-sm btn-success mt-1">
  67.                                         {% if lang == 'DE' %}
  68.                                             Jetzt KI Campus Mitglied werden
  69.                                         {% else %}
  70.                                             Become a KI Campus member now
  71.                                         {% endif %}
  72.                                     </a>
  73.                                 </div>
  74.                             {% endif %}
  75.                             {% if isFreeForCommunity %}
  76.                                 <div class="mt-2 p-2 bg-light border rounded w-100">
  77.                                     <span class="text-success">
  78.                                         <i class="fas fa-check-circle"></i>
  79.                                         {% if lang == 'DE' %}
  80.                                             Kostenlos für Community Mitglieder
  81.                                         {% else %}
  82.                                             Free for Community members
  83.                                         {% endif %}
  84.                                     </span>
  85.                                     <p class="mb-1 mt-1 small">
  86.                                         {% if lang == 'DE' %}
  87.                                             Als Community Mitglied erhältst Du kostenlosen Zugang zu diesem Event!
  88.                                         {% else %}
  89.                                             As a Community member, you get free access to this event!
  90.                                         {% endif %}
  91.                                     </p>
  92.                                 </div>
  93.                             {% endif %}
  94.                         </dd>
  95.                 {% elseif displayPrice is not null and displayPrice == 0 %}
  96.                     <dt class="col-3 text-right">{{ phrases.event_phrase_participation_fee | default('Teilnahmegebühr:') }}</dt>
  97.                     <dd class="col-9">{{ phrases.event_phrase_no_participation_fee | default('kostenlos') }}</dd>
  98.                 {% endif %}
  99.             {% endif %}
  100.                 {% if application.applicationStatus is defined and application.applicationStatus is not empty %}
  101.             <dt class="col-3 text-right">{{ phrases.event_phrase_application_status|default('Anmeldestatus:') }}</dt>
  102.             <dd class="col-9">
  103.                 {% if application.applicationStatus == 'started' %}
  104.                     {{ phrases.event_phrase_status_started|default('Du bist vorgemerkt. Sobald Du Deine E-Mail Adresse bestätigt hast, wird die Anmeldung gültig.') }}
  105.                 {% elseif application.applicationStatus == 'applied' %}
  106.                     {% if event is defined and event and event.isFormalLanguage %}
  107.                         {{ phrases.event_phrase_status_applied_formal|default('Sie sind angemeldet. Wir freuen uns auf Sie!') }}
  108.                     {% else %}
  109.                         {{ phrases.event_phrase_status_applied|default('Du bist angemeldet. Wir freuen uns auf Dich!') }}
  110.                     {% endif %}
  111.                 {% else %}
  112.                     {{ phrases.event_phrase_status_other|default('Du bist angemeldet mit dem Status ==') }} {{ application.applicationStatus }}
  113.                 {% endif %}
  114.             </dd>
  115.             {% endif %}
  116.         </dl>
  117.         {% if application.applicationStatus is defined and application.applicationStatus is empty %}
  118.             {# show application form #}
  119.             {% set phrase_form_finish_label = phrases.register_now %}
  120.             {% if settings.maxNumber > 0 and batch.applicationsCount >= settings.maxNumber %}
  121.                 {% if settings.hasWaitingList %}
  122.                     <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>
  123.                     {% include '@StartPlatzRheinlandPitchBundle/Apply/_edit.registration.event.widget.html.twig' %}
  124.                 {% else %}
  125.                     <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>
  126.                 {% endif %}
  127.             {% else %}
  128.                 {% include '@StartPlatzRheinlandPitchBundle/Apply/_edit.registration.event.widget.html.twig' %}
  129.             {% endif %}
  130.         {% endif %}
  131.     </div>
  132. </div>
  133. {% if isMultiBatchEvent and futureBatches|length > 1 %}
  134. <div class="row mt-5" id="{{ isEnglish ? 'OtherDates' : 'WeitereTermine' }}">
  135.     <div class="col-12">
  136.         <h3 class="text-center mb-4">{{ phrases.event_phrase_other_dates|default('Weitere Termine') }}</h3>
  137.         
  138.         <div class="batch-selector">
  139.             <div class="list-group">
  140.                 {% for futureBatch in futureBatches %}
  141.                     {% if futureBatch.id != batch.id %} {# Don't show the currently selected batch #}
  142.                         <a href="{{ path('event_show_single_by_date', {'slug': event.slug, 'date': futureBatch.startDate|date('Y-m-d')}) }}" 
  143.                            class="list-group-item list-group-item-action">
  144.                             <div class="row align-items-center">
  145.                                 <div class="col-md-6">
  146.                                     <h5 class="mb-1">
  147.                                         {% if lang == 'DE' %}
  148.                                             {{ futureBatch.startDate|date('d. F Y', 'Europe/Berlin')|replace({
  149.                                                 'January': 'Januar', 'February': 'Februar', 'March': 'März', 
  150.                                                 'April': 'April', 'May': 'Mai', 'June': 'Juni',
  151.                                                 'July': 'Juli', 'August': 'August', 'September': 'September',
  152.                                                 'October': 'Oktober', 'November': 'November', 'December': 'Dezember'
  153.                                             }) }}
  154.                                         {% else %}
  155.                                             {{ futureBatch.startDate|date('F d, Y') }}
  156.                                         {% endif %}
  157.                                     </h5>
  158.                                     <p class="mb-1">
  159.                                         {{ futureBatch.startDate|date('H:i') }} - 
  160.                                         {% if futureBatch.endDate %}
  161.                                             {{ futureBatch.endDate|date('H:i') }} Uhr
  162.                                         {% else %}
  163.                                             {{ futureBatch.startDate|date_modify('+2 hours')|date('H:i') }} Uhr
  164.                                         {% endif %}
  165.                                     </p>
  166.                                     {% if futureBatch.name and futureBatch.name != batch.name %}
  167.                                         <small class="text-muted">{{ futureBatch.name }}</small>
  168.                                     {% endif %}
  169.                                 </div>
  170.                                 <div class="col-md-6 text-md-right">
  171.                                     {% set isBatchOpen = futureBatch.start and futureBatch.end and date(futureBatch.start) <= date() and date(futureBatch.end) >= date() %}
  172.                                     {% if settings.maxNumber > 0 and futureBatch.applicationsCount >= settings.maxNumber %}
  173.                                         <span class="badge badge-danger">Ausgebucht</span>
  174.                                     {% elseif not isBatchOpen %}
  175.                                         <span class="badge badge-secondary">Anmeldung geschlossen</span>
  176.                                     {% else %}
  177.                                         <span class="badge badge-success">
  178.                                             {% if settings.maxNumber > 0 %}
  179.                                                 {{ settings.maxNumber - futureBatch.applicationsCount }} Plätze frei
  180.                                             {% else %}
  181.                                                 Plätze verfügbar
  182.                                             {% endif %}
  183.                                         </span>
  184.                                         <button class="btn btn-sm btn-outline-primary ml-2">
  185.                                             Zu diesem Termin →
  186.                                         </button>
  187.                                     {% endif %}
  188.                                 </div>
  189.                             </div>
  190.                         </a>
  191.                     {% endif %}
  192.                 {% endfor %}
  193.             </div>
  194.         </div>
  195.         
  196.         {% if selectedDate %}
  197.             <div class="mt-3 text-center">
  198.                 <a href="{{ path('event_show_single', {'slug': event.slug}) }}" class="btn btn-link">
  199.                     ← Alle Termine anzeigen
  200.                 </a>
  201.             </div>
  202.         {% endif %}
  203.     </div>
  204. </div>
  205. {% endif %}