{# configuration example
###########
col: '12'
enabled: false
class: 'font-15 col-md-4 mt-3'
panel_right: false
list:
class: text-light
title:
type: h3
content: 'Informations légales'
class: 'text-light text-uppercase'
order:
- reglement
- cgu
- cgv
- cookies
- rgpd
end_item:
enabled: false
type: footer_signature
class: 'd-flex align-items-end justify-content-end'
text:
type: span
class: 'text-uppercase m-0 pr-2'
content: 'Designed by'
link:
enabled: true
url: 'https://37deux.com/'
target: _blank
content: 37Deux
class: text-light
tel: ''
mailto: ''
route: ''
params: ''
#}
{% if value.enabled is not defined or value.enabled %}
<div class="{% if value.container is defined %}{{ value.container }}{% endif %}">
{% include '/platform/component/atom/title.html.twig' with {'title': value.title} %}
<ul class="list-unstyled">
{% if value.order is defined %}
{% set order = value.order %}
{% else %}
{% set order = [] %}
{% endif %}
{# {% set documents = getGeneralDocumentsInOrder( order ) %}#}
{% set documents = [] %}
{% set slug = value.hook is defined ? value.hook : false %}
{% if value.hook is defined %}
{% set documents = getDocumentsByHook( value.hook.slug, order ) %}
{% endif %}
{% for document in documents %}
{% set displayForFront = canDisplayDocument(app.user, document) %}
{% if app.request.get('_route') in security_path %}
{% set displayForFront = canDisplayDocument(app.user, document) and app.request.get('_route') in security_path and document.public is same as(true) %}
{% endif %}
{% if displayForFront %}
<li>
<a href="{% if document.externLink is not null %}{{ document.externLink }}{% else %}{{ path('front_common_document', {slug: document.slug}) }}{% endif %}"
data-display="{{ document.display }}"
data-document-slug="{{ document.slug }}"
target="_blank"
class="general-document {% if value.list is defined and value.list.class is defined %}{{ value.list.class }}{% endif %}">
{% if document.title is not same as(null) %}{{ document.title|trans|capitalize|raw }}{% else %}{{ document.slug|trans|capitalize }}{% endif %}
</a>
</li>
{% endif %}
{% else %}
{% if slug is not same as(false) %}
<span class="d-block alert alert-info">Vérifiez que le hook <code>{{ value.hook.slug }}</code> existe et qu'il possède des documents</span>
{% endif %}
{% endfor %}
</ul>
{% if value.end_item is defined and value.end_item.enabled %}
{% include '/platform/component/molecule/footer_signature.html.twig' with {'value': value.end_item} %}
{% endif %}
</div>
{% endif %}