templates/platform/component/molecule/default_list_footer_documents.html.twig line 1

Open in your IDE?
  1. {# configuration example
  2. ###########
  3. col:         '12'
  4. enabled:     false
  5. class:       'font-15 col-md-4 mt-3'
  6. panel_right: false
  7. list:
  8.     class: text-light
  9. title:
  10.     type:    h3
  11.     content: 'Informations légales'
  12.     class:   'text-light text-uppercase'
  13. order:
  14.     - reglement
  15.     - cgu
  16.     - cgv
  17.     - cookies
  18.     - rgpd
  19. end_item:
  20.     enabled: false
  21.     type:    footer_signature
  22.     class:   'd-flex align-items-end justify-content-end'
  23.     text:
  24.         type:    span
  25.         class:   'text-uppercase m-0 pr-2'
  26.         content: 'Designed by'
  27.     link:
  28.         enabled: true
  29.         url:     'https://37deux.com/'
  30.         target:  _blank
  31.         content: 37Deux
  32.         class:   text-light
  33.         tel:     ''
  34.         mailto:  ''
  35.         route:   ''
  36.         params:  ''
  37. #}
  38. {% if value.enabled is not defined or value.enabled %}
  39.     <div class="{% if value.container is defined %}{{ value.container }}{% endif %}">
  40.         {% include '/platform/component/atom/title.html.twig' with {'title': value.title} %}
  41.         <ul class="list-unstyled">
  42.             {% if value.order is defined %}
  43.                 {% set order = value.order %}
  44.             {% else %}
  45.                 {% set order = [] %}
  46.             {% endif %}
  47. {#            {% set documents =  getGeneralDocumentsInOrder( order ) %}#}
  48.             {% set documents =  [] %}
  49.             {% set slug = value.hook is defined ? value.hook : false %}
  50.             {% if value.hook is defined %}
  51.                 {% set documents =  getDocumentsByHook( value.hook.slug, order ) %}
  52.             {% endif %}
  53.             {% for document in documents %}
  54.                 {% set displayForFront = canDisplayDocument(app.user, document) %}
  55.                 {% if app.request.get('_route') in security_path %}
  56.                     {% set displayForFront = canDisplayDocument(app.user, document) and app.request.get('_route') in security_path and document.public is same as(true) %}
  57.                 {% endif %}
  58.                 {% if displayForFront %}
  59.                     <li>
  60.                         <a href="{% if document.externLink is not null %}{{ document.externLink }}{% else %}{{ path('front_common_document', {slug: document.slug}) }}{% endif %}"
  61.                            data-display="{{ document.display }}"
  62.                            data-document-slug="{{ document.slug }}"
  63.                            target="_blank"
  64.                            class="general-document {% if value.list is defined and value.list.class is defined %}{{ value.list.class }}{% endif %}">
  65.                             {% if document.title is not same as(null) %}{{ document.title|trans|capitalize|raw }}{% else %}{{ document.slug|trans|capitalize }}{% endif %}
  66.                         </a>
  67.                     </li>
  68.                 {% endif %}
  69.             {% else %}
  70.                 {% if slug is not same as(false) %}
  71.                     <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>
  72.                 {% endif %}
  73.             {% endfor %}
  74.         </ul>
  75.         {% if value.end_item is defined and value.end_item.enabled %}
  76.             {% include '/platform/component/molecule/footer_signature.html.twig' with {'value': value.end_item} %}
  77.         {% endif %}
  78.     </div>
  79. {% endif %}