templates/Front/Organizer/profile.html.twig line 1

Open in your IDE?
  1. {% extends "Global/layout.html.twig" %}
  2. {% set pagetitle = organizer.name %}
  3. {% block title %}{{pagetitle}}{% endblock %}
  4. {% block content %}
  5.     <section class="section-content padding-y bg-white">
  6.         <div class="{{ services.getSetting("app_layout") }}">
  7.             <div class="row">
  8.                 <main class="col-12">
  9.                     {% if is_granted('ROLE_ORGANIZER') %}
  10.                         {% if app.user.organizer == organizer %}
  11.                             {% include "Global/message.html.twig" with { type: 'info', icon: 'fas fa-info-circle', message: ('<a href="'~ path('dashboard_organizer_profile') ~'">' ~ 'Click here'|trans ~ '</a> ' ~ 'to edit your profile'|trans) } %}
  12.                         {% endif %}
  13.                     {% endif %}
  14.                     <div class="shadow rounded overflow-hidden">
  15.                         {% if organizer.coverName %}<div class="organizer-profile-cover parallax-window" data-parallax="scroll" data-image-src="{{asset(organizer.getCoverPath)}}"></div>{% endif %}
  16.                         <div class="row">
  17.                             <div class="col-12 col-lg-4">
  18.                                 <div class="organizer-profile-sidebar text-center {% if not organizer.coverName %}mt-3 mb-3{% endif %}">
  19.                                     <span class="avatar organizer-profile-logo" style="background: url('{{ organizer.logoName ? asset(organizer.getLogoPath) : organizer.getLogoPlaceholder }}');"></span>
  20.                                     <h4 class="font-weight-bold text-center my-5">{{ organizer.name }}</h4>
  21.                                     {% if organizer.hasSocialMedia %}
  22.                                         <ul class="list-inline mb-0">
  23.                                             {% if organizer.website %}
  24.                                                 <li class="list-inline-item">
  25.                                                     <a href="{% if 'http://' not in organizer.website and 'https://' not in organizer.website %}http://{% endif %}{{ organizer.website }}"  class="display-inline-block mr-3" rel="noopener" target="_blank"><i class="icon fas fa-globe fa-lg fa-fw"></i></a>
  26.                                                 </li>
  27.                                             {% endif %}
  28.                                             {% if organizer.email %}
  29.                                                 <li class="list-inline-item">
  30.                                                     <a href="mailto:{{ organizer.email }}"  class="display-inline-block mr-3" target="_blank" rel="noopener"><i class="icon fas fa-at fa-lg fa-fw"></i></a>
  31.                                                 </li>
  32.                                             {% endif %}
  33.                                             {% if organizer.phone %}
  34.                                                 <li class="list-inline-item">
  35.                                                     <a href="tel:{{ organizer.phone }}" class="display-inline-block mr-3"><i class="icon fas fa-phone fa-lg fa-fw"></i></a>
  36.                                                 </li>
  37.                                             {% endif %}
  38.                                             {% if organizer.facebook %}
  39.                                                 <li class="list-inline-item">
  40.                                                     <a href="{% if 'http://' not in organizer.facebook and 'https://' not in organizer.facebook %}http://{% endif %}{{ organizer.facebook }}" class="display-inline-block mr-3" rel="noopener" target="_blank"><i class="icon fab fa-facebook-f fa-lg fa-fw"></i></a>
  41.                                                 </li>
  42.                                             {% endif %}
  43.                                             {% if organizer.twitter %}
  44.                                                 <li class="list-inline-item">
  45.                                                     <a href="{% if 'http://' not in organizer.twitter and 'https://' not in organizer.twitter %}http://{% endif %}{{ organizer.twitter }}" class="display-inline-block mr-3" rel="noopener" target="_blank"><i class="icon fab fa-twitter fa-lg fa-fw"></i></a>
  46.                                                 </li>
  47.                                             {% endif %}
  48.                                             {% if organizer.googleplus %}
  49.                                                 <a href="{% if 'http://' not in organizer.googleplus and 'https://' not in organizer.googleplus %}http://{% endif %}{{ organizer.googleplus }}" class="display-inline-block mr-3" rel="noopener" target="_blank"><i class="icon fab fa-google-plus fa-lg fa-fw"></i></a>
  50.                                                 {% endif %}
  51.                                                 {% if organizer.instagram %}
  52.                                                 <a href="{% if 'http://' not in organizer.instagram and 'https://' not in organizer.instagram %}http://{% endif %}{{ organizer.instagram }}" class="display-inline-block mr-3" rel="noopener" target="_blank"><i class="icon fab fa-instagram fa-lg fa-fw"></i></a>
  53.                                                 {% endif %}
  54.                                                 {% if organizer.linkedin %}
  55.                                                 <a href="{% if 'http://' not in organizer.linkedin and 'https://' not in organizer.linkedin %}http://{% endif %}{{ organizer.linkedin }}" class="display-inline-block mr-3" rel="noopener" target="_blank"><i class="icon fab fa-linkedin fa-lg fa-fw"></i></a>
  56.                                                 {% endif %}
  57.                                         </ul>
  58.                                     {% endif %}
  59.                                     {% if organizer.description %}
  60.                                         <div class="py-4 px-4 text-muted line-height-2 readmore" data-collapsed-height="150" data-height-margin="20">
  61.                                             {{ organizer.description|raw|nl2br }}
  62.                                         </div>
  63.                                     {% endif %}
  64.                                 </div>
  65.                             </div>
  66.                             <div class="col-12 col-lg-8 bg-light">
  67.                                 {% set publishedeventscount = services.getEvents({"count": true, elapsed: "all", organizer: organizer.slug}).getQuery().getSingleScalarResult() %}
  68.                                 <div class="p-4 d-flex justify-content-end text-center">
  69.                                     <ul class="list-inline mb-0">
  70.                                         {% if organizer.categories|length %}
  71.                                             {% for category in organizer.categories %}
  72.                                                 <li class="list-inline-item mr-3">
  73.                                                     <h5 class="font-weight-bold mb-0 d-block">
  74.                                                         <i class="{{ category.icon }}"></i>
  75.                                                     </h5>
  76.                                                     <small class="text-muted">
  77.                                                         {{ category.name }}
  78.                                                     </small>
  79.                                                 </li>
  80.                                             {% endfor %}
  81.                                         {% endif %}
  82.                                         {% if organizer.country %}
  83.                                             <li class="list-inline-item mr-3">
  84.                                                 <h5 class="font-weight-bold mb-0 d-block">
  85.                                                     <span class="flag flag-{{organizer.country.code|lower}}"></span>
  86.                                                 </h5>
  87.                                                 <small class="text-muted">
  88.                                                     {{ organizer.country.name }}
  89.                                                 </small>
  90.                                             </li>
  91.                                         {% endif %}
  92.                                         <li class="list-inline-item mr-3">
  93.                                             <h5 class="font-weight-bold mb-0 d-block">{{ publishedeventscount }}</h5><small class="text-muted"> <i class="fas fa-calendar-alt fa-fw mr-1"></i>{{ "Events"|trans }}</small>
  94.                                         </li>
  95.                                         <li class="list-inline-item">
  96.                                             <h5 class="font-weight-bold mb-0 d-block">{{ organizer.followedby|length }}</h5><small class="text-muted"> <i class="fas fa-folder-plus mr-1"></i>{{ "Followers"|trans }}</small>
  97.                                         </li>
  98.                                         <li class="list-inline-item ml-3">
  99.                                             {% if not is_granted('IS_AUTHENTICATED_REMEMBERED') or is_granted('ROLE_ATTENDEE') %}
  100.                                                 {% if is_granted('IS_AUTHENTICATED_REMEMBERED') %}
  101.                                                     {% if organizer.isFollowedBy(app.user) %}
  102.                                                         <button class="organizer-unfollow btn btn-outline-primary btn-sm btn-block" data-target="{{ path('dashboard_attendee_following_remove', { slug : organizer.slug }) }}"><i class="fas fa-folder-minus"></i> {{ "Unfollow"|trans }}</button>
  103.                                                     {% else %}
  104.                                                         <button class="organizer-follow btn btn-outline-primary btn-sm btn-block" data-target="{{ path('dashboard_attendee_following_add', { slug : organizer.slug }) }}"><i class="fas fa-folder-plus"></i> {{ "Follow"|trans }}</button>
  105.                                                     {% endif %}
  106.                                                 {% else %}
  107.                                                     <a href="{{ path('fos_user_security_login')~'?_target_path='~app.request.getPathInfo }}" class="btn btn-outline-primary btn-sm btn-block"><i class="fas fa-folder-plus"></i> {{ "Follow"|trans }}</a>
  108.                                                 {% endif %}
  109.                                             {% endif %}
  110.                                         </li>
  111.                                     </ul>
  112.                                 </div>
  113.                                 {% set onsaleeventscount = services.getEvents({"count": true, elapsed: false, organizer: organizer.slug}).getQuery().getSingleScalarResult() %}
  114.                                 {% set pasteventscount = services.getEvents({"count": true, elapsed: true, organizer: organizer.slug}).getQuery().getSingleScalarResult() %}
  115.                                 <div class="py-4 px-4">
  116.                                     <ul class="nav nav-pills mb-3">
  117.                                         <li class="nav-item">
  118.                                             <a class="nav-link active" data-toggle="pill" href="#organizer-onsale-events" role="tab" aria-controls="organizer-onsale-events" aria-selected="true">{{ "Events on sale"|trans }} ({{ onsaleeventscount }})</a>
  119.                                         </li>
  120.                                         <li class="nav-item">
  121.                                             <a class="nav-link" data-toggle="pill" href="#organizer-past-events" role="tab" aria-controls="organizer-past-events" aria-selected="false">{{ "Past events"|trans }} ({{ pasteventscount }})</a>
  122.                                         </li>
  123.                                     </ul>
  124.                                     <div class="tab-content">
  125.                                         <div class="tab-pane fade show active" id="organizer-onsale-events" role="tabpanel" aria-labelledby="organizer-onsale-events-tab">
  126.                                             {% if onsaleeventscount > 0 %}
  127.                                                 {% for event in services.getEvents({elapsed: false, organizer: organizer.slug, limit: 10}).getQuery().getResult() %}
  128.                                                     {% include "Global/event-card.html.twig" with {event: event} %}
  129.                                                 {% endfor %}
  130.                                             {% else %}
  131.                                                 {% include "Global/message.html.twig" with { type: "info", message: ('No events on sale for now'|trans) } %}
  132.                                             {% endif %}
  133.                                             {% if onsaleeventscount > 10 %}
  134.                                                 <a href="{{ path('events', { organizer: organizer.slug }) }}" class="btn btn-outline-primary mx-auto"><i class="fas fa-ticket-alt"></i> {{ "See all events on sale"|trans }}</a>
  135.                                             {% endif %}
  136.                                         </div>
  137.                                         <div class="tab-pane fade" id="organizer-past-events" role="tabpanel" aria-labelledby="organizer-past-events">
  138.                                             {% if pasteventscount > 0 %}
  139.                                                 {% for event in services.getEvents({elapsed: true, organizer: organizer.slug, limit: 10}).getQuery().getResult() %}
  140.                                                     {% include "Global/event-card.html.twig" with {event: event} %}
  141.                                                 {% endfor %}
  142.                                             {% else %}
  143.                                                 {% include "Global/message.html.twig" with { type: "info", message: ('No past events found'|trans) } %}
  144.                                             {% endif %}
  145.                                         </div>
  146.                                     </div>
  147.                                 </div>
  148.                                 {% if organizer.showvenuesmap and google_maps_api_key != "" %}
  149.                                     {% set venuescount = services.getVenues({"count": true, organizer: organizer.slug}).getQuery().getSingleScalarResult() %}
  150.                                     {% if venuescount %}
  151.                                         {% set venues = [] %}
  152.                                         {% for venue in services.getVenues({organizer: organizer.slug}).getQuery().getResult() %}
  153.                                             {% set venues = venues|merge([{"name": venue.name, "address":(venue.name ~ ": " ~venue.stringifyAddress), "lat": venue.lat, "lng": venue.lng, "link": (path('venue', { slug : venue.slug })), "image": (venue.images|length ? (asset(venue.images[0].getImagePath)): (venue.getImagePlaceholder) ) }]) %}
  154.                                         {% endfor %}
  155.                                         <div class="py-4 px-4">
  156.                                             <h4 class="mb-2"><i class="fas fa-compass mr-1"></i> {{ "Venues"|trans }}</h4>
  157.                                             <div id="venues-map" data-pin-path="{{ asset('assets/img/icons/pin.png') }}" data-venues="{{ venues|json_encode() }}" class="vh-90"></div>
  158.                                         </div>
  159.                                     {% endif %}
  160.                                 {% endif %}
  161.                                                         {% set youtubeUrlParts = organizer.youtubeurl|split('=') %}
  162.                             {% if youtubeUrlParts|length > 1 %}
  163.                                 <iframe width="100%" height="400" src="https://www.youtube.com/embed/{{ youtubeUrlParts[1] }}" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
  164.                             {% else %}
  165.                                 <!-- Handle case where YouTube URL is not in the correct format -->
  166.                                 <p>Opps ! No  URL Seted</p>
  167.                             {% endif %}
  168.                                 {% if organizer.showfollowers and organizer.followedby|length %}
  169.                                     <div class="py-4 px-4">
  170.                                         <h4 class="mb-2"><i class="fas fa-user-plus mr-1"></i> {{ "Followers"|trans }}</h4>
  171.                                         <div class="card border-0 card-body overflow-auto text-nowrap">
  172.                                             <div class="avatar-list py-4">
  173.                                                 {% for user in organizer.followedby %}
  174.                                                     {% include "Global/user-avatar.html.twig" with { user: user, showusernametooltip: true } %}
  175.                                                 {% endfor %}
  176.                                             </div>
  177.                                         </div>
  178.                                     </div>
  179.                                 {% endif %}
  180.                                 {% set reviewscount = services.getReviews({"count": true, "organizer": organizer.slug}).getQuery().getSingleScalarResult() %}
  181.                                 {% if organizer.showreviews and reviewscount %}
  182.                                     <div class="row mt-5 px-4">
  183.                                         <div class="col-12">
  184.                                             <h4 class="mb-2"><i class="fas fa-star mr-1"></i> {{ "Reviews"|trans }}</h4>
  185.                                         </div>
  186.                                         {% for review in services.getReviews({"organizer": organizer.slug, "limit": 8}).getQuery().getResult() %}
  187.                                             <div class="col-12 col-lg-6 py-4">
  188.                                                 {% include "Global/user-review.html.twig" with { review : review, showuser: true, showevent: true } %}
  189.                                             </div>
  190.                                         {% endfor %}
  191.                                     </div>
  192.                                 {% endif %}
  193.                             </div>
  194.                         </div>
  195.                     </div>
  196.                 </main>
  197.             </div>
  198.     </section>
  199. {% endblock %}
  200. {% block javascripts %}
  201.     {% if google_maps_api_key != "" %}
  202.         {{ encore_entry_script_tags('organizerprofile') }}
  203.         <script async defer src="https://maps.googleapis.com/maps/api/js?key={{google_maps_api_key}}&callback=initMap" integrity="sha384-oqVuAfXRKap7fdgcCY5uykM6+R9GqQ8K/uxy9rx7HNQlGYl1kPzQho1wx4JwY8wC">
  204.         </script>
  205.         {% include "Global/organizer-info-box.html.twig" %}
  206.     {% endif %}
  207. {% endblock %}