{% extends 'common/layout.html.twig' %}

{% block content %}
<div class='container grouprestashow mt-2'>
  <div class="my-2 p-3 bg-white rounded box-shadow">
    <div class="contentgroupresta p-4 mt-2">
    	<div class="card mb-2">
			<div class="card-header"><h1>{{groupepresta.name}}</h1></div>
			<div class="card-body">
				{% if groupepresta.groupe != null %}
					<h4 class="card-subtitle mb-3">{{ 'Groupe local'|trans }} : <a href='{{ path('show_groupe', {'slug': groupepresta.groupe.slug}) }}'>{{groupepresta.groupe.__toString()}}</a></h4>
				{% endif %}
				{% if groupepresta.horaires != null %}
					<h5 class="card-subtitle mb-3">{{ 'Horaires'|trans }} : {{groupepresta.horaires}}</h5>
				{% endif %}
				{% if groupepresta.tel != null %}
					<h5 class="card-subtitle mb-3">{{ 'Téléphone'|trans }} : {{groupepresta.tel}}</h5>
				{% endif %}
				{% if groupepresta.email != null %}
					<h6 class="card-subtitle mb-3">{{ 'Email'|trans }} : {{ groupepresta.email|safe_email|raw }}</h6>
				{% endif %}
				{% if groupepresta.getFullAddresse() != null %}
					<h6 class="card-title text-muted mb-3">{{groupepresta.getFullAddresse()}}</h6>
				{% endif %}
				<div class="card-text">
		    		{{groupepresta.content|raw}}
		    	</div>
	    	</div>
	    	<div class="card-header"><h2>{{ groupepresta.groupe.prestataires|length }} {{'prestataires'|trans}} :</h2></div>
		    <ul class="list-group list-group-flush">
		    	{% for presta in groupepresta.groupe.prestataires|filter(v => v.enabled and not v.mlc) %}
		    		<li class="list-group-item">
		    			<a href='{{ path('show_prestataire', {'slug': presta.slug}) }}'>{{presta.raison}}</a>
		    		</li>
		    	{% endfor %}
		    </ul>
		</div>
	</div>
  </div>
</div>
{% endblock %}