<article class="c-card c-card--{{band}}">
<div class="c-card__pre-content c-card__pre-content--{{band}}">
<p class="c-card__date">
{# {% set codigos_idioma = ['en', 'es', 'fr'] %}
{% for codigo_idioma in codigos_idioma %}
{{ codigo_idioma }}: {{ locale_name(codigo_idioma) }}
{% endfor %} #}
{# {{dump(language)}} #}
{% if course.dateStart|date('y-m-d') != course.dateEnd|date('y-m-d') %}
{% if course.dateStart|date('y') != course.dateEnd|date('y') %}
{{course.dateStart|date('d/m/y')}} - {{course.dateEnd|date('d/m/y')}}
{% elseif course.dateStart|date('m') != course.dateEnd|date('m') %}
{{course.dateStart|date('d/m/y')}} - {{course.dateEnd|date('d/m/y')}}
{% else %}
{{course.dateStart|date('d/m/y')}} - {{course.dateEnd|date('d/m/y')}}
{# {{course.dateStart|date('d')}}|{{course.dateEnd|date('d')}} - {{course.dateStart|date('m Y')}} #}
{% endif %}
{% else %}
{{course.dateStart|date('d/m/y')}}
{% endif %}
{% if course.timeStart %}
<span class="float-end">{{course.timeStart}} - {{course.timeEnd}}</span>
{% endif %}
</p>
</div>
<div class="c-card__content">
<div class="c-card__header">
<p class="c-card__city c-card__city--{{band}}">{{ course.language }}</p>
<p class="c-card__type c-card__type--{{band}}">
{# {{course.mode}} #}
{% set local = false %}
{% for courseTrans in course.getCourseTranslates() %}
{% if courseTrans.getFkLanguage().code == app.request.get('_locale') %}
{{ courseTrans.place }}
{% set local = true %}
{% endif %}
{% endfor %}
{% if local == false %}
{% for courseTrans in course.getCourseTranslates() %}
{% if courseTrans.getFkLanguage().code == 'en' %}
{{ courseTrans.place }}
{% endif %}
{% endfor %}
{% endif %}
</p>
</div>
<div class="c-card__body">
<p class="c-card__title">
{% set local = false %}
{% for courseTrans in course.getCourseTranslates() %}
{% if courseTrans.getFkLanguage().code == app.request.get('_locale') %}
{{ courseTrans.title }}
{% set local = true %}
{% endif %}
{% endfor %}
{% if local == false %}
{% for courseTrans in course.getCourseTranslates() %}
{% if courseTrans.getFkLanguage().code == 'en' %}
{{ courseTrans.title }}
{% endif %}
{% endfor %}
{% endif %}
</p>
<div class="c-card__description">
{% set local = false %}
{% for courseTrans in course.getCourseTranslates() %}
{% if courseTrans.getFkLanguage().code == app.request.get('_locale') %}
{{ courseTrans.description|raw }}
{% set local = true %}
{% endif %}
{% endfor %}
{% if local == false %}
{% for courseTrans in course.getCourseTranslates() %}
{% if courseTrans.getFkLanguage().code == 'en' %}
{{ courseTrans.description|raw }}
{% endif %}
{% endfor %}
{% endif %}
</div>
<p class="c-card__organize">{% trans %}Organizer{% endtrans %}: {{ course.organizer }}</p>
<p class="c-card__sessions c-card__sessions--{{band}}">{{ course.getCourseLectures|length}} {% trans %}sessions{% endtrans %} </p>
<div class="c-card__copy">
{% set local = false %}
{% for courseTrans in course.getCourseTranslates() %}
{% if courseTrans.getFkLanguage().code == app.request.get('_locale') %}
{{ courseTrans.targetGroup|raw }}
{% set local = true %}
{% endif %}
{% endfor %}
{% if local == false %}
{% for courseTrans in course.getCourseTranslates() %}
{% if courseTrans.getFkLanguage().code == 'en' %}
{{ courseTrans.targetGroup|raw }}
{% endif %}
{% endfor %}
{% endif %}
</div>
</div>
<div class="c-card__footer">
<div class="c-card__actions">
<a href="{{ path('app_course_show', {'slug': course.slug})}}" class="c-button c-button--primary c-button--{{band}}">
<span class="c-button__body c-button__body--primary c-button__body--{{band}}">{% trans %}View more{% endtrans %}</span>
<span class="c-button__append c-button__append--primary c-button__append--{{band}}">
→
</span>
</a>
</div>
</div>
</div>
</article>