{#
#}
{% if buchungen|length > 0 %}
<div class="fs-6 fw-bold border-bottom pb-1">Offene Buchungen</div>
<div style="max-height: 30rem;" data-simplebar data-simplebar-auto-hide="false">
{% for buchung in buchungen %}
{% for seminare in buchung.buchungenSeminare %}
<div class="widget-cart-item pt-2 pb-2 border-bottom warenkorb-id-{{ buchung.id }}">
<a href="{{ path('user_bestellung_loeschen',{id:buchung.id}) }}" class="btn-close btn-lg text-danger link-warenkorb-loeschen"
type="button" aria-label="Remove" style="margin-top: -20px">
<span aria-hidden="true">×</span>
</a>
<div class="d-flex">
<a class="d-block flex-shrink-0" href="{{ path('produkt_details',{id:seminare.termin.schulung.id}) }}{% if seminare.termin.schulung.nurCelsisten == 4 %}?guid={{ seminare.termin.schulung.importFehler }}{% endif %}">
<img src="{{ asset('uploads/schulungen/' ~ seminare.termin.schulung.id ~ '/titelbild/' ~ seminare.termin.schulung.titelbild ) }}"
class="pe-2" width="80">
</a>
<div class="ps-2">
<h6 class="widget-product-title">
<a href="{{ path('produkt_details',{id:seminare.termin.schulung.id}) }}{% if seminare.termin.schulung.nurCelsisten == 4 %}?guid={{ seminare.termin.schulung.importFehler }}{% endif %}">{{ seminare.termin.schulung.schulungName }}</a>
</h6>
<div class="widget-product-meta">
<span class=""><i class="mdi mdi-account-outline"></i> {{ seminare.anzahlTeilnehmer }}
<span class="blog-entry-meta-divider mx-1"></span>
<span class="fw-bolder me-2">{{ buchung.preisMitMwst|number_format(2, ',', '.') }} € </span> <small>({{ buchung.preis|number_format(2, ',', '.') }} €)</small>
</span>
</div>
<div class="widget-product-meta">
<a class="btn btn-sm btn-outline-secondary mt-2" href="{{ path('user_bestellung',{id:buchung.id}) }}">zur Buchung<i class="ci-arrow-right ms-1 me-n1"></i></a>
</div>
</div>
</div>
</div>
{% endfor %}
{% endfor %}
</div>
{% else %}
<div class="text-center">Warenkorb ist leer</div>
{% endif %}
{#
{% if buchungen > 0 %}
<div class="text-center border-top mt-2 pt-4 mb-0 pb-0">
<a class="btn btn-sm btn-primary"
href="{{ path ('user_profil_mein_profil_info', {seite:'buchungen'}) }}">
<i class="ci-arrow-left me-2"></i>offene Buchungen: {{ buchungen }}
</a>
</div>
{% endif %}
#}
<script>
jQuery(function ($) {
{% if buchungen|length > 0 %}
$('.warenkorb-navigation-link').removeClass('d-none');
$('#warenkorb-navigation-anzahl').text('{{ buchungen|length }}');
$("#warenkorb-navigation-anzahl").css("visibility", "visible");
$('.warenkorb-handy-navigation-link').removeClass('d-none');
$('#warenkorb-handy-navigation-anzahl').text('{{ buchungen|length }}');
$("#warenkorb-handy-navigation-anzahl").css("visibility", "visible");
{% else %}
$('.warenkorb-navigation-link').addClass('d-none');
$('#warenkorb-navigation-anzahl').text('0');
$("#warenkorb-navigation-anzahl").css("visibility", "hidden");
$('.warenkorb-handy-navigation-link').addClass('d-none');
$('#warenkorb-handy-navigation-anzahl').text('0');
$("#warenkorb-handy-navigation-anzahl").css("visibility", "hidden");
{% endif %}
});
</script>