gestioCOF/gestioncof/cms/templates/cofcms/cof_directory_page.html
2020-03-29 16:11:02 +02:00

48 lines
1.9 KiB
HTML

{% extends "cofcms/base_aside.html" %}
{% load wagtailimages_tags cofcms_tags static i18n %}
{% 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 %}{% trans "Accès rapide" %}{% endblock %}
{% block aside %}
<ul class="directory">
{% 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">{% trans "Afficher l'adresse mail" %}</a>
{% endif %}
</li>
{% endfor %}
</ul>
{% endif %}
</article>
{% endfor %}
</section>
{% endblock %}