{% if listWithThumbnails is not defined %}
{% set listWithThumbnails = true %}
{% endif %}
{% if entity.seealsoStructures is not empty or entity.seealsoQuestionAnswers is not empty %}
{% import "common/listWithImages.html.twig" as listWithImages %}
<div class="see-also mt-3">
<h2>À voir aussi</h2>
{% if is_granted('ROLE_EDITOR') %}<p class="text-center">(liste des structures et questionAnswers spécifiées comme seealso)</p>{% endif %}
{% if entity.seealsoQuestionAnswers is not empty %}
<h3 class="">Des questions-réponses</h3>
{% set questionAnswers = entity.seealsoQuestionAnswers %}
{% if listWithThumbnails %}
<div class="row questionAnswers-list with-images">
{% for questionAnswer in questionAnswers %}
<div class="col-sm-6 col-md-4 col-lg-3 article with-image
{% if type is defined %}{{ type }}{% endif %}
">
<a style="display:block" href="{{ path('showQuestionAnswerBySlug', {slug:questionAnswer.slug}) }}">
<div class="post-medias">
{{ listWithImages.showOneImage(questionAnswer) }}
</div>
<p>
{# <span class="date">{{ questionAnswer.createdAt|date("d/m/Y") }}</span>
<span class="tags">{{ questionAnswer.tags|join(', ') }}</span>
<br/> #}
<span class="title">
{{ questionAnswer.title }}
{# {{ questionAnswer.title|raw|striptags|slice(0,30) }}
{% if questionAnswer.title|raw|striptags|length > 30 %}...{% endif %} #}
</span>
</p>
</a>
</div>
{% endfor %}
</div>
{% else %}
<ul class="questionAnswersList">
{% for key, questionAnswer in questionAnswers %}
<li>
<a href="{{ path('showQuestionAnswerBySlug', { 'slug':questionAnswer.slug }) }}">
{{ questionAnswer.title}} {% if is_granted('ROLE_EDITOR') %}(priorité : {{ questionAnswer.priority }}){% endif %}
</a>
</li>
{% endfor %}
</ul>
{% endif %}
{% endif %}
{% if entity.seealsoStructures is not empty %}
<h3 class="">Des lieux, associations, institutions ou entreprises</h3>
{% set structures = entity.seealsoStructures %}
{% if listWithThumbnails %}
<div class="row structures-list with-images">
{% for structure in structures %}
<div class="col-sm-6 col-md-4 col-lg-3 article with-image
{% if type is defined %}{{ type }}{% endif %}
">
<a style="display:block" href="{{ path('showStructureBySlug', {slug:structure.slug}) }}">
<div class="post-medias">
{{ listWithImages.showOneImage(structure) }}
</div>
<p>
{# <span class="date">{{ structure.createdAt|date("d/m/Y") }}</span>
<span class="tags">{{ structure.tags|join(', ') }}</span>
<br/> #}
<span class="title">
{{ structure.title }}
{# {{ structure.title|raw|striptags|slice(0,30) }}
{% if structure.title|raw|striptags|length > 30 %}...{% endif %} #}
</span>
</p>
</a>
</div>
{% endfor %}
</div>
{% else %}
<ul class="structuresList">
{% for key, structure in structures %}
<li>
<a href="{{ path('showStructureBySlug', { 'slug':structure.slug }) }}">
{{ structure.title}} {% if is_granted('ROLE_EDITOR') %}(priorité : {{ structure.priority }}){% endif %}
</a>
</li>
{% endfor %}
</ul>
{% endif %}
{% endif %}
</div>
{% endif %}