onepresta.html.twig 1.76 KB
Newer Older
Julien Jorry committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
<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' %}
31
						{% thumbnail presta.media, 'big' with {'class': 'rounded mx-auto d-block'} %}<br/>
Julien Jorry committed
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
					{% 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>