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

Open in your IDE?
  1. {% import "@StartPlatzEventBundle/Default/_macros.registration.html.twig" as registration %}
  2. <section id="{% if lang == 'en' or isEnglish %}registration{% else %}anmeldung{% endif %}" class="bg-registration py-5">
  3. <div class="row">
  4.     <div class="col-12">
  5.         {# Batch ist Source of Truth fuer Preis und Steuerverhalten (event.priceInEuroCent ist Legacy). #}
  6.         {% set displayPrice = null %}
  7.         {% set isTaxIncluded = false %}
  8.         {% set isFreeForKiCampus = false %}
  9.         {% set isFreeForCommunity = false %}
  10.         {% if batch and batch.priceInEuroCent %}
  11.             {% set displayPrice = batch.priceInEuroCent %}
  12.             {% set isTaxIncluded = batch.taxBehavior == 'inclusive' %}
  13.             {% set isFreeForKiCampus = batch.isFreeForKiCampus %}
  14.             {% set isFreeForCommunity = batch.isFreeForCommunity %}
  15.         {% elseif event is defined and event and event.priceInEuroCent %}
  16.             {% set displayPrice = event.priceInEuroCent %}
  17.             {% set isTaxIncluded = event.isTaxIncluded %}
  18.             {% set isFreeForKiCampus = event.isFreeForKiCampus %}
  19.             {% set isFreeForCommunity = event.isFreeForCommunity %}
  20.         {% endif %}
  21.         {# Compact Event Details (Horizontal Layout) - Same width as form #}
  22.         <div class="row d-flex justify-content-center">
  23.             <div class="col-md-8">
  24.                 {% if event is defined %}
  25.                     <div class="d-flex justify-content-between mb-4 bg-light p-3" style="border-radius: 8px;">
  26.                         {# When - INLINE like V2 #}
  27.                         <div>
  28.                             <strong>📅 {% if lang == 'DE' %}Wann:{% else %}When:{% endif %}</strong>
  29.                             {% if isMultiBatchEvent and batch and batch.startDate %}
  30.                                 {{ batch.startDate|date('d.m.Y H:i') }}{% if batch.endDate %} - {{ batch.endDate|date('H:i') }} Uhr{% endif %}
  31.                             {% else %}
  32.                                 {{ registration.when(event, lang, phrases) }}
  33.                             {% endif %}
  34.                         </div>
  35.                         {# Where - INLINE like V2 #}
  36.                         <div>
  37.                             <strong>📍 {% if lang == 'DE' %}Wo:{% else %}Where:{% endif %}</strong> {{ registration.where(event, lang, phrases) }}
  38.                         </div>
  39.                         {# Fee - INLINE like V2 #}
  40.                         <div>
  41.                             {% if displayPrice %}
  42.                                 <strong>💰 {% if lang == 'DE' %}GebĂŒhr:{% else %}Fee:{% endif %}</strong> {{ (displayPrice/100)|number_format(2, ',', '.') }} â‚Ź {% if isTaxIncluded %}{% if lang == 'DE' %}inkl. MwSt.{% else %}incl. VAT{% endif %}{% else %}{% if lang == 'DE' %}zzgl. MwSt.{% else %}excl. VAT{% endif %}{% endif %}
  43.                             {% elseif displayPrice is not null and displayPrice == 0 %}
  44.                                 <strong>💰 {% if lang == 'DE' %}GebĂŒhr:{% else %}Fee:{% endif %}</strong> {% if lang == 'DE' %}kostenlos{% else %}free{% endif %}
  45.                             {% endif %}
  46.                         </div>
  47.                     </div>
  48.                     {# KI Campus Free Access Box #}
  49.                     {% if displayPrice and isFreeForKiCampus %}
  50.                         <div class="mb-3 p-3 bg-light border rounded" style="border-radius: 8px;">
  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-2 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-2">
  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.                     {# Community Free Access Box #}
  76.                     {% if displayPrice and isFreeForCommunity %}
  77.                         <div class="mb-3 p-3 bg-light border rounded" style="border-radius: 8px;">
  78.                             <span class="text-success">
  79.                                 <i class="fas fa-check-circle"></i>
  80.                                 {% if lang == 'DE' %}
  81.                                     Kostenlos fĂŒr Community Mitglieder
  82.                                 {% else %}
  83.                                     Free for Community members
  84.                                 {% endif %}
  85.                             </span>
  86.                             <p class="mb-1 mt-2 small">
  87.                                 {% if lang == 'DE' %}
  88.                                     Als Community Mitglied erhĂ€ltst Du kostenlosen Zugang zu diesem Event!
  89.                                 {% else %}
  90.                                     As a Community member, you get free access to this event!
  91.                                 {% endif %}
  92.                             </p>
  93.                         </div>
  94.                     {% endif %}
  95.                     {# Payment pending: started + paid event â†’ show hint and re-show form below #}
  96.                     {% set isPaidAndStarted = application.applicationStatus is defined and application.applicationStatus == 'started' and batch.priceInEuroCent > 0 %}
  97.                     {# Application Status #}
  98.                     {% if application.applicationStatus is defined and application.applicationStatus is not empty %}
  99.                         {% if isPaidAndStarted %}
  100.                             <div class="alert alert-warning" style="border-radius: 8px;">
  101.                                 <strong>
  102.                                     {% if isEnglish %}Payment pending{% else %}Zahlung ausstehend{% endif %}
  103.                                 </strong>
  104.                                 <div class="mt-1">
  105.                                     {% if isEnglish %}
  106.                                         Your registration has been started. Please complete the payment to confirm your spot.
  107.                                     {% else %}
  108.                                         Deine Anmeldung wurde gestartet. Bitte schliesse die Zahlung ab, um Deinen Platz zu sichern.
  109.                                     {% endif %}
  110.                                 </div>
  111.                             </div>
  112.                         {% else %}
  113.                             <div class="alert alert-info" style="border-radius: 8px;">
  114.                                 <strong>{{ phrases.event_phrase_application_status|default('Anmeldestatus:') }}</strong>
  115.                                 <div class="mt-1">
  116.                                     {% if application.applicationStatus == 'started' %}
  117.                                         {{ phrases.event_phrase_status_started|default('Du bist vorgemerkt. Sobald Du Deine E-Mail Adresse bestĂ€tigt hast, wird die Anmeldung gĂŒltig.') }}
  118.                                     {% elseif application.applicationStatus == 'applied' %}
  119.                                         {% if event is defined and event and event.isFormalLanguage %}
  120.                                             {{ phrases.event_phrase_status_applied_formal|default('Sie sind angemeldet. Wir freuen uns auf Sie!') }}
  121.                                         {% else %}
  122.                                             {{ phrases.event_phrase_status_applied|default('Du bist angemeldet. Wir freuen uns auf Dich!') }}
  123.                                         {% endif %}
  124.                                     {% else %}
  125.                                         {{ phrases.event_phrase_status_other|default('Du bist angemeldet mit dem Status ==') }} {{ application.applicationStatus }}
  126.                                     {% endif %}
  127.                                 </div>
  128.                             </div>
  129.                         {% endif %}
  130.                     {% endif %}
  131.                 {% endif %}
  132.             </div>
  133.         </div>
  134.         {# TICKET AVAILABILITY COUNTER - Configurable via settings #}
  135.         {% if settings.showParticipantCounter|default(false) %}
  136.             {% set maxParticipants = batch.capacity|default(0) %}
  137.             {% set countedStatuses = settings.countStatus|default(['applied', 'approved']) %}
  138.             {# Calculate count based on configured statuses #}
  139.             {% set registered = 0 %}
  140.             {% if 'started' in countedStatuses and batch.startedCount is not null %}
  141.                 {% set registered = registered + batch.startedCount %}
  142.             {% endif %}
  143.             {% if 'applied' in countedStatuses and batch.appliedCount is not null %}
  144.                 {% set registered = registered + batch.appliedCount %}
  145.             {% endif %}
  146.             {% if 'approved' in countedStatuses and batch.approvedCount is not null %}
  147.                 {% set registered = registered + batch.approvedCount %}
  148.             {% endif %}
  149.             {% if 'rejected' in countedStatuses and batch.rejectedCount is not null %}
  150.                 {% set registered = registered + batch.rejectedCount %}
  151.             {% endif %}
  152.             {% set available = maxParticipants - registered %}
  153.             <div class="row d-flex justify-content-center mt-4">
  154.                 <div class="col-md-8">
  155.                     <div class="alert bg-light border mb-3" style="background-color: #f8f9fa !important; padding: 12px 20px; border-radius: 6px;">
  156.                         <div class="text-center" style="font-size: 14px; color: #666;">
  157.                             {% if lang == 'de' %}
  158.                                 <strong>{{ registered }} von {{ maxParticipants }} PlĂ€tzen belegt</strong> |
  159.                                 <strong style="color: #FF6B00;">{{ available }} ĂŒbrig</strong> â€“ sichere dir deinen Platz
  160.                             {% else %}
  161.                                 <strong>{{ registered }} of {{ maxParticipants }} seats taken</strong> |
  162.                                 <strong style="color: #FF6B00;">{{ available }} left</strong> â€“ don't miss your spot
  163.                             {% endif %}
  164.                         </div>
  165.                     </div>
  166.                 </div>
  167.             </div>
  168.         {% endif %}
  169.         {# END TICKET AVAILABILITY COUNTER #}
  170.         {# Registration Form â€” also shown when payment is pending (started + paid) #}
  171.         {% if application.applicationStatus is defined and (application.applicationStatus is empty or isPaidAndStarted) %}
  172.             <div class="row d-flex justify-content-center">
  173.                 <div class="col-md-8">
  174.                     {# Waiting List or Regular Registration #}
  175.                     {% set effectiveCapacity = batch.capacity|default(0) %}
  176.                     {% if effectiveCapacity > 0 and batch.appliedCount >= effectiveCapacity %}
  177.                         {% if settings.hasWaitingList %}
  178.                             <h2 class="text-center mb-4">{{ phrases.event_phrase_all_seats_booked_waiting_list|default('Alle PlĂ€tze sind gebucht - Bitte registriere Dich fĂŒr die Warteliste') }}</h2>
  179.                         {% else %}
  180.                             <h2 class="text-center mb-4">{{ phrases.event_phrase_all_seats_booked_no_registration|default('Alle PlĂ€tze sind gebucht - Eine Anmeldung ist leider nicht möglich') }}</h2>
  181.                         {% endif %}
  182.                     {% endif %}
  183.                     {# Show form if not full OR has waiting list #}
  184.                     {% if (effectiveCapacity == 0 or batch.appliedCount < effectiveCapacity) or (effectiveCapacity > 0 and batch.appliedCount >= effectiveCapacity and settings.hasWaitingList) %}
  185.                         {# Flash Messages #}
  186.                         {% for flashMessage in app.session.flashbag.get('notice') %}
  187.                             <div class="alert {% if 'SUCCESS' in flashMessage %}alert-success{% elseif 'ERROR' in flashMessage  %}alert-danger{% else %}alert-default{% endif %}" role="alert">{{ flashMessage|raw }}</div>
  188.                         {% endfor %}
  189.                         {# Form Container with V2 Styling #}
  190.                         <div class="bg-light p-4 contact-form" style="border-radius: 12px; box-shadow: 0 2px 10px rgba(0,0,0,0.08);">
  191.                             {{ form_start(form) }}
  192.                             {{ form_errors(form) }}
  193.                             {# Name Fields (Side by Side) #}
  194.                             <div class="form-group row">
  195.                                 <div class="col-md-6 mb-3 mb-md-0">
  196.                                     {{ form_widget(form.firstName, {'attr': {'class': 'form-control', size: "32", max_size: "64",placeholder: phrases.phrase_form_firstName_placeholder ~ ' (*)'} } ) }}
  197.                                 </div>
  198.                                 <div class="col-md-6">
  199.                                     {{ form_widget(form.lastName, {'attr': {'class': 'form-control', size: "32", max_size: "64",placeholder: phrases.phrase_form_lastName_placeholder ~  ' (*)'} }  ) }}
  200.                                 </div>
  201.                             </div>
  202.                             {# Startup Name (Optional) #}
  203.                             {% if batch.askForTeam %}
  204.                                 <div class="form-group">
  205.                                     {{ form_widget(form.startupName, {'attr': {'class': 'form-control',placeholder: 'Firma'}, 'required':false } ) }}
  206.                                 </div>
  207.                             {% endif %}
  208.                             {# Email #}
  209.                             <div class="form-group">
  210.                                 {{ form_widget(form.email, {'attr': {'class': 'form-control', size: "32", max_size: "64", placeholder: 'E-mail (*)'  } }  ) }}
  211.                             </div>
  212.                             {# Phone #}
  213.                             {% if batch.hasIncludePhone %}
  214.                                 <div class="form-group">
  215.                                     {{ form_widget(form.phone, {'attr': {'class': 'form-control', size: "32", max_size: "64"}, 'required':false, placeholder: 'Phone Number'  } ) }}
  216.                                     <small class="form-text text-muted">
  217.                                         {{ phrases.request_phone_number_for_updates | default('Bitte gib\' Deine Telefonnummer an, damit wir Dich im Fall von Ă„nderungen erreichen können.') }}
  218.                                     </small>
  219.                                 </div>
  220.                             {% endif %}
  221.                             {# LinkedIn #}
  222.                             {% if batch.hasIncludeLinkedIn %}
  223.                                 <div class="form-group">
  224.                                     {{ form_widget(form.linkedin, {'attr': {'class': 'form-control'}, 'required':false } ) }}
  225.                                 </div>
  226.                             {% endif %}
  227.                             {# Extra Fields (Dynamic) #}
  228.                             {% if attribute(settings, 'extraFields') is defined %}
  229.                                 {% set extraFields = attribute(settings, 'extraFields') %}
  230.                                 {% for extraField in extraFields %}
  231.                                     {% set formField = attribute(form, extraField.field) %}
  232.                                     {% if extraField.type == 'checkbox' %}
  233.                                         <div class="form-group">
  234.                                             <div class="d-flex align-items-start">
  235.                                                 <div class="mr-2">
  236.                                                     {{ form_widget(formField, {'attr': {'class': 'form-check-input'}, 'required':extraField.required } ) }}
  237.                                                 </div>
  238.                                                 <div>
  239.                                                     <strong class="form-text text-muted">
  240.                                                         {{ extraField.label }}
  241.                                                     </strong>
  242.                                                 </div>
  243.                                             </div>
  244.                                         </div>
  245.                                     {% else %}
  246.                                         <div class="form-group">
  247.                                             {{ form_widget(formField, {'attr': {'class': 'form-control'}, 'required':extraField.required } ) }}
  248.                                         </div>
  249.                                     {% endif %}
  250.                                 {% endfor %}
  251.                             {% endif %}
  252.                             {# Applicant Types #}
  253.                             {% if settings.applicantTypes is defined and settings.applicantTypes %}
  254.                                 <div class="form-group">
  255.                                     {{ form_widget(form.applicantType, {'attr': {'class': 'form-control'}, 'required':false } ) }}
  256.                                 </div>
  257.                             {% endif %}
  258.                             {# Newsletter Permission #}
  259.                             {% if batch.hasIncludeNewsletterPermission %}
  260.                                 <div class="form-group">
  261.                                     <div class="d-flex align-items-start">
  262.                                         <div class="mr-2">
  263.                                             {{ form_widget(form.hasNewsletterPermissionGiven, {'attr': {'class': 'form-check-input'}, 'required':false } ) }}
  264.                                         </div>
  265.                                         <div>
  266.                                             <strong class="form-text text-muted">
  267.                                                 {% if application.lang == 'DE' %}
  268.                                                 Ja, ich möchte gerne ĂŒber weitere Veranstaltungen informiert werden.
  269.                                                 {% else %}
  270.                                                 Yes, I would like to be informed about further events.
  271.                                                 {% endif %}
  272.                                             </strong>
  273.                                         </div>
  274.                                     </div>
  275.                                 </div>
  276.                             {% endif %}
  277.                             {# Volunteer Consent #}
  278.                             {% if settings.hasIncludeVolunteerConsent is defined and settings.hasIncludeVolunteerConsent %}
  279.                                 <div class="form-group">
  280.                                     <div class="d-flex align-items-start">
  281.                                         <div class="mr-2">
  282.                                             {{ form_widget(form.hasVolunteerAgreed, {'attr': {'class': 'form-check-input'}, 'required':false } ) }}
  283.                                         </div>
  284.                                         <div>
  285.                                             <strong class="form-text text-muted">
  286.                                                 {% if application.lang == 'DE' %}
  287.                                                 Ja, ich wĂŒrde mich gerne als Volunteer, Mentor oder UnterstĂŒtzer einbringen
  288.                                                 {% else %}
  289.                                                     Yes, I would like to contribute as a volunteer, mentor, or supporter
  290.                                                     {% endif %}
  291.                                             </strong>
  292.                                         </div>
  293.                                     </div>
  294.                                 </div>
  295.                             {% endif %}
  296.                             {# Terms Consent #}
  297.                             {% if batch.hasIncludeTermsConsent %}
  298.                                 <div class="form-group">
  299.                                     <small class="form-text text-muted">
  300.                                         {% if application.lang == 'DE' %}
  301.                                         Bei unseren Veranstaltungen können Aufnahmen fĂŒr Social Media gemacht werden.
  302.                                         <br>Mit Deiner Anmeldung stimmst Du zu, dass Bildaufnahmen fĂŒr Social Media verwendet werden dĂŒrfen.
  303.                                         {% else %}
  304.                                         At our events, recordings for social media can be made.  <br>By registering, you agree that image recordings may be used for social media.
  305.                                         {% endif %}
  306.                                     </small>
  307.                                 </div>
  308.                             {% endif %}
  309.                             {# AI Hub Trial Membership Note #}
  310.                             {% if batch.productId > 322 and batch.productId < 330 %}
  311.                                 <div class="form-group">
  312.                                     <small class="form-text text-muted">
  313.                                         (*) die Probemitgliedschaft im AI Hub verlĂ€ngert sich nicht automatisch und wird 30 Tage nach Ende der ausgewĂ€hlten AI-Summer-School-Ausgabe automatisch und ohne zusĂ€tzliche Kosten gekĂŒndigt.
  314.                                     </small>
  315.                                 </div>
  316.                             {% endif %}
  317.                             {# Price Information #}
  318.                             {% if batch.priceInEuroCent %}
  319.                                 <div class="form-group">
  320.                                     {% if application.lang == 'DE' %}
  321.                                         <strong>Der Standardpreis betrĂ€gt {{ application.priceInEuroCent /100 |number_format(0, ',', '.') }}€</strong> (zzgl. MwSt.)
  322.                                         {% if application.discountPercent %}
  323.                                             <br>
  324.                                             Du erhĂ€lst einen Discount wegen <i>{{ application.discountReason }}</i> in Höhe von {{ application.discountPercent }}%
  325.                                             und daher betrĂ€gt der Preis fĂŒr Dich {{ application.realPriceinEuroCent /100 |number_format(0, ',', '.') }}€ (zzgl. MwSt.)
  326.                                         {% endif %}
  327.                                         <br>
  328.                                         {% if application.realPriceinEuroCent %}
  329.                                             <small class="text-muted">Mit Klick auf "Jetzt anmelden" wirst Du angemeldet und der Zahlungsvorgang wird gestartet</small>
  330.                                         {% endif %}
  331.                                     {% else %}
  332.                                         <strong>The standard price is {{ application.priceInEuroCent /100 |number_format(0, ',', '.') }}€</strong>
  333.                                         {% if application.discountPercent %}
  334.                                             <br>
  335.                                             You will receive a discount due to <i>{{ application.discountReason }}</i> in the amount of {{ application.discountPercent }}%
  336.                                             and therefore the price for you is {{ application.realPriceinEuroCent /100 |number_format(0, ',', '.') }}€
  337.                                         {% endif %}
  338.                                         <br>
  339.                                         {% if application.realPriceinEuroCent %}
  340.                                             <small class="text-muted">By clicking "Register Now" you will be registered and the payment process will be started</small>
  341.                                         {% endif %}
  342.                                     {% endif %}
  343.                                 </div>
  344.                             {% endif %}
  345.                             {# Submit Button - Centered & Large (V2 Style) #}
  346.                             {% set label = phrases.phrase_form_button_call_to_act %}
  347.                             <div class="form-group text-center mt-4">
  348.                                 {{ form_widget(form.finish, {'attr': {'class': 'btn btn-dark btn-lg px-5 py-3', 'style': 'border-radius: 8px;'}, 'label':label }) }}
  349.                             </div>
  350.                             {# CSRF Token #}
  351.                             {% if not embed|default(false) %}
  352.                                 {{ form_row(form._token) }}
  353.                             {% endif %}
  354.                             {# B-128: Meta CAPI dedup event ID #}
  355.                             <input type="hidden" name="_meta_event_id" id="metaEventId" value="">
  356.                             {{ form_end(form, {'render_rest': false}) }}
  357.                             {# Meta Pixel Lead Event - fires on form submit (B-128: with CAPI dedup eventID) #}
  358.                             <script>
  359.                                 (function() {
  360.                                     var form = document.querySelector('form[name="{{ form.vars.name }}"]');
  361.                                     if (!form) return;
  362.                                     var isSubmitting = false;
  363.                                     form.addEventListener('submit', function(e) {
  364.                                         if (isSubmitting) return true;
  365.                                         if (typeof fbq !== 'undefined') {
  366.                                             e.preventDefault();
  367.                                             e.stopPropagation();
  368.                                             var submitted = false;
  369.                                             function submitForm() {
  370.                                                 if (submitted) return;
  371.                                                 submitted = true;
  372.                                                 isSubmitting = true;
  373.                                                 form.submit();
  374.                                             }
  375.                                             var metaEventId = (crypto && crypto.randomUUID) ? crypto.randomUUID() : 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
  376.                                                 var r = Math.random() * 16 | 0; return (c === 'x' ? r : (r & 0x3 | 0x8)).toString(16);
  377.                                             });
  378.                                             var eventIdField = document.getElementById('metaEventId');
  379.                                             if (eventIdField) eventIdField.value = metaEventId;
  380.                                             fbq('track', 'Lead', {
  381.                                                 content_name: '{{ event.title|e('js') }}'
  382.                                             }, { eventID: metaEventId });
  383.                                             setTimeout(function() {
  384.                                                 submitForm();
  385.                                             }, 1000);
  386.                                         }
  387.                                     });
  388.                                 })();
  389.                             </script>
  390.                             {# Reduced Tickets Info #}
  391.                             {% if batch.priceInEuroCent and attribute(phrases,'phrase_reduced_tickets') is defined %}
  392.                                 <div class="form-group">
  393.                                     <p class="text-muted">{{ phrases.phrase_reduced_tickets }}</p>
  394.                                 </div>
  395.                             {% endif %}
  396.                         </div> {# End form container #}
  397.                     {% endif %} {# End form visibility check #}
  398.                 </div>
  399.             </div>
  400.         {% endif %}
  401.     </div>
  402. </div>
  403. {# Multi-Batch: Other Dates Section #}
  404. {% if isMultiBatchEvent and futureBatches|length > 1 %}
  405. <div class="row mt-5" id="{{ isEnglish ? 'OtherDates' : 'WeitereTermine' }}">
  406.     <div class="col-12">
  407.         <h3 class="text-center mb-4">{{ phrases.event_phrase_other_dates|default('Weitere Termine') }}</h3>
  408.         <div class="batch-selector">
  409.             <div class="list-group">
  410.                 {% for futureBatch in futureBatches %}
  411.                     {% if futureBatch.id != batch.id %} {# Don't show the currently selected batch #}
  412.                         <a href="{{ path('event_show_single_by_date', {'slug': event.slug, 'date': futureBatch.startDate|date('Y-m-d')}) }}"
  413.                            class="list-group-item list-group-item-action">
  414.                             <div class="row align-items-center">
  415.                                 <div class="col-md-6">
  416.                                     <h5 class="mb-1">
  417.                                         {% if lang == 'DE' %}
  418.                                             {{ futureBatch.startDate|date('d. F Y', 'Europe/Berlin')|replace({
  419.                                                 'January': 'Januar', 'February': 'Februar', 'March': 'MĂ€rz',
  420.                                                 'April': 'April', 'May': 'Mai', 'June': 'Juni',
  421.                                                 'July': 'Juli', 'August': 'August', 'September': 'September',
  422.                                                 'October': 'Oktober', 'November': 'November', 'December': 'Dezember'
  423.                                             }) }}
  424.                                         {% else %}
  425.                                             {{ futureBatch.startDate|date('F d, Y') }}
  426.                                         {% endif %}
  427.                                     </h5>
  428.                                     <p class="mb-1">
  429.                                         {{ futureBatch.startDate|date('H:i') }} -
  430.                                         {% if futureBatch.endDate %}
  431.                                             {{ futureBatch.endDate|date('H:i') }} Uhr
  432.                                         {% else %}
  433.                                             {{ futureBatch.startDate|date_modify('+2 hours')|date('H:i') }} Uhr
  434.                                         {% endif %}
  435.                                     </p>
  436.                                     {% if futureBatch.name and futureBatch.name != batch.name %}
  437.                                         <small class="text-muted">{{ futureBatch.name }}</small>
  438.                                     {% endif %}
  439.                                 </div>
  440.                                 <div class="col-md-6 text-md-right">
  441.                                     {% set isBatchOpen = futureBatch.start and futureBatch.end and date(futureBatch.start) <= date() and date(futureBatch.end) >= date() %}
  442.                                     {% set futureBatchCapacity = futureBatch.capacity|default(0) %}
  443.                                     {% if futureBatchCapacity > 0 and futureBatch.appliedCount >= futureBatchCapacity %}
  444.                                         <span class="badge badge-danger">Ausgebucht</span>
  445.                                     {% elseif not isBatchOpen %}
  446.                                         <span class="badge badge-secondary">Anmeldung geschlossen</span>
  447.                                     {% else %}
  448.                                         <span class="badge badge-success">
  449.                                             {% if futureBatchCapacity > 0 %}
  450.                                                 {{ futureBatchCapacity - futureBatch.appliedCount }} PlĂ€tze frei
  451.                                             {% else %}
  452.                                                 PlĂ€tze verfĂŒgbar
  453.                                             {% endif %}
  454.                                         </span>
  455.                                         <button class="btn btn-sm btn-outline-primary ml-2">
  456.                                             Zu diesem Termin â†’
  457.                                         </button>
  458.                                     {% endif %}
  459.                                 </div>
  460.                             </div>
  461.                         </a>
  462.                     {% endif %}
  463.                 {% endfor %}
  464.             </div>
  465.         </div>
  466.         {% if selectedDate %}
  467.             <div class="mt-3 text-center">
  468.                 <a href="{{ path('event_show_single', {'slug': event.slug}) }}" class="btn btn-link">
  469.                     â† Alle Termine anzeigen
  470.                 </a>
  471.             </div>
  472.         {% endif %}
  473.     </div>
  474. </div>
  475. {% endif %}
  476. </section>