{% extends 'layout.html.twig' %}
{% block layout %}
<div style="display:block;">
<h2 class="jurisprudence_title" style="text-align: center;">
<strong>{{ jurisprudence.name }}</strong>
</h2>
</div>
<div class="row" style="padding-left:20px; padding-right:20px; padding-top:20px">
<div class="col-lg-8 col-12">
<div class="" style="display: block">
<br />
<div style="margin-left: 10px; margin-right: 10px;">
<p>
<span style="color:gray">Date de la décision : </span>
<strong>{{ jurisprudence.date|date('d/m/Y') }} </strong>
<br />
<span style="color:gray">Juridiction : </span>
<strong>{{jurisprudence.justiceCourt}}</strong>
<br />
{% if jurisprudence.rg != null %}
<span style="color: gray;">Numéro RG : </span>
<strong>{{jurisprudence.rg}}</strong>
<br />
{% endif %}
<span style="color:gray">Catégorie : </span>
{% for data in jpData %}
{% for category in data %}
{% if loop.first %} {% else %} <span style="color:gray"> > </span> {% endif %}
<strong> {{ category.name }} </strong>
{% endfor %}
<br />
{% endfor %}
<span style="color:gray">Mots clés : </span>
{% if jurisprudence.listekeywords|length > 0 %}
{% for data in jurisprudence.listekeywords %}
<a href="{{ path('keyword', {keyword: data.id}) }}">
<span class="badge badge-primary">
{{ data.keyword }}
</span>
</a>
{% endfor %}
{% else %}
Pas de mots clés
{% endif %}
<br />
{% if jurisprudence.pdf is not null and jurisprudence.pdf != '' %}
<br />
<a href="{{ '/jurisprudences-pdf/'~ jurisprudence.pdf }}" target="_blank">
<button type="button" class="btn btn-primary">Télécharger au format PDF</button>
</a>
{% endif %}
{% if is_granted('ROLE_ADMIN') %}
<a href="{{ea_url()
.setController('App\\Controller\\Admin\\JurisprudenceCrudController')
.setAction('edit')
.setEntityId(jurisprudence.id)}}">
<button type="button" class="btn btn-info">Modifier la jurisprudence</button>
</a>
{% endif %}
</p>
</div>
<br />
<div class="texte-principal">
{{ jurisprudence.content|raw }}
</div>
</div>
</div>
{% if jurisprudence.listelexique|length > 0 %}
<div class="col-lg-4 col-12">
<div style="padding:20px; margin:10px;border: 1px solid gray;border-radius:3px">
{% for data in jurisprudence.listelexique %}
{% if data.active == true%}
<b>{{ data.word }} :</b> {{ data.definition|raw }}
<br/>
{% endif %}
{% endfor %}
</div>
</div>
{% endif %}
</div>
{% endblock %}