onepresta.html.twig 1.8 KB
Newer Older
Julien Jorry committed
1 2 3
<div class='card'>
	<div class="card-header">
		<h2>
4
			<a href="{{ path('show_prestataire', {'slug': presta.slug}) }}">{{ presta.raison }}</a>
Julien Jorry committed
5 6 7 8 9
		</h2>
		<h5 class="card-title">
			{% if presta.geolocs|length > 0%}
	        	{% for geoloc in presta.geolocs %}
	          		{% if geoloc.enabled %}
10
	            		<em>{{ geoloc.geoloc }}</em><br/>
Julien Jorry committed
11 12 13 14 15 16 17 18
	          		{% 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 %}
19
						<a class='rubrique' href='{{ path('show_rubrique', {'slug': rubrique.slug}) }}'>{{ rubrique.name }}</a>
Julien Jorry committed
20 21 22 23 24 25 26 27 28 29 30
					{% 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
					{% else %}
33
						<a href="{% path presta.media, 'reference' %}">{{ 'Télécharger'|trans }}</a>
Julien Jorry committed
34 35 36 37 38 39
					{% endif %}
				</p>
			{% endif %}
			<h4 class="card-title">{{presta.statut}}</h4>
			{% if presta.description != null %}
				<p class='mb-4'>
40
					{{ presta.description|raw }}
Julien Jorry committed
41 42 43 44
				</p>
			{% endif %}
			{% if presta.horaires != null %}
				<em class='mb-4'>
45
					{{ 'Horaires'|trans }} : {{ presta.horaires|raw }}
Julien Jorry committed
46 47 48 49
				</em>
			{% endif %}
			{% if presta.web != null %}
				<p>
50
					{{ 'Site web'|trans }} : <a href='{{ presta.web }}' target='_blank'>{{ presta.web }}</a>
Julien Jorry committed
51 52 53 54 55
				</p>
			{% endif %}
		</div>
	</div>
</div>