<turbo-frame id="tab_content"> {% if app.user and history and (history|length) > 0 and app.user %} {% do section_navigation_add({ name: 'auction-history', anchor: 'auction-history' }) %} <section id="auction-history" class="container p-4 bg-white shadow-xl sm:p-8 xl:p-16"> <h2 class="text-lg font-medium uppercase md:text-xl font-headline mb-7"> {{ 'auction-history'|trans }} </h2> <ul class="grid gap-y-6"> {% for entry in history %} {% set color = entry.auction.auctionhouse ? entry.auction.auctionhouse.color %} <li class="p-4" style="background-color: {{ color }}"> <a data-turbo="false" href="{{ path( 'network_auction_detail', { id: entry.auction.id, slug: entry.auction.slug } ) }}"> <h3 class="mb-2 text-base text-white uppercase md:text-lg font-headline"> {{ entry.auction.title }} </h3> {% set now = 'now'|carbon %} {% if entry.auction.end > now %} <h3 class="text-sm font-bold tracking-wide text-white uppercase"> {% if entry.auction.start > now %} {{ 'auction-starts-in'|trans }} {% else %} {{ 'auction-ends-in'|trans }} {% endif %} </h3> {% include 'auction/auction_countdown.html.twig' with { auction: auction } only %} {% else %} <h3 class="my-6 text-sm font-bold tracking-wide text-white uppercase"> {{ 'auction-ended'|trans }} </h3> {% endif %} </a> <div class="px-2 text-xs font-medium tracking-wider text-white uppercase rounded-full bg-primary-500 w-max"> {{ entry.status|trans }} </div> <div class="grid-cols-12 mt-2 text-white md:grid"> <div class="hidden md:contents"> <div class="col-span-2 px-3 py-1 text-xs font-medium uppercase bg-white bg-opacity-20"> {{ 'number'|trans }} </div> <div class="col-span-4 px-3 py-1 text-xs font-medium uppercase bg-white bg-opacity-20"> {{ 'Seller'|trans }} </div> <div class="col-span-4 px-3 py-1 text-xs font-medium uppercase bg-white bg-opacity-20"> {{ 'buyer'|trans }} </div> <div class="col-span-2 px-3 py-1 text-xs font-medium text-right uppercase bg-white bg-opacity-20"> {{ 'price'|trans }} </div> </div> {# {% apply pimcore_glossary %} #} <div class="contents"> <div class="flex items-center justify-between col-span-2 px-3 my-1 bg-white bg-opacity-20 md:bg-opacity-0"> <span class="text-xs font-medium uppercase md:hidden">{{ 'number'|trans }}</span> <span>{{ entry.number }}</span> </div> <div class="flex items-center justify-between col-span-4 px-3 my-1 bg-white bg-opacity-20 md:bg-opacity-0"> <span class="text-xs font-medium uppercase md:hidden">{{ 'seller'|trans }}</span> <span>{{ entry.vendor }}</span> </div> <div class="flex items-center justify-between col-span-4 px-3 my-1 bg-white bg-opacity-20 md:bg-opacity-0"> <span class="text-xs font-medium uppercase md:hidden">{{ 'buyer'|trans }}</span> <span>{{ entry.buyer }}</span> </div> <div class="flex items-center justify-between col-span-2 px-3 my-1 text-right bg-white md:justify-end bg-opacity-20 md:bg-opacity-0"> <span class="text-xs font-medium uppercase md:hidden">{{ 'price'|trans }}</span> <span>{{ entry.price|default('-') }}</span> </div> </div> {# {% endapply %} #} </div> </li> {% endfor %} </ul> </section> {% elseif not app.user %} {% do section_navigation_add({ name: 'auction-history', anchor: 'auction-history' }) %} <section id="auction-history" class="container p-4 bg-white shadow-xl sm:p-8 xl:p-16"> <h2 class="text-lg font-medium uppercase md:text-xl font-headline mb-7"> {{ 'auction-history'|trans }} </h2> {% include 'network/profile/components/login_required_hint.html.twig' %} </section> {% else %} <section id="auction-history" class="container p-4 bg-white shadow-xl sm:p-8 xl:p-16"> <h2 class="text-lg font-medium uppercase md:text-xl font-headline mb-7"> {{ 'auction-history'|trans }} </h2> {{ 'no.horse.auction.history.available'|trans }} </section> {% endif %} <turbo-stream action="replace" target="tab_navigation"> <template> {% include 'network/horse/components/tab_navigation_component.html.twig' with { horse: horse, highlightedTab: app.request.pathInfo } %} </template> </turbo-stream></turbo-frame>