templates/document/areabricks/current-achievements-brick/view.html.twig line 72

Open in your IDE?
  1. {# {% set viewAll = pimcore_input('view-all', { placeholder: 'Linktext' }) %}
  2. <div>
  3.   <div class="grid gap-4">
  4.     {% for raceday in racedays %}
  5.       {% include 'document/areabricks/current-races-brick/race-tile.html.twig' with {
  6.         raceday: raceday.day,
  7.         races: raceday.races
  8.       } %}
  9.     {% else %}
  10.       {% include 'document/areabricks/current-races-brick/empty-tile.html.twig' %}
  11.     {% endfor %}
  12.   </div>
  13.   {% if editmode or pimcore_link('view-full') is not empty %}
  14.     <div class="mt-12">
  15.       {% set link = pimcore_link('view-full', { placeholder: 'Link' }) %}
  16.       {% include 'component/button.html.twig' with {
  17.         text: editmode ? link : link.text,
  18.         type: 'primary',
  19.         icon_after: 'arrow-right-tail',
  20.         attr: { href: link.href, class: 'w-full' }
  21.       } only %}
  22.     </div>
  23.   {% endif %}
  24. </div> #}
  25. <div id="{{ 'areabrick_achievements_list' ~ brickId }}"
  26.   class="max-w-[90vw] overflow-x-scroll lg:overflow-auto">
  27.   <div class="grid w-full grid-cols-12 gap-2 px-5 py-2 text-sm font-bold text-white uppercase bg-primary-500"
  28.     style="min-width: 1024px">
  29.     <div>
  30.       {{ 'profile.achievements.date'|trans }}
  31.     </div>
  32.     <div class="flex col-span-2">
  33.       {{ 'profile.achievements.horse'|trans }}
  34.     </div>
  35.     <div class="col-span-2">
  36.       {{ 'profile.achievements.racingtrack'|trans }}
  37.     </div>
  38.     <div class="col-span-5">
  39.       {{ 'profile.achievements.description'|trans }}
  40.     </div>
  41.     <div class="col-span-2">
  42.       {{ 'profile.achievements.participants'|trans }}
  43.     </div>
  44.   </div>
  45.   {% for achievement in achievements %}
  46.     <div class="grid items-center w-full grid-cols-12 gap-2 px-5 py-2 text-sm even:bg-white odd:bg-neutral-50"
  47.       style="min-width: 1024px">
  48.       <div>
  49.         {% if achievement.date %}
  50.           {{ achievement.date|date('d.m.Y') }}
  51.         {% else %}
  52.           {{ 'achievement.item.no.date'|trans }}
  53.         {% endif %}
  54.       </div>
  55.       <div class="col-span-2 font-headline">
  56.         {% if achievement.horse %}
  57.           <a class="font-medium hover:opacity-70"
  58.             href="{{ pimcore_url({ object: achievement.horse }) }}">
  59.             {{ achievement.horse.displayName }}
  60.           </a>
  61.           {% if achievement.horse.father %}
  62.       <br>
  63.         <p>{{'v. ' ~ achievement.horse.father}}</span>
  64.       {% endif %}
  65.         {% endif %}
  66.       </div>
  67.       <div class="col-span-2">
  68.         {% if achievement.racingtrack %}
  69.           <a class="flex items-center gap-1 hover:opacity-70"
  70.             href="{{ pimcore_url({ object: achievement.racingtrack }) }}">
  71.             {% if achievement.racingtrack.country %}
  72.               <img class="object-contain w-6 h-6"
  73.                 loading="lazy"
  74.                 src="https://flagcdn.com/w320/{{ achievement.racingtrack.country|lower }}.png"
  75.                 alt="{{ achievement.racingtrack.country }}" />
  76.             {% endif %}
  77.             {{ achievement.racingtrack.name }}
  78.           </a>
  79.         {% else %}
  80.           {{ 'achievement.item.no.racingtrack'|trans }}
  81.         {% endif %}
  82.       </div>
  83.       <div class="col-span-5">
  84.         <span class="font-semibold">{{ '(' ~ (achievement.category|trans) ~ ')' }}</span>
  85.         </br>
  86.         {{ achievement.description|raw }}
  87.       </div>
  88.       <div class="flex flex-wrap col-span-2 gap-2">
  89.         {# {% for profile in achievement.profiles %}
  90.           <a title="{{ profile.name }}" class="" href="{{ pimcore_url({ object: profile }) }}">
  91.             {% include 'component/avatar.html.twig' with {
  92.               avatar: profile.avatar,
  93.               initials: profile.name|initials,
  94.               size: 'tiny'
  95.             } only %}
  96.           </a>
  97.         {% endfor %} #}
  98.         {% if achievement.profile %}
  99.           <a title="{{ achievement.profile.name }}"
  100.             class=""
  101.             href="{{ pimcore_url({ object: achievement.profile }) }}">
  102.             {% include 'component/avatar.html.twig' with {
  103.               avatar: achievement.profile.avatar,
  104.               initials: achievement.profile.name|initials,
  105.               size: 'tiny'
  106.             } only %}
  107.           </a>
  108.         {% endif %}
  109.         {% for profile in achievement.profiles %}
  110.           {% if achievement.profile.id != profile.id %}
  111.             <a title="{{ profile.name }}" class="" href="{{ pimcore_url({ object: profile }) }}">
  112.               {% include 'component/avatar.html.twig' with {
  113.                 avatar: profile.avatar,
  114.                 initials: profile.name|initials,
  115.                 size: 'tiny'
  116.               } only %}
  117.             </a>
  118.           {% endif %}
  119.         {% endfor %}
  120.       </div>
  121.     </div>
  122.   {% endfor %}
  123. </div>
  124. {% if form.offset.vars.value < totalCount %}
  125.   <div class="flex justify-center w-full" id="{{ 'areabrick_load_button' ~ brickId }}">
  126.     {{ form_start(form) }}
  127.     {{ form_widget(form.offset, { value: form.offset.vars.value }) }}
  128.     {# {{ button.submit('show-more'|trans, 'neutral', { size: 'sm' }) }} #}
  129.     {{ form_widget(form.submit, { attr: { class: 'btn btn-sm btn-neutral my-4 mx-auto' } }) }}
  130.     {{ form_end(form) }}
  131.   </div>
  132. {% endif %}