<div class='card'>
	<div class="card-header">
		<h2>
			<a href="{{ path('show_prestataire', {'slug': presta.slug}) }}">{{presta.raison}}</a>
		</h2>
		<h5 class="card-title">
			{% if presta.geolocs|length > 0%}
	        	{% for geoloc in presta.geolocs %}
	          		{% if geoloc.enabled %}
	            		<em>{{geoloc.geoloc}}</em><br/>
	          		{% endif %}
	        	{% endfor %}
		    {% endif %}
		</h5>
		{% if withrubrique is not defined or (withrubrique is defined and withrubrique != false) %}
		    <h6 class="card-title">
				{% if presta.rubriques|length > 0%}
					{% for rubrique in presta.rubriques %}
						<a class='rubrique' href='{{ path('show_rubrique', {'slug': rubrique.slug}) }}'>{{rubrique.name}}</a>
					{% endfor %}
				{% endif %}
			</h6>
		{% endif %}
	</div>
	<div class="card-body">
		<div class="card-text">
			{% if presta.media %}
				<p class='mb-4'>
					{% set pathMedia = mediaurl(presta.media, 'reference')|lower %}
					{% if pathMedia ends with '.jpg' or pathMedia ends with '.jpeg' or pathMedia ends with '.png' or pathMedia ends with '.bmp' or pathMedia ends with '.gif' %}
						<img src="{% path presta.media, 'reference' %}" style="max-width: 100%;"/>
					{% else %}
						<a href="{% path presta.media, 'reference' %}">{{'Télécharger'|trans}}</a>
					{% endif %}
				</p>
			{% endif %}
			<h4 class="card-title">{{presta.statut}}</h4>
			{% if presta.description != null %}
				<p class='mb-4'>
					{{presta.description|raw}}
				</p>
			{% endif %}
			{% if presta.horaires != null %}
				<em class='mb-4'>
					{{ 'Horaires'|trans }} : {{presta.horaires|raw}}
				</em>
			{% endif %}
			{% if presta.web != null %}
				<p>
					<a href='{{presta.web}}'>{{ 'Site web'|trans }}</a>
				</p>
			{% endif %}
		</div>
	</div>
</div>