templates/user/produkt_details/schulung.html.twig line 1

Open in your IDE?
  1. <!-- Page Title-->
  2. <style>
  3.     .star-rating s:hover,
  4.     .star-rating s.active {
  5.         color: blue;
  6.     }
  7.     .star-rating s {
  8.         color: blue;
  9.         font-size: 50px;
  10.         cursor: default;
  11.         text-decoration: none;
  12.         line-height: 50px;
  13.     }
  14.     .star-rating {
  15.         padding: 2px;
  16.     }
  17.     .star-rating s:hover:before,
  18.     .star-rating s.rated:before,
  19.     .star-rating s.active:before {
  20.         content: "\2605";
  21.     }
  22.     .star-rating s:before {
  23.         content: "\2606";
  24.     }
  25. </style>
  26. {% set queryTerminId = app.request.query.get('terminId')|default(0) %}
  27. {% set mehrereOrte = false %}
  28. {% set mehrereOrteLat = '' %}
  29. {% set mehrereOrteLen = '' %}
  30. {% set seminarreiheStorniert = true %}
  31. {% set tmpTerminId = 0 %}
  32. {% set modalFenster = 0 %}
  33. {% set hinzufuegenAnzeigen = false %}
  34. {% set seminarreiheBereitsAngefangen = false %}
  35. {% set schulungErlauben = true %}
  36. {% if schulung.nurCelsisten == 1 and app.user.userProfil is not defined %}
  37.     {% set schulungErlauben = false %}
  38. {% endif %}
  39. {% if schulung.nurCelsisten == 2 and app.user.firmenProfil is not defined %}
  40.     {% set schulungErlauben = false %}
  41. {% endif %}
  42. {% if schulung.nurCelsisten == 3 %}
  43.     {% set schulungErlauben = false %}
  44.     {% if app.user.firmenProfil is defined and app.user.firmenProfil.celseoIntranetId != null %}
  45.         {% set schulungErlauben = true %}
  46.     {% endif %}
  47. {% endif %}
  48.     {% include('/user/firma/_firmenfarben.html.twig') %}
  49. <div class="page-title-overlap pt-4 hintergrundfarbe schriftfarbe">
  50.     <div class="container d-lg-flex justify-content-between py-2 py-lg-0">
  51.         <div class="pe-lg-10 text-center text-lg-start mx-2 pt-2 my-0">
  52.             <h1 class="schriftfarbe">{{ schulung.schulungName }}</h1>
  53.             <h5 class="schriftfarbe">{{ schulung.kurzbeschreibung }}</h5>
  54.             {#
  55.             <div class="row pt-4 align-items-center">
  56.                 <div class="row">
  57.                     <div class="col-12 col-md-3">
  58.                         <div class="star-rating">
  59.                             {% set maxAnzahlStern = 0 %}
  60.                             {% for key, stern in sterne %}
  61.                                 {% if maxAnzahlStern < stern %}
  62.                                     {% set maxAnzahlStern = stern %}
  63.                                 {% endif %}
  64.                                 {% set sternAnzeige = '' %}
  65.                                 {% if durchschnitt >= key+0.5 %}
  66.                                     {% set sternAnzeige = '-half' %}
  67.                                 {% endif %}
  68.                                 {% if durchschnitt >= key+1 %}
  69.                                     {% set sternAnzeige = '-filled' %}
  70.                                 {% endif %}
  71.                                 <i class="star-rating-icon ci-star{{ sternAnzeige }} active"></i>
  72.                             {% endfor %}
  73.                             <span class="mx-2 text-white small">({{ durchschnitt|number_format(2, ',', '.') }})</span>
  74.                         </div>
  75.                     </div>
  76.                 </div>
  77.             </div>
  78.             #}
  79.         </div>
  80.     </div>
  81. </div>
  82. <!-- Shadow box-->
  83. <section class="container mb-3 pb-3">
  84.     <div class="bg-light shadow-lg rounded-3 overflow-hidden">
  85.         <div class="row flex-lg-row">
  86.             {% if schulung.freigabe == 0 %}
  87.                 <div class="bg-danger text-center pt-3">
  88.                     <h4 class="text-white">Schulung in Bearbeitung<br><small>Buchung zur Zeit nicht möglich</small></h4>
  89.                 </div>
  90.             {% endif %}
  91.             <section class="col-lg-7 pt-lg-4 pb-4 mb-lg-3">
  92.                 <div class="d-block d-lg-none">
  93.                     <div class="bg-white h-100 p-4 ms-auto border-start">
  94.                         {% if schulung.vorstellungslink|length > 0 %}
  95.                             <div class="iframe-vorschau"></div>
  96.                             <div class="ratio ratio-16x9">
  97.                                 <iframe class="video-iframe rounded-3" data-src="{{ schulung.vorstellungslink }}" alt="Please accept cookie policy first" data-cookiescript="accepted" data-cookiecategory="targeting" title="video" allowfullscreen></iframe>
  98.                             </div>
  99.                             {% if not is_granted('ROLE_MITGLIED') %}
  100.                                 {#<script>
  101.                                     jQuery(function ($) {
  102.                                         if (!Cookiebot.consent.marketing) {
  103.                                             $('.iframe-vorschau').html(`<a href="javascript:Cookiebot.renew()">Für Videos - Bitte Marketing-Cookies aktivieren!</a>`);
  104.                                         }
  105.                                         window.addEventListener('CookiebotOnAccept', function (e) {
  106.                                             if (Cookiebot.consent.marketing) {
  107.                                                 $('.iframe-vorschau').remove();
  108.                                             }
  109.                                         }, false);
  110.                                     });
  111.                                 </script>#}
  112.                             {% endif %}
  113.                         {% else %}
  114.                         <img class="rounded-3" src="{{ asset('uploads/schulungen/' ~ schulung.id ~ '/titelbild/' ~ schulung.titelbild ) }}" width="100%" alt="Bild"/>
  115.                         {% endif %}
  116.                     </div>
  117.                 </div>
  118.                 <!-- Nav tabs-->
  119.                 <ul class="nav nav-tabs" role="tablist">
  120.                     <li class="nav-item"><a class="nav-link p-3 p-sm-4 active" href="#details" data-bs-toggle="tab" role="tab">Details</a></li>
  121.                     <li class="nav-item"><a class="nav-link p-3 p-sm-4" href="#bewertungen" data-bs-toggle="tab" role="tab">Bewertungen</a></li>
  122.                     <li class="nav-item"><a class="nav-link p-3 p-sm-4" href="#kommentare" data-bs-toggle="tab" role="tab">Fragen</a></li>
  123.                 </ul>
  124.                 <div class="tab-content pt-0 p-4">
  125.                     <!-- Produkt Details tab-->
  126.                     <div class="tab-pane fade show active" id="details" role="tabpanel">
  127.                         <div class="row pt-0 pb-0">
  128.                             <div class="js-editor">
  129.                                 {{ schulung.beschreibung|replace({"<a href": "<a target=_blank href"})|raw }}
  130.                             </div>
  131.                         </div>
  132.                     </div>
  133.                     <!-- Bewertung tab-->
  134.                     <div class="tab-pane fade" id="bewertungen" role="tabpanel">
  135.                         <div id="bewertungen-anzeige-fenster">
  136.                             {% include('/user/produkt_details/schulung_bewertungen.html.twig') %}
  137.                         </div>
  138.                     </div>
  139.                     <!-- Kommentare tab-->
  140.                     <div class="tab-pane fade" id="kommentare" role="tabpanel">
  141.                         <div class="row">
  142.                             <div class="col-lg-12">
  143.                                 <div id="kommentare-anzeige-fenster">
  144.                                     {% include('/user/produkt_details/schulung_kommentare.html.twig') %}
  145.                                 </div>
  146.                             </div>
  147.                         </div>
  148.                     </div>
  149.                 </div>
  150.             </section>
  151.             <!-- Sidebar-->
  152.             <aside class="col-lg-5 ps-xl-5">
  153.                 <hr class="d-lg-none">
  154.                 <div class="bg-white h-100 p-4 ms-auto border-start">
  155.                     <div class="accordion accordion-flush" id="licenses">
  156.                         <div class="d-none d-lg-block">
  157.                             <a href="javascript:CookieScript.instance.show()" class="video-cookie d-none">Cookie-Banner öffnen</a>
  158.                             {% if schulung.vorstellungslink|length > 0 %}
  159.                                 <div class="iframe-vorschau"></div>
  160.                                 <div class="ratio ratio-16x9">
  161.                                     <iframe class="video-iframe rounded-3" data-src="{{ schulung.vorstellungslink }}" alt='Video gesperrt. Bitte Targeting-Cookies zulassen.' data-cookiescript="accepted" data-cookiecategory="targeting" title="video" allowfullscreen></iframe>
  162.                                 </div>
  163.                             {% else %}
  164.                                 <img class="rounded-3" src="{{ asset('uploads/schulungen/' ~ schulung.id ~ '/titelbild/' ~ schulung.titelbild ) }}" width="100%" alt="Bild">
  165.                             {% endif %}
  166.                         </div>
  167.                         <div class="row mt-3 mb-3">
  168.                             {% if schulung.preis == 0 %}
  169.                                 <div class="col-12 text-center " style="line-height: 1.0;">
  170.                                     {% if schulung.schulungsart.id == 5 %}
  171.                                         <span class="fs-5 text-dark">Preis auf Anfrage</span><br>
  172.                                     {% else %}
  173.                                         <span class="fw-bolder fs-3 text-dark">KOSTENLOS</span><br>
  174.                                     {% endif %}
  175.                                 </div>
  176.                             {% else %}
  177.                                 {% set mwst = schulung.preis / 100 * schulung.mwst %}
  178.                                 <div class="col-12 text-center" style="line-height: 1.0;">
  179.                                     <span class="fw-bolder fs-4">{{ schulung.preis|number_format(2, ',', '.') }} Euro</span><br>
  180.                                     <span class="small text-muted fw-medium">+ {{ mwst|number_format(2, ',', '.') }} Euro MwSt.</span>
  181.                                 </div>
  182.                             {% endif %}
  183.                         </div>
  184.                         {% set istFavorit = false %}
  185.                         {% if favoriten != null %}
  186.                             {% set istFavorit = true %}
  187.                         {% endif %}
  188.                         <div class="px-lg-2 m-0 pt-0">
  189.                             <div class="row">
  190.                                 <div id="warenkorb-hinzugefuegt" class="col-12 p-0 d-none">
  191.                                     <div class="m-0 p-2 rounded bg-success text-white">
  192.                                         <i class="ci-check-circle me-2"></i>
  193.                                         <span class="fw-medium me-auto">Warenkorb wurde aktualisiert</span>
  194.                                     </div>
  195.                                 </div>
  196.                                 <div class="col-4 p-0">
  197.                                     <div class="btn-group favoriten-buttons pt-5">
  198.                                         <span class="">
  199.                                             <a href="{{ path ('user_produkt_favoriten_speichern',{id:schulung.id}) }}"
  200.                                                class="d-block heart-favorite btn-wishlist {% if istFavorit %}d-none{% endif %}"
  201.                                                title="Zu Favoriten hinzufügen"
  202.                                                data-herz-button-art="plus"
  203.                                                data-schulung-id="{{ schulung.id }}"
  204.                                                type="button">
  205.                                                 <i class="ci-heart fs-3"></i>
  206.                                             </a>
  207.                                         </span>
  208.                                         <span class="">
  209.                                             <a href="{{ path ('user_produkt_favoriten_loeschen',{id:schulung.id}) }}"
  210.                                                class="d-block heart-favorite btn-wishlist {% if istFavorit == false %}d-none{% endif %}"
  211.                                                title="aus Favoriten entfernen"
  212.                                                data-herz-button-art="minus"
  213.                                                data-schulung-id="{{ schulung.id }}"
  214.                                                type="button">
  215.                                                 <i class="mdi mdi-heart text-primary fs-3"></i>
  216.                                             </a>
  217.                                         </span>
  218.                                     </div>
  219.                                 </div>
  220.                                 <div class="col-8 text-end p-0">
  221.                                     <div class="pt-2">
  222.                                         {% if schulung.schulungsart.id != 5 %}
  223.                                             {% set buchungsLink = '' %}
  224.                                             {% if schulung.schulungsTermine|length > 0 %}
  225.                                                 {% for termin in schulung.schulungsTermine %}
  226.                                                     {% if buchungsLink == '' %}
  227.                                                         {% set buchungsLink = termin.seminarLink %}
  228.                                                     {% endif %}
  229.                                                 {% endfor %}
  230.                                             {% endif %}
  231.                                             {% if schulung.fremdanbieterStatus != 9 %}
  232.                                                 {% if is_granted('ROLE_MITGLIED') %}
  233.                                                     {% if not offeneBuchung %}
  234.                                                         {% if schulung.freigabe == 1 and schulungErlauben %}
  235.                                                             {% if is_granted('ROLE_FIRMA') %}
  236.                                                                 {% if schulung.schulungsart.id == 1 and schulung.preis == 0 %}
  237.                                                                     <a href="#" class="btn btn-primary btn-shadow d-block modal-warenkorb-hinzufuegen d-none" type="button"
  238.                                                                        data-termin-id="0"
  239.                                                                        data-bs-toggle="modal" data-bs-target="#modal-warenkorb">
  240.                                                                         <i class="ci-cart fs-5 me-2"></i>
  241.                                                                         Sofort Hinzufügen
  242.                                                                     </a>
  243.                                                                 {% else %}
  244.                                                                     <a href="#" class="btn btn-primary btn-shadow d-block modal-warenkorb-hinzufuegen d-none" type="button"
  245.                                                                        data-termin-id="0"
  246.                                                                        data-bs-toggle="modal" data-bs-target="#modal-warenkorb">
  247.                                                                         <i class="ci-cart fs-5 me-2"></i>
  248.                                                                         Hinzufügen
  249.                                                                     </a>
  250.                                                                 {% endif %}
  251.                                                             {% else %}
  252.                                                                 <a href="#" class="btn btn-primary btn-shadow d-block" type="button"
  253.                                                                    data-termin-id="0"
  254.                                                                    data-bs-toggle="modal" data-bs-target="#modal-1">
  255.                                                                     <i class="ci-cart fs-5 me-2"></i>
  256.                                                                     Hinzufügen
  257.                                                                 </a>
  258.                                                             {% endif %}
  259.                                                         {% else %}
  260.                                                             <div class="alert alert-primary d-flex" role="alert">
  261.                                                                 <div class="alert-icon">
  262.                                                                     <i class="ci-cart"></i>
  263.                                                                 </div>
  264.                                                                 <div>Gesperrt</div>
  265.                                                             </div>
  266.                                                         {% endif %}
  267.                                                         <div class="modal-warenkorb-hinzufuegen-ersatz d-none">
  268.                                                             <div class="alert alert-primary d-flex" role="alert">
  269.                                                                 <div class="alert-icon">
  270.                                                                     <i class="ci-time"></i>
  271.                                                                 </div>
  272.                                                                 <div>Termine abgelaufen</div>
  273.                                                             </div>
  274.                                                         </div>
  275.                                                         <div class="modal-warenkorb-hinzufuegen-storniert d-none">
  276.                                                             <div class="alert alert-primary d-flex" role="alert">
  277.                                                                 <div class="alert-icon">
  278.                                                                     <i class="ci-close"></i>
  279.                                                                 </div>
  280.                                                                 <div>Schulung storniert</div>
  281.                                                             </div>
  282.                                                         </div>
  283.                                                     {% else %}
  284.                                                         <a href="{{ path ('user_profil_mein_profil_info', {seite:'warenkorb'}) }}" class="btn btn-primary btn-shadow">
  285.                                                             <div class="row text-start">
  286.                                                                 <div class="col-2">
  287.                                                                     <i class="ci-cart fs-5 me-2"></i>
  288.                                                                 </div>
  289.                                                                 <div class="col-10">
  290.                                                                     Offene Buchung
  291.                                                                 </div>
  292.                                                             </div>
  293.                                                         </a>
  294.                                                     {% endif %}
  295.                                                 {% else %}
  296.                                                     <a href="{{ path ('app_login') }}" class="btn btn-primary btn-shadow d-block" type="button">
  297.                                                         <i class="ci-user fs-md me-2"></i>
  298.                                                         <small>Login erforderlich</small>
  299.                                                     </a>
  300.                                                 {% endif %}
  301.                                             {% else %}
  302.                                                 {% if not is_granted('ROLE_FIRMA') %}
  303.                                                     <a href="{{ buchungsLink }}" target="_blank"
  304.                                                        data-counter-link="{{ path ('user_produkt_fremdschulung_counter', {id:schulung.id}) }}"
  305.                                                        class="btn btn-primary btn-shadow d-block fremdanbieter-counter-link">
  306.                                                         <div class="row text-start">
  307.                                                             <div class="col-2 pt-2">
  308.                                                                 <i class="ci-link fs-5 me-2"></i>
  309.                                                             </div>
  310.                                                             <div class="col-10">
  311.                                                                 <small>Direkt buchen bei<br><b>{{ firmenprofil.firmenname }}</b></small>
  312.                                                             </div>
  313.                                                         </div>
  314.                                                     </a>
  315.                                                 {% else %}
  316.                                                     {% if schulung.freigabe == 1 and schulungErlauben %}
  317.                                                         <a href="#" class="btn btn-primary btn-shadow d-block modal-warenkorb-hinzufuegen d-none" type="button"
  318.                                                            data-termin-id="0"
  319.                                                            data-bs-toggle="modal" data-bs-target="#modal-warenkorb">
  320.                                                             <i class="ci-cart fs-5 me-2"></i>
  321.                                                             Hinzufügen
  322.                                                         </a>
  323.                                                     {% else %}
  324.                                                         <div class="alert alert-primary d-flex" role="alert">
  325.                                                             <div class="alert-icon">
  326.                                                                 <i class="ci-cart"></i>
  327.                                                             </div>
  328.                                                             <div>Gesperrt</div>
  329.                                                         </div>
  330.                                                     {% endif %}
  331.                                                     <div class="modal-warenkorb-hinzufuegen-ersatz d-none">
  332.                                                         <div class="alert alert-primary d-flex" role="alert">
  333.                                                             <div class="alert-icon">
  334.                                                                 <i class="ci-time"></i>
  335.                                                             </div>
  336.                                                             <div>Termine abgelaufen</div>
  337.                                                         </div>
  338.                                                     </div>
  339.                                                 {% endif %}
  340.                                             {% endif %}
  341.                                             {% if is_granted('ROLE_FIRMA_BUCHUNGEN') and schulung.freigabe == 1 and schulungErlauben and schulung.nurCelsisten != 4 %}
  342.                                                 <div class="mt-3">
  343.                                                     <a href="{{ path('produkt_details_empfehlen',{id:schulung.id}) }}"
  344.                                                        class="btn btn-outline-primary btn-shadow d-block modal-empfehlung-hinzufuegen pt-2 pb-1"
  345.                                                        type="button" data-bs-toggle="modal" data-bs-target="#modal-warenkorb">
  346.                                                         <i class="mdi mdi mdi-wallet-giftcard fs-5 me-2"></i>
  347.                                                         Weiterempfehlen
  348.                                                     </a>
  349.                                                 </div>
  350.                                             {% endif %}
  351.                                             {% if (schulung.schulungsart.id == 2 or schulung.schulungsart.id == 3) and schulungBeobachten == null and is_granted('ROLE_MITGLIED') %}
  352.                                                 <div class="mt-3">
  353.                                                     <a href="{{ path('produkt_details_schulung_beobachten', {id:schulung.id}) }}"
  354.                                                        class="btn btn-outline-primary btn-shadow d-block link-schulung-beobachten pt-2 pb-1">
  355.                                                         <i class="mdi mdi-robot-outline fs-5 me-2"></i>
  356.                                                         Beobachten
  357.                                                     </a>
  358.                                                 </div>
  359.                                             {% endif %}
  360.                                         {% else %}
  361.                                             {% if is_granted('ROLE_FIRMA_BUCHUNGEN') and is_granted('ROLE_FIRMA_ADMIN') and is_granted('ROLE_FIRMA_ADMIN_SCHULUNG_ANFRAGEN') and schulung.freigabe == 1 and schulungErlauben %}
  362.                                                 <a href="{{ path('firmenadmin_schulungsanfragen') }}" class="btn btn-primary btn-shadow d-block inhouse-schulung-hinzufuegen" type="button">
  363.                                                     <i class="ci-cart fs-5 me-2"></i>
  364.                                                     Hinzufügen
  365.                                                 </a>
  366.                                             {% else %}
  367.                                                 <div class="alert alert-primary d-flex" role="alert">
  368.                                                     <div class="alert-icon">
  369.                                                         <i class="ci-cart"></i>
  370.                                                     </div>
  371.                                                     <div>Gesperrt</div>
  372.                                                 </div>
  373.                                                 <small>Inhouse-Schulungen können nur von Campus-Admins gebucht werden die die Rechte für Buchungen besitzen.</small>
  374.                                             {% endif %}
  375.                                         {% endif %}
  376.                                     </div>
  377.                                 </div>
  378.                             </div>
  379.                             {% if schulungBeobachten != null %}
  380.                                 <div class="mt-3 align-items-center text-end d-block">
  381.                                     <i class="mdi mdi-robot-outline fs-5 me-2"></i>
  382.                                     Unter Beobachtung
  383.                                     <a href="{{ path('produkt_details_schulung_beobachten_loeschen', {id:schulung.id}) }}"
  384.                                        class="btn btn-outline-primary link-schulung-beobachten-loeschen p-0 ps-1 pe-1 ms-3">
  385.                                         <i class="mdi mdi-delete-outline"></i>
  386.                                     </a>
  387.                                 </div>
  388.                             {% endif %}
  389.                             {% if schulung.freigabe == 1 and schulungErlauben and empfehlung != null %}
  390.                                 <div class="mt-2 text-center small">
  391.                                     <b class="text-info">Diese Schulung wurde dir empfohlen von {{ empfehlung.vonUserName }}</b><br>
  392.                                     {% if empfehlung.terminIds != null and not is_granted('ROLE_FIRMA_BUCHUNGEN') %}
  393.                                         Die Empfehlung betrifft nur bestimmte Termine.
  394.                                         {% if schulung.schulungsTermine|length > 1 %}
  395.                                             Gehe auf <b>weitere Termine</b> und wähle dort einen passenden Termine aus.
  396.                                         {% endif %}
  397.                                     {% endif %}
  398.                                 </div>
  399.                             {% endif %}
  400.                             <!-- Abstand zum Button erhöhen -->
  401.                             <div class="pt-4"></div>
  402.                             <div class="row border-top">
  403.                                 <div class="col-3 p-0 pt-3 pb-3">
  404.                                     Seminarart:
  405.                                 </div>
  406.                                 <div class="col-9 text-end p-0 pt-3 pb-3">
  407.                                     {{ schulung.schulungsart.name }}
  408.                                 </div>
  409.                             </div>
  410.                             {% if schulung.schulungsTermine|length > 0 %}
  411.                                 {% set terminGefunden = 0 %}
  412.                                 {% set anzahlAktiveTermine = 0 %}
  413.                                 {% set videoGefunden = 0 %}
  414.                                 {% if schulung.schulungsart.id == 4 %}
  415.                                     {% if date(schulung.seminarreiheStartdatum) < date('+0seconds', 'Europe/Berlin') %}
  416.                                         {% set seminarreiheBereitsAngefangen = true %}
  417.                                     {% endif %}
  418.                                     <div class="row border-top pt-3 pb-3">
  419.                                         <div class="col-sm-5 p-0">
  420.                                             Start der Reihe:
  421.                                         </div>
  422.                                         <div class="col-sm-7 text-sm-end p-0">
  423.                                             {{ schulung.seminarreiheStartdatum|date("d.m.Y - H:i") }} Uhr<br>
  424.                                         </div>
  425.                                         {% if allgemeinerAnmeldeschluss != null %}
  426.                                             <div class="col-sm-3 mt-sm-0 mt-3 p-0 pt-1">
  427.                                                 Anmeldeschluss:
  428.                                             </div>
  429.                                             <div class="col-sm-9 text-sm-end p-0 pt-1">
  430.                                                 {{ allgemeinerAnmeldeschluss|date("d.m.Y") }}
  431.                                             </div>
  432.                                         {% endif %}
  433.                                     </div>
  434.                                 {% else %}
  435.                                     {% set seminarreiheStorniert = false %}
  436.                                 {% endif %}
  437.                                 {% if schulung.schulungsart.id == 1 or schulung.schulungsart.id == 4 %}
  438.                                     <div class="row border-top">
  439.                                         <div class="col-12 p-0 pt-3 fw-bolder">
  440.                                             In der Seminarreihe enthalten:
  441.                                         </div>
  442.                                     </div>
  443.                                 {% endif %}
  444.                                 {% set videosAusblenden = '' %}
  445.                                 {% set anzahlVideos = 0 %}
  446.                                 {% set anzahlVideosSekunden = 0 %}
  447.                                 {% set anzahlGesamtVideos = schulung.schulungsTermine|length %}
  448.                                 {% for termin in schulung.schulungsTermine|sort((a, b) => a.von <=> b.von) %}
  449.                                     {% set terminAnzeigen = 0 %}
  450.                                     {% if schulung.schulungsart.id == 1 or schulung.schulungsart.id == 4 %}
  451.                                         {% if schulung.schulungsart.id == 1 %}
  452.                                             {% set anzahlVideos = anzahlVideos + 1 %}
  453.                                             {% set hinzufuegenAnzeigen = true %}
  454.                                             {# OnDemand Videos #}
  455.                                             {% if terminGefunden == 0 %}
  456.                                                 {% set tmpTerminId = termin.id %}
  457.                                             {% endif %}
  458.                                             {% set terminGefunden = terminGefunden + 1 %}
  459.                                             {% if anzahlVideos == 3 and anzahlGesamtVideos > 4 %}
  460.                                                 {% set videosAusblenden = 'd-none' %}
  461.                                                 <div class="row border-top pb-3 videos-einblenden-div">
  462.                                                     <div class="col-12 p-0 pt-4 pb-3 text-center">
  463.                                                         Weitere {{ anzahlGesamtVideos - 2 }} Videos<br>
  464.                                                         <button class="btn btn-sm btn-outline-primary fw-bolder videos-einblenden-button" type="button">Alle {{ anzahlGesamtVideos }} Videotitel
  465.                                                             einblenden
  466.                                                         </button>
  467.                                                     </div>
  468.                                                 </div>
  469.                                             {% endif %}
  470.                                             <div class="row border-top pb-3 video-titel {{ videosAusblenden }}">
  471.                                                 <div class="col-5 p-0 pt-2 fw-bolder">
  472.                                                     Video {{ terminGefunden }}
  473.                                                 </div>
  474.                                                 <div class="col-7 p-0 pt-2 text-end">
  475.                                                     <i class="mdi mdi-filmstrip me-1"></i>
  476.                                                     {% set dauerSekunden = termin.dauer %}
  477.                                                     {% set anzahlVideosSekunden = anzahlVideosSekunden + dauerSekunden %}
  478.                                                     {% set dauerStunden = dauerSekunden/60/60 %}
  479.                                                     {% set dauerStunden = dauerStunden|round(0, 'floor') %}
  480.                                                     {% set restDauer = dauerSekunden-(dauerStunden*60*60) %}
  481.                                                     {% set dauerMinuten = restDauer/60 %}
  482.                                                     {% set dauerMinuten = dauerMinuten|round(0, 'floor') %}
  483.                                                     {% set dauerSekunden = restDauer-(dauerMinuten*60) %}
  484.                                                     {{ dauerStunden|strpad(2,'0') }}:{{ dauerMinuten|strpad(2,'0') }}:{{ dauerSekunden|strpad(2,'0') }}<br>
  485.                                                     {% if date(termin.von) <= date('+0seconds', 'Europe/Berlin') %}
  486.                                                         <small>sofort verfügbar</small>
  487.                                                     {% else %}
  488.                                                         start: {{ termin.von|date("d.m.Y") }}
  489.                                                     {% endif %}
  490.                                                 </div>
  491.                                                 {% if termin.ort|length > 0 %}
  492.                                                     <div class="col-12 p-0 pt-1 text-muted">
  493.                                                         {{ termin.ort| nl2br }}
  494.                                                     </div>
  495.                                                 {% endif %}
  496.                                             </div>
  497.                                         {% endif %}
  498.                                         {% if schulung.schulungsart.id == 4 %}
  499.                                             {% set seminart = 0 %}
  500.                                             {% if terminGefunden == 0 %}
  501.                                                 {% set tmpTerminId = termin.id %}
  502.                                             {% endif %}
  503.                                             {% set terminGefunden = 1 %}
  504.                                             {# Seminarreihe #}
  505.                                             <div class="row border-top pb-3 termine-div termin-id{{ termin.id }}">
  506.                                                 <div class="col-12 p-0 pt-3 pb-0 text-muted fw-bold">
  507.                                                     <div class="d-flex justify-content-between">
  508.                                                         {% for schulungsart in schulungsarten %}
  509.                                                             {% if schulungsart.id == termin.seminarreiheSchulungsart %}
  510.                                                                 {{ schulungsart.name }}
  511.                                                                 {% set seminart = termin.seminarreiheSchulungsart %}
  512.                                                             {% endif %}
  513.                                                         {% endfor %}
  514.                                                         {% if termin.status == 1 %}
  515.                                                             <span class="text-danger">Termin storniert</span>
  516.                                                         {% else %}
  517.                                                             {% set seminarreiheStorniert = false %}
  518.                                                         {% endif %}
  519.                                                     </div>
  520.                                                 </div>
  521.                                                 {% if seminart == 1 %}
  522.                                                     {% set videoGefunden = videoGefunden + 1 %}
  523.                                                     <div class="col-sm-4 p-0 pt-sm-3">
  524.                                                         Video {{ videoGefunden }}
  525.                                                     </div>
  526.                                                     <div class="col-sm-8 p-0 pt-sm-3 text-sm-end">
  527.                                                         {% if date(termin.von) <= date('+0seconds', 'Europe/Berlin') %}
  528.                                                             sofort verfügbar
  529.                                                         {% else %}
  530.                                                             start: {{ termin.von|date("d.m.Y") }}
  531.                                                         {% endif %}
  532.                                                     </div>
  533.                                                     <div class="col-sm-5 mt-3 mt-sm-0 p-0">
  534.                                                         Länge:
  535.                                                     </div>
  536.                                                     <div class="col-sm-7 p-0 text-sm-end">
  537.                                                         {% set dauerSekunden = termin.dauer %}
  538.                                                         {% set dauerStunden = dauerSekunden/60/60 %}
  539.                                                         {% set dauerStunden = dauerStunden|round(0, 'floor') %}
  540.                                                         {% set restDauer = dauerSekunden-(dauerStunden*60*60) %}
  541.                                                         {% set dauerMinuten = restDauer/60 %}
  542.                                                         {% set dauerMinuten = dauerMinuten|round(0, 'floor') %}
  543.                                                         {% set dauerSekunden = restDauer-(dauerMinuten*60) %}
  544.                                                         {{ dauerStunden|strpad(2,'0') }}:{{ dauerMinuten|strpad(2,'0') }}:{{ dauerSekunden|strpad(2,'0') }}
  545.                                                     </div>
  546.                                                     {% if termin.ort|length > 0 %}
  547.                                                         <div class="col-sm-5 mt-3 mt-sm-0 p-0 pt-1">
  548.                                                             Info:
  549.                                                         </div>
  550.                                                         <div class="col-sm-7 p-0 pt-1 text-sm-end">
  551.                                                             {{ termin.ort| nl2br }}
  552.                                                         </div>
  553.                                                     {% endif %}
  554.                                                 {% else %}
  555.                                                     <div class="col-sm-5 p-0 pt-1">
  556.                                                         Start:
  557.                                                     </div>
  558.                                                     <div class="col-sm-7 p-0 pt-1 text-sm-end">
  559.                                                         {{ termin.von|date("d.m.Y - H:i") }} Uhr<br>
  560.                                                     </div>
  561.                                                     <div class="col-sm-5 mt-3 mt-sm-0 p-0 pt-1">
  562.                                                         Ende:
  563.                                                     </div>
  564.                                                     <div class="col-sm-7 p-0 pt-1 text-sm-end">
  565.                                                         {{ termin.bis|date("d.m.Y - H:i") }} Uhr<br>
  566.                                                     </div>
  567.                                                     <div class="col-sm-5 mt-3 mt-sm-0 p-0 pt-1">
  568.                                                         verfügbare Plätze:
  569.                                                     </div>
  570.                                                     <div class="col-sm-7 p-0 pt-1 text-sm-end">
  571.                                                         {% set terminWaehlen = true %}
  572.                                                         {% if termin.maxPlaetze == 0 and termin.nochPlaetzeFrei == 0 %}
  573.                                                             {% set hinzufuegenAnzeigen = true %}
  574.                                                             kein Limit
  575.                                                         {% else %}
  576.                                                             {% for freierPlatz in freiePlaetze %}
  577.                                                                 {% if freierPlatz.terminId == termin.id %}
  578.                                                                     {% if freierPlatz.freiePlaetze == 0 %}
  579.                                                                         {% set hinzufuegenAnzeigen = true %}
  580.                                                                         kein Limit<br>
  581.                                                                     {% else %}
  582.                                                                         {% if freierPlatz.freiePlaetze == -1 %}
  583.                                                                             {% set terminWaehlen = false %}
  584.                                                                             0 {% if termin.maxPlaetze > 0 %} von {{ termin.maxPlaetze }}{% endif %}
  585.                                                                         {% else %}
  586.                                                                             {% set hinzufuegenAnzeigen = true %}
  587.                                                                             {{ freierPlatz.freiePlaetze }}{% if termin.maxPlaetze > 0 %} von {{ termin.maxPlaetze }}{% endif %}<br>
  588.                                                                         {% endif %}
  589.                                                                     {% endif %}
  590.                                                                 {% endif %}
  591.                                                             {% endfor %}
  592.                                                         {% endif %}
  593.                                                     </div>
  594.                                                     {% if termin.dozentUser != null or termin.dozent|length > 0 %}
  595.                                                         <div class="col-sm-5 mt-3 mt-sm-0 p-0 pt-1">
  596.                                                             Dozent:
  597.                                                         </div>
  598.                                                         <div class="col-sm-7 p-0 pt-1 text-sm-end">
  599.                                                             {% if termin.dozentUser != null %}
  600.                                                                 <a href="{{ path('user_dozent', {id:termin.dozentUser.id}) }}">{{ termin.dozent }}</a>
  601.                                                             {% else %}
  602.                                                                 {{ termin.dozent }}
  603.                                                             {% endif %}
  604.                                                         </div>
  605.                                                     {% endif %}
  606.                                                     {% if termin.ort|length > 0 %}
  607.                                                         <div class="col-sm-5 mt-3 mt-sm-0 p-0 pt-1">
  608.                                                             Ort:
  609.                                                         </div>
  610.                                                         <div class="col-sm-7 p-0 pt-1 text-sm-end">
  611.                                                             {{ termin.ort| nl2br }}
  612.                                                         </div>
  613.                                                     {% endif %}
  614.                                                     {% if termin.webtool == 1 %}
  615.                                                         <div class="col-sm-5 mt-3 mt-sm-0 p-0 pt-1">
  616.                                                             Plattform:
  617.                                                         </div>
  618.                                                         <div class="col-sm-7 p-0 pt-1 text-sm-end">
  619.                                                             Campus GoTo-Webinar
  620.                                                         </div>
  621.                                                     {% endif %}
  622.                                                     {% if termin.webtool == 2 %}
  623.                                                         <div class="col-sm-5 mt-3 mt-sm-0 p-0 pt-1">
  624.                                                             Plattform:
  625.                                                         </div>
  626.                                                         <div class="col-sm-7 p-0 pt-1 text-sm-end">
  627.                                                             Externer Link per E-Mail
  628.                                                         </div>
  629.                                                     {% endif %}
  630.                                                 {% endif %}
  631.                                             </div>
  632.                                         {% endif %}
  633.                                     {% else %}
  634.                                         {% if termin.status == 0 %}
  635.                                             {% if queryTerminId == 0 %}
  636.                                                 {% if termin.anmeldeschluss == null %}
  637.                                                     {% if date(termin.bis) >= date('+0seconds', 'Europe/Berlin') %}
  638.                                                         {% set terminAnzeigen = 1 %}
  639.                                                     {% endif %}
  640.                                                 {% else %}
  641.                                                     {% if termin.anmeldeschluss >= date('-1days', 'Europe/Berlin') %}
  642.                                                         {% set terminAnzeigen = 1 %}
  643.                                                     {% endif %}
  644.                                                 {% endif %}
  645.                                                 {% if terminAnzeigen == 1 %}
  646.                                                     {% if termin.maxPlaetze == 0 and termin.nochPlaetzeFrei == 0 %}
  647.                                                         {% set terminAnzeigen = 1 %}
  648.                                                     {% else %}
  649.                                                         {% for freierPlatz in freiePlaetze %}
  650.                                                             {% if freierPlatz.terminId == termin.id %}
  651.                                                                 {% if freierPlatz.freiePlaetze == 0 %}
  652.                                                                     {% set terminAnzeigen = 1 %}
  653.                                                                 {% else %}
  654.                                                                     {% if freierPlatz.freiePlaetze == -1 %}
  655.                                                                         {% set terminAnzeigen = 0 %}
  656.                                                                     {% else %}
  657.                                                                         {% set terminAnzeigen = 1 %}
  658.                                                                     {% endif %}
  659.                                                                 {% endif %}
  660.                                                             {% endif %}
  661.                                                         {% endfor %}
  662.                                                     {% endif %}
  663.                                                 {% endif %}
  664.                                             {% else %}
  665.                                                 {# queryTerminId wurde von einer anderen Seite hierher übergeben. Termin wird dann angezeigt #}
  666.                                                 {% if termin.id == queryTerminId %}
  667.                                                     {% set terminAnzeigen = 1 %}
  668.                                                 {% endif %}
  669.                                             {% endif %}
  670.                                         {% endif %}
  671.                                         {% if terminAnzeigen == 1 %}
  672.                                             {% set hinzufuegenAnzeigen = true %}
  673.                                             {% set anzahlAktiveTermine = anzahlAktiveTermine + 1 %}
  674.                                             {% if terminGefunden == 0 %}
  675.                                                 {% set tmpTerminId = termin.id %}
  676.                                             {% endif %}
  677.                                             <div class="row border-top pb-3 termine-div termin-id{{ termin.id }} {% if terminGefunden == 1 %}d-none{% endif %}">
  678.                                                 <div class="col-sm-5 p-0 pt-3 fw-bold">
  679.                                                     Termin-Info:
  680.                                                 </div>
  681.                                                 <div class="col-sm-7 text-sm-end p-0 pt-sm-3">
  682.                                                     {% if schulung.schulungsTermine|length > 1 %}
  683.                                                         <a class="lade-modal-fenster" title="alle Termine anzeigen"
  684.                                                            href="{{ path ('produkt_details_termine',{id:schulung.id}) }}"
  685.                                                            data-bs-toggle="modal" data-bs-target="#scrollable-modal">
  686.                                                             <i class="mdi mdi-clock me-1"></i>weitere Termine
  687.                                                         </a>
  688.                                                     {% endif %}
  689.                                                 </div>
  690.                                                 <div class="col-sm-5 mt-3 mt-sm-0 p-0 pt-1">
  691.                                                     Start:
  692.                                                 </div>
  693.                                                 <div class="col-sm-7 p-0 pt-1 text-sm-end">
  694.                                                     {{ termin.von|date("d.m.Y - H:i") }} Uhr<br>
  695.                                                 </div>
  696.                                                 <div class="col-sm-5 mt-3 mt-sm-0 p-0 pt-1">
  697.                                                     Ende:
  698.                                                 </div>
  699.                                                 <div class="col-sm-7 p-0 pt-1 text-sm-end">
  700.                                                     {{ termin.bis|date("d.m.Y - H:i") }} Uhr<br>
  701.                                                 </div>
  702.                                                 {% if termin.anmeldeschluss != null %}
  703.                                                     <div class="col-sm-5 mt-3 mt-sm-0 p-0 pt-1">
  704.                                                         Anmeldeschluss:
  705.                                                     </div>
  706.                                                     <div class="col-sm-7 p-0 pt-1 text-sm-end">
  707.                                                         {{ termin.anmeldeschluss|date("d.m.Y") }}
  708.                                                     </div>
  709.                                                 {% endif %}
  710.                                                 <div class="col-sm-5 mt-3 mt-sm-0 p-0 pt-1">
  711.                                                     verfügbare Plätze:
  712.                                                 </div>
  713.                                                 <div class="col-sm-7 p-0 pt-1 text-sm-end">
  714.                                                     {% set terminWaehlen = true %}
  715.                                                     {% if termin.maxPlaetze == 0 and termin.nochPlaetzeFrei == 0 %}
  716.                                                         kein Limit
  717.                                                     {% else %}
  718.                                                         {% for freierPlatz in freiePlaetze %}
  719.                                                             {% if freierPlatz.terminId == termin.id %}
  720.                                                                 {% if freierPlatz.freiePlaetze == 0 %}
  721.                                                                     kein Limit<br>
  722.                                                                 {% else %}
  723.                                                                     {% if freierPlatz.freiePlaetze == -1 %}
  724.                                                                         {% set terminWaehlen = false %}
  725.                                                                         <span class="text-danger">Ausgebucht</span>
  726.                                                                     {% else %}
  727.                                                                         {{ freierPlatz.freiePlaetze }}{% if termin.maxPlaetze > 0 %} von {{ termin.maxPlaetze }}{% endif %}<br>
  728.                                                                     {% endif %}
  729.                                                                 {% endif %}
  730.                                                             {% endif %}
  731.                                                         {% endfor %}
  732.                                                     {% endif %}
  733.                                                 </div>
  734.                                                 <div class="col-sm-5 mt-3 mt-sm-0 p-0 pt-1">
  735.                                                     Dozent:
  736.                                                 </div>
  737.                                                 <div class="col-sm-7 p-0 pt-1 text-sm-end">
  738.                                                     {% if termin.dozentUser != null %}
  739.                                                         <a href="{{ path('user_dozent', {id:termin.dozentUser.id}) }}">{{ termin.dozent }}</a>
  740.                                                     {% else %}
  741.                                                         {{ termin.dozent }}
  742.                                                     {% endif %}
  743.                                                 </div>
  744.                                                 <div class="col-sm-5 mt-3 mt-sm-0 p-0 pt-1">
  745.                                                     Ort:
  746.                                                 </div>
  747.                                                 <div class="col-sm-7 p-0 pt-1 text-sm-end">
  748.                                                     {{ termin.ort| nl2br }}
  749.                                                     {% for entfernung in entfernungen %}
  750.                                                         {% if entfernung.terminId == termin.id %}
  751.                                                             {% set lat = 0 %}
  752.                                                             {% set len = 0 %}
  753.                                                             {% if app.user.userProfil.googleLat != null %}
  754.                                                                 {% set lat = app.user.userProfil.googleLat %}
  755.                                                                 {% set len = app.user.userProfil.googleLen %}
  756.                                                             {% else %}
  757.                                                                 {% if app.user.firmenProfil is defined and app.user.firmenProfil.googleLat != null %}
  758.                                                                     {% set lat = app.user.firmenProfil.googleLat %}
  759.                                                                     {% set len = app.user.firmenProfil.googleLen %}
  760.                                                                 {% endif %}
  761.                                                             {% endif %}
  762.                                                             {% if lat != 0 %}
  763.                                                                 {% if mehrereOrteLat != '' and mehrereOrteLat != lat and mehrereOrteLen != len %}
  764.                                                                     {% set mehrereOrte = true %}
  765.                                                                     xxx
  766.                                                                 {% endif %}
  767.                                                                 {% set mehrereOrteLat = termin.googleLat %}
  768.                                                                 {% set mehrereOrteLen = termin.googleLen %}
  769.                                                                 <br>
  770.                                                                 <span class="text-muted">({{ entfernung.km }} km)</span>
  771.                                                                 <a href="https://www.google.com/maps/dir/?api=1&origin={{ lat }},{{ len }}&destination={{ termin.googleLat }},{{ termin.googleLen }}&travelmode=car"
  772.                                                                    target="_blank" title="Google-Maps öffnen">
  773.                                                                     <i class="mdi mdi-google-maps fs-5"></i>
  774.                                                                 </a>
  775.                                                             {% endif %}
  776.                                                         {% endif %}
  777.                                                     {% endfor %}
  778.                                                     <div class="mt-2 weitereOrteButton d-none">
  779.                                                         <a class="lade-modal-fenster" title="alle Termine anzeigen"
  780.                                                            href="{{ path ('produkt_details_termine',{id:schulung.id}) }}"
  781.                                                            data-bs-toggle="modal" data-bs-target="#scrollable-modal">
  782.                                                             <i class="mdi mdi-clock me-1"></i>weitere Orte Vorhanden
  783.                                                         </a>
  784.                                                     </div>
  785.                                                 </div>
  786.                                             </div>
  787.                                             {% set terminGefunden = 1 %}
  788.                                         {% endif %}
  789.                                     {% endif %}
  790.                                 {% endfor %}
  791.                                 {% if terminGefunden == 0 %}
  792.                                     <div class="row mb-3">
  793.                                         <div class="col-12 text-end p-0">
  794.                                             {% if schulung.schulungsTermine|length > 1 %}
  795.                                                 <a class="lade-modal-fenster" title="alle Termine anzeigen"
  796.                                                    href="{{ path ('produkt_details_termine',{id:schulung.id}) }}"
  797.                                                    data-bs-toggle="modal" data-bs-target="#scrollable-modal">
  798.                                                     <i class="mdi mdi-clock me-1"></i>Termine
  799.                                                 </a>
  800.                                             {% endif %}
  801.                                         </div>
  802.                                     </div>
  803.                                 {% endif %}
  804.                                 {% if schulung.schulungsart.id == 1 %}
  805.                                     {% set dauerStunden = anzahlVideosSekunden/60/60 %}
  806.                                     {% set dauerStunden = dauerStunden|round(0, 'floor') %}
  807.                                     {% set restDauer = anzahlVideosSekunden-(dauerStunden*60*60) %}
  808.                                     {% set dauerMinuten = restDauer/60 %}
  809.                                     {% set dauerMinuten = dauerMinuten|round(0, 'floor') %}
  810.                                     {% set dauerSekunden = restDauer-(dauerMinuten*60) %}
  811.                                     <div class="row border-top pb-3 pt-3">
  812.                                         <div class="col-12 p-0">
  813.                                             Ges. Video-Länge:
  814.                                             <b>{{ dauerStunden|strpad(2,'0') }}:{{ dauerMinuten|strpad(2,'0') }}:{{ dauerSekunden|strpad(2,'0') }}</b>
  815.                                         </div>
  816.                                     </div>
  817.                                 {% endif %}
  818.                             {% endif %}
  819.                             {% if schulung.kursinhalt != null %}
  820.                                 <div class="row border-top pb-3">
  821.                                     <div class="col-sm-5 mt-3 mt-sm-0 p-0 pt-1">
  822.                                         Kursinhalt:
  823.                                     </div>
  824.                                     <div class="col-sm-7 p-0 pt-1 text-sm-end">
  825.                                         {{ schulung.kursinhalt }}
  826.                                     </div>
  827.                                 </div>
  828.                             {% endif %}
  829.                             <div class="row border-top pb-3">
  830.                                 <div class="col-sm-3 mt-3 mt-sm-0 p-0 pt-1">
  831.                                     Thema:
  832.                                 </div>
  833.                                 <div class="col-sm-9 p-0 pt-1 text-sm-end">
  834.                                     {% set counter = 0 %}
  835.                                     {% for meineThemengebiete in meine_themengebiete %}
  836.                                         {% for themengebiet in themengebiete %}
  837.                                             {% if meineThemengebiete == themengebiet.id %}
  838.                                                 {% if counter != 0 %},{% endif %}
  839.                                                 {{ themengebiet.thema }}
  840.                                                 {% set counter = counter + 1 %}
  841.                                             {% endif %}
  842.                                         {% endfor %}
  843.                                     {% endfor %}
  844.                                 </div>
  845.                             </div>
  846.                             <div class="row border-top pb-3">
  847.                                 <div class="col-sm-3 mt-3 mt-sm-0 p-0 pt-1">
  848.                                     Zielgruppen:
  849.                                 </div>
  850.                                 <div class="col-sm-9 p-0 pt-1 text-sm-end">
  851.                                     {% set counter = 0 %}
  852.                                     {% for meineZielgruppen in meine_zielgruppen %}
  853.                                         {% for zielgruppe in zielgruppen %}
  854.                                             {% if meineZielgruppen == zielgruppe.id %}
  855.                                                 {% if counter != 0 %}•{% endif %}
  856.                                                 {{ zielgruppe.name }}
  857.                                                 {% set counter = counter + 1 %}
  858.                                             {% endif %}
  859.                                         {% endfor %}
  860.                                     {% endfor %}
  861.                                 </div>
  862.                             </div>
  863.                             <div class="row border-top">
  864.                                 <div class="col-12 p-0 pt-3 text-center">
  865.                                     <h6 class="pt-2 mb-3">{{ firmenprofil.firmenname }}</h6>
  866.                                     {% if firmenprofil.logo|length > 0 %}
  867.                                         <img src="{{ asset('uploads/firmen/logo/' ~ firmenprofil.id ~ '/'~ firmenprofil.logo ) }}" class="shadow-sm" style="max-height: 100px">
  868.                                     {% endif %}
  869.                                     <div class="mt-4">
  870.                                         {% if firmenprofil.webseite != null %}
  871.                                             <a href="{{ firmenprofil.webseite }}" target="_blank" class="btn-social bs-pinterest bs-outline me-3 fs-4">
  872.                                                 <i class="ci-globe"></i>
  873.                                             </a>
  874.                                         {% endif %}
  875.                                         {% if firmenprofil.instagram != null %}
  876.                                             <a href="{{ firmenprofil.instagram }}" target="_blank" class="btn-social bs-instagram bs-outline me-3 fs-4">
  877.                                                 <i class="ci-instagram"></i>
  878.                                             </a>
  879.                                         {% endif %}
  880.                                         {% if firmenprofil.facebook != null %}
  881.                                             <a href="{{ firmenprofil.facebook }}" target="_blank" class="btn-social bs-facebook bs-outline me-3 fs-4">
  882.                                                 <i class="ci-facebook"></i>
  883.                                             </a>
  884.                                         {% endif %}
  885.                                         {% if firmenprofil.youtube != null %}
  886.                                             <a href="{{ firmenprofil.youtube }}" target="_blank" class="btn-social bs-youtube bs-outline me-3 fs-4">
  887.                                                 <i class="ci-youtube"></i>
  888.                                             </a>
  889.                                         {% endif %}
  890.                                     </div>
  891.                                 </div>
  892.                             </div>
  893.                         </div>
  894.                     </div>
  895.                 </div>
  896.             </aside>
  897.         </div>
  898.         <div class="card px-lg-2 border-0 mt-4 ms-2 me-2">
  899.             <div class="card-body px-1 pt-4 pb-4">
  900.                 <h3 class="text-center pb-3">Weitere Schulungsvorschläge</h3>
  901.                 {% set anzahlVorschlaege = 0 %}
  902.                 {% if vorschlagRang|length > 0 %}
  903.                     <div class="row pt-2 mx-n2">
  904.                         {% for rang in vorschlagRang %}
  905.                             {% for schulung in vorschlaege %}
  906.                                 {% if rang.schulungsId == schulung.id %}
  907.                                     {% set anzahlVorschlaege = anzahlVorschlaege + 1 %}
  908.                                     <div class="col-lg-4 col-md-6 px-2 mb-grid-gutter weitere-Vorschlaege {% if anzahlVorschlaege > 6 %}d-none{% endif %}">
  909.                                         <div class="card product-card-alt">
  910.                                             <div class="product-thumb">
  911.                                                 <a class="product-thumb-overlay"
  912.                                                    href="{{ path ('produkt_details',{id:schulung.id}) }}{% if schulung.nurCelsisten == 4 %}?guid={{ schulung.importFehler }}{% endif %}"></a>
  913.                                                 {% if schulung.importId == 0 %}
  914.                                                     <img src="{{ asset('uploads/schulungen/' ~ schulung.id ~ '/titelbild/' ~ schulung.titelbild ) }}" loading="lazy">
  915.                                                 {% else %}
  916.                                                     <div class="ratio ratio-16x9">
  917.                                                         <div style="background-image: url('{{ asset('uploads/schulungen/' ~ schulung.id ~ '/titelbild/' ~ schulung.titelbild) }}'); width: 100%; background-size: cover; background-repeat: no-repeat;"></div>
  918.                                                     </div>
  919.                                                 {% endif %}
  920.                                                 <i class="mdi mdi-heart fs-1 text-primary heart-favorite {% if istFavorit == false %}d-none{% endif %}"></i>
  921.                                             </div>
  922.                                             <div class="card-body">
  923.                                                 <div class="d-flex flex-wrap justify-content-between align-items-start pb-2">
  924.                                                     <div class="text-muted fs-xs me-1">
  925.                                                         {% for vorschlaegeFirmenprofil in vorschlaegeFirmen %}
  926.                                                             {% if schulung.erstellerFirmenId == vorschlaegeFirmenprofil.id %}
  927.                                                                 <a class="product-meta fw-medium"
  928.                                                                    href="#">{{ vorschlaegeFirmenprofil.firmenname }}</a>
  929.                                                             {% endif %}
  930.                                                         {% endfor %}
  931.                                                     </div>
  932.                                                     {% set anzahlSterneVergabe = 0 %}
  933.                                                     {% set SterneGesamt = 0 %}
  934.                                                     {% set SterneErgebnis = 0 %}
  935.                                                     {% for bewertung in schulung.bewertungen %}
  936.                                                         {% set anzahlSterneVergabe = anzahlSterneVergabe + 1 %}
  937.                                                         {% set SterneGesamt = SterneGesamt + bewertung.sterne %}
  938.                                                     {% endfor %}
  939.                                                     {% if anzahlSterneVergabe != 0 %}
  940.                                                         {% set SterneErgebnis = SterneGesamt / anzahlSterneVergabe %}
  941.                                                     {% endif %}
  942.                                                     <div class="star-rating">
  943.                                                         <i class="star-rating-icon ci-star{% if SterneErgebnis >= 1 %}-filled active{% endif %}"></i>
  944.                                                         {% for i in 1..4 %}
  945.                                                             {% set stern = '' %}
  946.                                                             {% if SterneErgebnis >= i + 0.5 %}
  947.                                                                 {% set stern = '-half active' %}
  948.                                                             {% endif %}
  949.                                                             {% if SterneErgebnis >= i + 1 %}
  950.                                                                 {% set stern = '-filled active' %}
  951.                                                             {% endif %}
  952.                                                             <i class="star-rating-icon ci-star{{ stern }}"></i>
  953.                                                         {% endfor %}
  954.                                                     </div>
  955.                                                 </div>
  956.                                                 <h3 class="product-title fs-sm mb-2 fw-bold">
  957.                                                     <a href="{{ path ('produkt_details',{id:schulung.id}) }}{% if schulung.nurCelsisten == 4 %}?guid={{ schulung.importFehler }}{% endif %}">{{ schulung.schulungName }}</a>
  958.                                                 </h3>
  959.                                                 <div class="fs-sm me-2">{{ schulung.kurzbeschreibung|u.truncate(130, '...',false) }}</div>
  960.                                                 <div class="d-flex flex-wrap justify-content-between align-items-center mt-3">
  961.                                                     <div class="fs-sm me-2 text-muted">{{ schulung.schulungsart.name }}</div>
  962.                                                     {% if schulung.schulungsTermine|length > 0 %}
  963.                                                         {% set terminGefunden = 0 %}
  964.                                                         {% for termin in schulung.schulungsTermine|sort((a, b) => a.von <=> b.von) %}
  965.                                                             {% if terminGefunden == 0 %}
  966.                                                                 {% set terminAnzeigen = 0 %}
  967.                                                                 {% if termin.anmeldeschluss == null %}
  968.                                                                     {% if date(termin.von) >= date('+0seconds', 'Europe/Berlin') %}
  969.                                                                         {% set terminAnzeigen = 1 %}
  970.                                                                     {% endif %}
  971.                                                                 {% else %}
  972.                                                                     {% if termin.anmeldeschluss >= date('-1days', 'Europe/Berlin') %}
  973.                                                                         {% set terminAnzeigen = 1 %}
  974.                                                                     {% endif %}
  975.                                                                 {% endif %}
  976.                                                                 {% if terminAnzeigen == 1 %}
  977.                                                                     <div class="text-muted rounded-1 py-1 px-2 small"><i
  978.                                                                                 class="mdi mdi-clock-outline me-1"></i>{{ termin.von|date("d.m.Y") }}</div>
  979.                                                                     {% set terminGefunden = 1 %}
  980.                                                                 {% endif %}
  981.                                                             {% endif %}
  982.                                                         {% endfor %}
  983.                                                     {% endif %}
  984.                                                 </div>
  985.                                             </div>
  986.                                         </div>
  987.                                         <div class="d-md-none border-top"></div>
  988.                                     </div>
  989.                                     {% if anzahlVorschlaege == 6 and vorschlagRang|length > 6 %}
  990.                                         <div class="text-center">
  991.                                             <div class="btn btn-outline-primary weitere-vorschlaege-anzeigen" style="cursor: pointer">
  992.                                                 mehr Vorschläge anzeigen
  993.                                                 <i class="ci-arrow-right fs-ms ms-1"></i>
  994.                                             </div>
  995.                                         </div>
  996.                                     {% endif %}
  997.                                 {% endif %}
  998.                             {% endfor %}
  999.                         {% endfor %}
  1000.                     </div>
  1001.                 {% endif %}
  1002.             </div>
  1003.         </div>
  1004.     </div>
  1005. </section>
  1006. <!-- Product description + Reviews + Comments-->
  1007. <script>
  1008.     jQuery(function ($) {
  1009.         let tmpTerminId = {{ tmpTerminId }};
  1010.         $('.modal-warenkorb-hinzufuegen').attr('data-termin-id', tmpTerminId);
  1011.         {% if hinzufuegenAnzeigen and not seminarreiheBereitsAngefangen and not seminarreiheStorniert %}
  1012.         $('.modal-warenkorb-hinzufuegen').removeClass('d-none');
  1013.         {% else %}
  1014.         {% if seminarreiheStorniert %}
  1015.         $('.modal-warenkorb-hinzufuegen-storniert').removeClass('d-none');
  1016.         {% else %}
  1017.         $('.modal-warenkorb-hinzufuegen-ersatz').removeClass('d-none');
  1018.         {% endif %}
  1019.         $('.modal-empfehlung-hinzufuegen').addClass('d-none');
  1020.         {% endif %}
  1021.         {% if mehrereOrte %}
  1022.         $('.weitereOrteButton').removeClass('d-none');
  1023.         {% endif %}
  1024.         $('.videos-einblenden-button').on('click', function (event) {
  1025.             event.preventDefault();
  1026.             $('.videos-einblenden-div').addClass('d-none');
  1027.             $('.video-titel').removeClass('d-none');
  1028.         });
  1029.         $('.weitere-vorschlaege-anzeigen').on('click', function (event) {
  1030.             $('.weitere-vorschlaege-anzeigen').addClass('d-none');
  1031.             $('.weitere-Vorschlaege').removeClass('d-none');
  1032.         });
  1033.         if(!CookieScript.instance.currentState().categories.includes('targeting')) {
  1034.             $('.video-cookie').removeClass('d-none');
  1035.         }
  1036.     });
  1037. </script>