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

{% block content %}
<div class='container groupeshow mt-2'>
  <div class="my-2 p-3 bg-white rounded box-shadow">
    <div class="contentpresta p-4 mt-2">
      <div class="card mb-2">
      <div class="card-header"><h1>{{presta.raison}}</h1></div>
      <div class="card-body">
        {% if presta.statut != null %}
          <h6 class="card-title text-muted mb-3">{{presta.statut}}</h6>
        {% endif %}
        {% if presta.groupe != null %}
          <h4 class="card-subtitle mb-3">{{'Groupe local'|trans}} : <a href='{{ path('show_groupe', {'slug': presta.groupe.slug}) }}'>{{presta.groupe.__toString()}}</a></h4>
        {% endif %}
        {% if presta.siret != null %}
          <h5 class="card-subtitle mb-3">{{'SIRET'|trans}} : {{presta.siret}}</h5>
        {% endif %}
        {% if presta.horaires != null %}
          <h6 class="card-subtitle text-muted mb-3">{{'Horaires'|trans}} : {{presta.horaires}}</h6>
        {% endif %}
        {% if presta.web != null %}
          <h6 class="card-subtitle mb-3">{{'Site web'|trans}} : <a href='{{presta.web}}' target='_blank'>{{presta.web}}</a></h6>
        {% endif %}
        {% if presta.responsable != null and presta.metier != null %}
          <h6 class="card-title my-3">Responsable : {{presta.responsable}} ({{presta.metier}})</h6>
        {% endif %}
        {% if presta.user != null and presta.user.email != null %}
          <h6 class="card-subtitle text-muted mb-3">{{'Email'|trans}} : {{ presta.user.email|safe_email|raw }}</h6>
        {% endif %}
        {% if presta.user != null and presta.user.phone != null %}
          <h6 class="card-subtitle text-muted mb-3">{{'Téléphone'|trans}} : {{ presta.user.phone }}</h6>
        {% endif %}
        <div class="card-text">
            {{presta.description|raw}}
          </div>
        </div>
    </div>
  </div>
  </div>
</div>
{% endblock %}


{% block contenat %}
<div class='container newslist mt-5'>
  <h1>{{presta.raison}}</h1>
  <div class="my-3 p-3 bg-white rounded box-shadow">
    <div class="contentnews p-4 mt-5">
        <h2>{{presta.statut}}</h2>
        <h3>Responsable : {{presta.responsable}} ({{presta.metier}})</h3>
    <h4>SIRET : {{presta.siret}}</h4>
    {% if presta.web is not empty %}
      <h4><a href='{{presta.web}}'>Site web</a></h4>
    {% endif %}
    </div>
  </div>
</div>
{% endblock %}
