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

45 lines
2.2 KiB
HTML
Raw Normal View History

{% extends "cofcms/base_aside.html" %}
2017-08-26 18:05:20 +02:00
{% load wagtailimages_tags cofcms_tags wagtailcore_tags %}
{% block aside %}
{% calendar %}
{% endblock %}
{% block content %}
<section class="intro">
<h1>{{ page.title }}</h1>
<div>{{ page.introduction|safe }}</div>
</section>
<section class="actulist">
2018-01-20 19:33:50 +01:00
{% if actus.has_previous %}
<a class="block prev-actus" href="?page={{ actus.previous_page_number }}{% for key,value in request.GET.items %}{% ifnotequal key 'page' %}&amp;{{ key }}={{ value }}{% endifnotequal %}{% endfor %}">Actualités plus récentes</a>
{% endif %}
{% if actus.has_next %}
<a class="block next-actus" href="?page={{ actus.next_page_number }}{% for key,value in request.GET.items %}{% ifnotequal key 'page' %}&amp;{{ key }}={{ value }}{% endifnotequal %}{% endfor %}">Actualités plus anciennes</a>
{% endif %}
{% for actu in page.actus %}
<article class="actu">
2017-10-10 11:22:02 +02:00
<div class="actu-image" {% if actu.image %}{% image actu.image fill-400x200 as img %}style="background-image:url('{{ img.url }}');"{% endif %}></div>
<div class="actu-infos">
<h2><a href="{% pageurl actu %}">{{ actu.title }}</a></h2>
{% if actu.is_event %}
<p><span class="actu-dates">{{ actu.dates|capfirst }}</span><br />{{ actu.chapo }}</p>
{% else %}
2018-01-22 21:24:20 +01:00
{{ actu.body|safe|truncatewords_html:15 }}
2017-10-10 11:22:02 +02:00
{% endif %}
<a href="{% pageurl actu %}">Lire plus &gt;</a>
</div>
</article>
{% endfor %}
2018-01-20 19:33:50 +01:00
{% if actus.has_previous %}
<a class="block prev-actus" href="?page={{ actus.previous_page_number }}{% for key,value in request.GET.items %}{% ifnotequal key 'page' %}&amp;{{ key }}={{ value }}{% endifnotequal %}{% endfor %}">Actualités plus récentes</a>
{% endif %}
{% if actus.has_next %}
<a class="block next-actus" href="?page={{ actus.next_page_number }}{% for key,value in request.GET.items %}{% ifnotequal key 'page' %}&amp;{{ key }}={{ value }}{% endifnotequal %}{% endfor %}">Actualités plus anciennes</a>
{% endif %}
</section>
{% endblock %}