kpsul/gestioncof/cms/templates/cofcms/cof_directory_page.html
2020-03-28 14:10:24 +01:00

48 lines
1.8 KiB
HTML

{% extends "cofcms/base_aside.html" %}
{% load wagtailimages_tags cofcms_tags static %}
{% block extra_head %}
{{ block.super }}
<script src="{% static "vendor/jquery/jquery-3.3.1.min.js" %}"></script>
<script src="{% static "cofcms/js/script.js" %}"></script>
{% endblock %}
{% block aside_title %}Accès rapide{% endblock %}
{% block aside %}
<ul>
{% for entry in page.entries %}
<li><a href="#{{ entry.slug }}">{{ entry.title }}</a></li>
{% endfor %}
</ul>
{% endblock %}
{% block content %}
<section class="intro">
<h1>{{ page.title }}</h1>
<div>{{ page.introduction|safe }}</div>
</section>
<section class="directory">
{% for entry in page.entries %}
<article class="entry" id="{{ entry.slug }}">
{% if entry.image %}
<div class="entry-image">{% image entry.image width-150 class="entry-img" %}</div>
{% endif %}
<h2>{{ entry.title }}</h2>
<div class="desc">{{ entry.body|safe }}</div>
{% if entry.links %}
<ul class="links">
{% for block in entry.links %}
<li>
{% if block.block_type == "lien" %}
<a href="{{ block.value.url }}">{{ block.value.texte }}</a>
{% else %}
{{ block.value.texte }} : <button data-mref="{{ block.value.email|obfuscate_mail }}" class="facteur">Afficher l'adresse mail</a>
{% endif %}
</li>
{% endfor %}
</ul>
{% endif %}
</article>
{% endfor %}
</section>
{% endblock %}