gestioCOF/gestioncof/cms/templates/cofcms/cof_directory_page.html

49 lines
1.8 KiB
HTML
Raw Normal View History

{% 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 %}
2018-01-28 19:09:56 +01:00
{% 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 %}