{% if onsaleeventscount > 0 %}
{% for event in services.getEvents({elapsed: false, organizer: organizer.slug, limit: 10}).getQuery().getResult() %}
{% include "Global/event-card.html.twig" with {event: event} %}
{% endfor %}
{% else %}
{% include "Global/message.html.twig" with { type: "info", message: ('No events on sale for now'|trans) } %}
{% endif %}
{% if onsaleeventscount > 10 %}
{{ "See all events on sale"|trans }}
{% endif %}
{% if pasteventscount > 0 %}
{% for event in services.getEvents({elapsed: true, organizer: organizer.slug, limit: 10}).getQuery().getResult() %}
{% include "Global/event-card.html.twig" with {event: event} %}
{% endfor %}
{% else %}
{% include "Global/message.html.twig" with { type: "info", message: ('No past events found'|trans) } %}
{% endif %}
{% if organizer.showvenuesmap and google_maps_api_key != "" %}
{% set venuescount = services.getVenues({"count": true, organizer: organizer.slug}).getQuery().getSingleScalarResult() %}
{% if venuescount %}
{% set venues = [] %}
{% for venue in services.getVenues({organizer: organizer.slug}).getQuery().getResult() %}
{% 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) ) }]) %}
{% endfor %}
{{ "Venues"|trans }}
{% endif %}
{% endif %}
{% if organizer.youtubeurl %}
{{ "Video"|trans }}
{% endif %}
{% if organizer.showfollowers and organizer.followedby|length %}
{{ "Followers"|trans }}
{% for user in organizer.followedby %}
{% include "Global/user-avatar.html.twig" with { user: user, showusernametooltip: true } %}
{% endfor %}
{% endif %}
{% set reviewscount = services.getReviews({"count": true, "organizer": organizer.slug}).getQuery().getSingleScalarResult() %}
{% if organizer.showreviews and reviewscount %}
{{ "Reviews"|trans }}
{% for review in services.getReviews({"organizer": organizer.slug, "limit": 8}).getQuery().getResult() %}
{% include "Global/user-review.html.twig" with { review : review, showuser: true, showevent: true } %}