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

Open in your IDE?
  1. <section class="p-4 my-8 bg-white shadow-xl sm:p-8 xl:p-16">
  2. {% if app.user and profile.organisations %}
  3.       <div class="grid grid-cols-12 gap-6 px-4 py-6 md:px-8 md:py-12 odd:bg-neutral-50">
  4.         <div class="col-span-12 md:col-span-4">
  5.           <h3 class="font-medium font-headline">
  6.             {{ 'organisations'|trans }}
  7.             {% if user.id is defined and profile.id == user.id %}
  8.               <small class="underline lowercase"><a href="{{ path('profile_admin_organisations_index') }}">({{ 'edit'|trans }})</a></small>
  9.             {% endif %}
  10.           </h3>
  11.         </div>
  12.         <ul class="grid grid-cols-1 col-span-12 gap-5 md:gap-3 md:col-span-8 md:grid-cols-2 lg:grid-cols-3">
  13.           {% for organisation in profile.organisations %}
  14.             <li class="">
  15.               {% if organisation.classname == "Club" %}
  16.                 <a class="flex items-start gap-6 md:gap-3 {{ organisation.website ? "underline" }}" {{ organisation.website ? "href=" ~ organisation.website ~"" }} target="_blank" rel="noopener noreferrer">
  17.                   {% if organisation.avatar %}
  18.                     {{ organisation.avatar.thumbnail('profile-favicon').html({ imgAttributes: { class: "w-8 h-8 -mt-1 md:mt-1 md:w-4 md:h-4"}})|raw }}
  19.                   {% endif %}
  20.                   <span class="uppercase">{{ organisation.name }} </span>
  21.                 </a>
  22.               {% endif %}
  23.               {% if organisation.classname == "Association" %}
  24.                 <a class="flex items-start gap-6 md:gap-3 {{ organisation.website ? "underline" }}" {{ organisation.website ? "href=" ~ organisation.website.href ~"" }} target="_blank" rel="noopener noreferrer">
  25.                   {% if organisation.logo %}
  26.                     {{ organisation.logo.thumbnail('profile-favicon').html({ imgAttributes: { class: "w-8 h-8 -mt-1 md:mt-1 md:w-4 md:h-4"}})|raw }}
  27.                   {% endif %}
  28.                   <span class="uppercase">{{ organisation.name }} </span>
  29.                 </a>
  30.               {% endif %}
  31.               {% if organisation.classname == "Profile" %}
  32.                 <a class="flex items-start gap-6 underline md:gap-3" href="{{ pimcore_url({object: organisation}) }}">
  33.                   {% include "component/avatar.html.twig" with {
  34.                     avatar: organisation.avatar,
  35.                     initials: organisation.name|initials,
  36.                     size: "tiny"
  37.                   } only %}
  38.                   <span class="uppercase">{{ organisation.name }} </span>
  39.                 </a>
  40.               {% endif %}
  41.             </li>
  42.           {% endfor %}
  43.         </ul>
  44.       </div>
  45.       {% elseif not app.user %}
  46.       <div class="container">
  47.         <h2 class="text-xl font-medium text-black uppercase mb-7 md:text-xl font-headline">
  48.           {{ 'organisations'|trans }}
  49.         </h2>
  50.         {% include 'network/profile/components/login_required_hint.html.twig' %}
  51.       </div>
  52.       {% else %}
  53.       <div class="">
  54.           <h2 class="text-xl font-medium text-black uppercase mb-7 md:text-xl font-headline">
  55.             {{ 'organisations'|trans }}
  56.             {% if user.id is defined and profile.id == user.id %}
  57.               <small class="underline lowercase">
  58.                 <a data-turbo='false' target="_top" href="{{ path('profile_admin_organisations_index') }}">({{ 'edit'|trans }})</a>
  59.               </small>
  60.             {% endif %}
  61.           </h2>
  62.           <div class="text-black">
  63.       {{ 'no.profile.organisations.available'|trans }}
  64.       </div>
  65.       {% endif %}
  66. </section>