templates/network/horse/sections/horse_section_auction_history.html.twig line 1

Open in your IDE?
  1. <turbo-frame id="tab_content">
  2.   {% if app.user and history and (history|length) > 0 and app.user %}
  3.     {% do section_navigation_add({ name: 'auction-history', anchor: 'auction-history' }) %}
  4.     <section id="auction-history" class="container p-4 bg-white shadow-xl sm:p-8 xl:p-16">
  5.       <h2 class="text-lg font-medium uppercase md:text-xl font-headline mb-7">
  6.         {{ 'auction-history'|trans }}
  7.       </h2>
  8.       <ul class="grid gap-y-6">
  9.         {% for entry in history %}
  10.           {% set color = entry.auction.auctionhouse ? entry.auction.auctionhouse.color %}
  11.           <li class="p-4" style="background-color: {{ color }}">
  12.             <a data-turbo="false"
  13.               href="{{
  14.               path(
  15.                 'network_auction_detail',
  16.                 { id: entry.auction.id, slug: entry.auction.slug }
  17.               )
  18.               }}">
  19.               <h3 class="mb-2 text-base text-white uppercase md:text-lg font-headline">
  20.                 {{ entry.auction.title }}
  21.               </h3>
  22.               {% set now = 'now'|carbon %}
  23.               {% if entry.auction.end > now %}
  24.                 <h3 class="text-sm font-bold tracking-wide text-white uppercase">
  25.                   {% if entry.auction.start > now %}
  26.                     {{ 'auction-starts-in'|trans }}
  27.                   {% else %}
  28.                     {{ 'auction-ends-in'|trans }}
  29.                   {% endif %}
  30.                 </h3>
  31.                 {% include 'auction/auction_countdown.html.twig' with { auction: auction } only %}
  32.               {% else %}
  33.                 <h3 class="my-6 text-sm font-bold tracking-wide text-white uppercase">
  34.                   {{ 'auction-ended'|trans }}
  35.                 </h3>
  36.               {% endif %}
  37.             </a>
  38.             <div class="px-2 text-xs font-medium tracking-wider text-white uppercase rounded-full bg-primary-500 w-max">
  39.               {{ entry.status|trans }}
  40.             </div>
  41.             <div class="grid-cols-12 mt-2 text-white md:grid">
  42.               <div class="hidden md:contents">
  43.                 <div class="col-span-2 px-3 py-1 text-xs font-medium uppercase bg-white bg-opacity-20">
  44.                   {{ 'number'|trans }}
  45.                 </div>
  46.                 <div class="col-span-4 px-3 py-1 text-xs font-medium uppercase bg-white bg-opacity-20">
  47.                   {{ 'Seller'|trans }}
  48.                 </div>
  49.                 <div class="col-span-4 px-3 py-1 text-xs font-medium uppercase bg-white bg-opacity-20">
  50.                   {{ 'buyer'|trans }}
  51.                 </div>
  52.                 <div class="col-span-2 px-3 py-1 text-xs font-medium text-right uppercase bg-white bg-opacity-20">
  53.                   {{ 'price'|trans }}
  54.                 </div>
  55.               </div>
  56.               {# {% apply pimcore_glossary %} #}
  57.               <div class="contents">
  58.                 <div class="flex items-center justify-between col-span-2 px-3 my-1 bg-white bg-opacity-20 md:bg-opacity-0">
  59.                   <span class="text-xs font-medium uppercase md:hidden">{{ 'number'|trans }}</span>
  60.                   <span>{{ entry.number }}</span>
  61.                 </div>
  62.                 <div class="flex items-center justify-between col-span-4 px-3 my-1 bg-white bg-opacity-20 md:bg-opacity-0">
  63.                   <span class="text-xs font-medium uppercase md:hidden">{{ 'seller'|trans }}</span>
  64.                   <span>{{ entry.vendor }}</span>
  65.                 </div>
  66.                 <div class="flex items-center justify-between col-span-4 px-3 my-1 bg-white bg-opacity-20 md:bg-opacity-0">
  67.                   <span class="text-xs font-medium uppercase md:hidden">{{ 'buyer'|trans }}</span>
  68.                   <span>{{ entry.buyer }}</span>
  69.                 </div>
  70.                 <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">
  71.                   <span class="text-xs font-medium uppercase md:hidden">{{ 'price'|trans }}</span>
  72.                   <span>{{ entry.price|default('-') }}</span>
  73.                 </div>
  74.               </div>
  75.               {# {% endapply %} #}
  76.             </div>
  77.           </li>
  78.         {% endfor %}
  79.       </ul>
  80.     </section>
  81.   {% elseif not app.user %}
  82.     {% do section_navigation_add({ name: 'auction-history', anchor: 'auction-history' }) %}
  83.     <section id="auction-history" class="container p-4 bg-white shadow-xl sm:p-8 xl:p-16">
  84.       <h2 class="text-lg font-medium uppercase md:text-xl font-headline mb-7">
  85.         {{ 'auction-history'|trans }}
  86.       </h2>
  87.       {% include 'network/profile/components/login_required_hint.html.twig' %}
  88.     </section>
  89.   {% else %}
  90.     <section id="auction-history" class="container p-4 bg-white shadow-xl sm:p-8 xl:p-16">
  91.       <h2 class="text-lg font-medium uppercase md:text-xl font-headline mb-7">
  92.         {{ 'auction-history'|trans }}
  93.       </h2>
  94.       {{ 'no.horse.auction.history.available'|trans }}
  95.     </section>
  96.   {% endif %}
  97.   <turbo-stream action="replace" target="tab_navigation">
  98.     <template>
  99.       {% include 'network/horse/components/tab_navigation_component.html.twig' with {
  100.         horse: horse,
  101.         highlightedTab: app.request.pathInfo
  102.       } %}
  103.     </template>
  104.   </turbo-stream>
  105. </turbo-frame>