templates/network/profile/sections/profile_section_achievements.html.twig line 1

Open in your IDE?
  1. <turbo-frame id="tab_content">
  2.   <section class="p-4 bg-white shadow-xl sm:p-8 xl:p-16" id="achievements">
  3.     {% if app.user and categories and categories is not empty %}
  4.       {% do section_navigation_add({ name: 'achievements', anchor: 'achievements' }) %}
  5.       <div class="space-y-6">
  6.         <h2 class="text-xl font-medium text-black uppercase md:text-xl font-headline">
  7.           {{ 'successes-as-profile'|trans }}
  8.           {% if user.id is defined and profile.id == user.id %}
  9.               <small class="underline lowercase">
  10.                 <a data-turbo='false' target="_top" href="{{ path('profile_admin_achievements_index') }}">({{ 'edit'|trans }})</a>
  11.               </small>
  12.             {% endif %}
  13.         </h2>
  14.         {% for category in categories %}
  15.           <div class="">
  16.             <h3 class="mb-4 text-black uppercase font-headline">
  17.               {{ category|trans }}
  18.             </h3>
  19.             <div class="overflow-x-scroll lg:overflow-x-hidden">
  20.             {# Heading #}
  21.             <div class="grid w-full grid-cols-12 gap-2 px-5 py-2 text-sm font-bold text-white uppercase bg-primary-500"
  22.               style="min-width: 1024px">
  23.               <div>
  24.                 {{ 'profile.achievements.date'|trans }}
  25.               </div>
  26.               <div class="flex col-span-2">
  27.                 {{ 'profile.achievements.horse'|trans }}
  28.               </div>
  29.               <div class="col-span-2">
  30.                 {{ 'profile.achievements.racingtrack'|trans }}
  31.               </div>
  32.               <div class="col-span-5">
  33.                 {{ 'profile.achievements.description'|trans }}
  34.               </div>
  35.               <div class="col-span-2">
  36.                 {{ 'profile.achievements.participants'|trans }}
  37.               </div>
  38.             </div>
  39.             <turbo-frame id="profile-achievements-{{ category }}"
  40.               src="{{
  41.               path(
  42.                 'network_profile_achievement_frame',
  43.                 { _locale: app.request.locale, category: category, id: profile.id }
  44.               )
  45.               }}"></turbo-frame>
  46.             </div>
  47.           </div>
  48.         {% endfor %}
  49.       </div>
  50.      {% elseif not app.user %}
  51.       <div class="container">
  52.         <h2 class="text-lg font-medium uppercase md:text-xl font-headline mb-7">
  53.           {{ 'successes-as-profile'|trans }}
  54.         </h2>
  55.         {% include 'network/profile/components/login_required_hint.html.twig' %}
  56.       </div>
  57.     
  58.     {% else %}
  59.       <h2 class="text-xl font-medium text-black uppercase mb-7 md:text-xl font-headline">
  60.         {{ 'successes-as-profile'|trans }}
  61.         {% if user.id is defined and profile.id == user.id %}
  62.               <small class="underline lowercase">
  63.                 <a data-turbo='false' target="_top" href="{{ path('profile_admin_achievements_index') }}">({{ 'edit'|trans }})</a>
  64.               </small>
  65.             {% endif %}
  66.       </h2>
  67.       <div>
  68.         {{ 'no.profile.achievements.available'|trans }}
  69.       </div>
  70.     {% endif %}
  71.   </section>
  72.   <turbo-stream action="replace" target="tab_navigation">
  73.     <template>
  74.       {% include 'network/profile/components/tab_navigation_component.html.twig' with {
  75.         profile: profile,
  76.         highlightedTab: app.request.pathInfo
  77.       } %}
  78.     </template>
  79.   </turbo-stream>
  80. </turbo-frame>