On utilise |richtext pour les champs RichText, ce qui permet de bien faire les rendus
This commit is contained in:
parent
7ca7f7298a
commit
264a0a852f
6 changed files with 32 additions and 32 deletions
|
@ -33,19 +33,19 @@
|
||||||
<nav>
|
<nav>
|
||||||
{% flat_menu "cof-nav-int" template="cofcms/base_nav.html" apply_active_classes=True %}
|
{% flat_menu "cof-nav-int" template="cofcms/base_nav.html" apply_active_classes=True %}
|
||||||
|
|
||||||
{% get_current_language as curlang %}
|
{% get_current_language as curlang %}
|
||||||
|
|
||||||
<div class="lang-select">
|
<div class="lang-select">
|
||||||
{% if curlang == 'en' %}
|
{% if curlang == 'en' %}
|
||||||
{% language 'fr' %}
|
{% language 'fr' %}
|
||||||
<a href="{% pageurl self %}" title="Français"><img src="{% static "cofcms/images/fr.png" %}"></a>
|
<a href="{% pageurl self %}" title="Français"><img src="{% static "cofcms/images/fr.png" %}"></a>
|
||||||
{% endlanguage %}
|
{% endlanguage %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{% language 'en' %}
|
{% language 'en' %}
|
||||||
<a href="{% pageurl self %}" title="English"><img src="{% static "cofcms/images/en.png" %}"></a>
|
<a href="{% pageurl self %}" title="English"><img src="{% static "cofcms/images/en.png" %}"></a>
|
||||||
{% endlanguage %}
|
{% endlanguage %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
</section>
|
</section>
|
||||||
</header>
|
</header>
|
||||||
|
|
|
@ -17,16 +17,16 @@
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<section class="intro">
|
<section class="intro">
|
||||||
<h1>{{ page.title }}</h1>
|
<h1>{{ page.title }}</h1>
|
||||||
<div>{{ page.introduction|safe }}</div>
|
<div>{{ page.introduction|richtext }}</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section class="actulist">
|
<section class="actulist">
|
||||||
{% if actus.has_previous %}
|
{% 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' %}&{{ key }}={{ value }}{% endifnotequal %}{% endfor %}">{% trans "Actualités plus récentes" %}</a>
|
<a class="block prev-actus" href="?page={{ actus.previous_page_number }}{% for key,value in request.GET.items %}{% ifnotequal key 'page' %}&{{ key }}={{ value }}{% endifnotequal %}{% endfor %}">{% trans "Actualités plus récentes" %}</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if actus.has_next %}
|
{% 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' %}&{{ key }}={{ value }}{% endifnotequal %}{% endfor %}">{% trans "Actualités plus anciennes" %}</a>
|
<a class="block next-actus" href="?page={{ actus.next_page_number }}{% for key,value in request.GET.items %}{% ifnotequal key 'page' %}&{{ key }}={{ value }}{% endifnotequal %}{% endfor %}">{% trans "Actualités plus anciennes" %}</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% for actu in page.actus %}
|
{% for actu in page.actus %}
|
||||||
<article class="actu">
|
<article class="actu">
|
||||||
|
@ -36,7 +36,7 @@
|
||||||
{% if actu.is_event %}
|
{% if actu.is_event %}
|
||||||
<p><span class="actu-dates">{{ actu|dates|capfirst }}</span><br />{{ actu.chapo }}</p>
|
<p><span class="actu-dates">{{ actu|dates|capfirst }}</span><br />{{ actu.chapo }}</p>
|
||||||
{% else %}
|
{% else %}
|
||||||
{{ actu.body|safe|truncatewords_html:15 }}
|
{{ actu.body|richtext|truncatewords_html:15 }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<a href="{% pageurl actu %}">{% trans "Lire plus" %} ></a>
|
<a href="{% pageurl actu %}">{% trans "Lire plus" %} ></a>
|
||||||
</div>
|
</div>
|
||||||
|
@ -44,10 +44,10 @@
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
{% if actus.has_previous %}
|
{% 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' %}&{{ key }}={{ value }}{% endifnotequal %}{% endfor %}">{% trans "Actualités plus récentes" %}</a>
|
<a class="block prev-actus" href="?page={{ actus.previous_page_number }}{% for key,value in request.GET.items %}{% ifnotequal key 'page' %}&{{ key }}={{ value }}{% endifnotequal %}{% endfor %}">{% trans "Actualités plus récentes" %}</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if actus.has_next %}
|
{% 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' %}&{{ key }}={{ value }}{% endifnotequal %}{% endfor %}">{% trans "Actualités plus anciennes" %}</a>
|
<a class="block next-actus" href="?page={{ actus.next_page_number }}{% for key,value in request.GET.items %}{% ifnotequal key 'page' %}&{{ key }}={{ value }}{% endifnotequal %}{% endfor %}">{% trans "Actualités plus anciennes" %}</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</section>
|
</section>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{% extends "cofcms/base.html" %}
|
{% extends "cofcms/base.html" %}
|
||||||
{% load wagtailimages_tags cofcms_tags i18n %}
|
{% load wagtailcore_tags wagtailimages_tags cofcms_tags i18n %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<section class="intro">
|
<section class="intro">
|
||||||
|
@ -11,7 +11,7 @@
|
||||||
<section class="pagecontent">
|
<section class="pagecontent">
|
||||||
<div class="image">{% image page.image width-700 %}</div>
|
<div class="image">{% image page.image width-700 %}</div>
|
||||||
<article>
|
<article>
|
||||||
{{ page.body|safe }}
|
{{ page.body|richtext }}
|
||||||
</article>
|
</article>
|
||||||
</section>
|
</section>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{% extends "cofcms/base_aside.html" %}
|
{% extends "cofcms/base_aside.html" %}
|
||||||
{% load wagtailimages_tags cofcms_tags static i18n %}
|
{% load wagtailcore_tags wagtailimages_tags cofcms_tags static i18n %}
|
||||||
|
|
||||||
{% block extra_head %}
|
{% block extra_head %}
|
||||||
{{ block.super }}
|
{{ block.super }}
|
||||||
|
@ -18,7 +18,7 @@
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<section class="intro">
|
<section class="intro">
|
||||||
<h1>{{ page.title }}</h1>
|
<h1>{{ page.title }}</h1>
|
||||||
<div>{{ page.introduction|safe }}</div>
|
<div>{{ page.introduction|richtext }}</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section class="directory">
|
<section class="directory">
|
||||||
|
@ -28,7 +28,7 @@
|
||||||
<div class="entry-image">{% image entry.image width-150 class="entry-img" %}</div>
|
<div class="entry-image">{% image entry.image width-150 class="entry-img" %}</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<h2>{{ entry.title }}</h2>
|
<h2>{{ entry.title }}</h2>
|
||||||
<div class="desc">{{ entry.body|safe }}</div>
|
<div class="desc">{{ entry.body|richtext }}</div>
|
||||||
{% if entry.links %}
|
{% if entry.links %}
|
||||||
<ul class="links">
|
<ul class="links">
|
||||||
{% for block in entry.links %}
|
{% for block in entry.links %}
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
{% extends "cofcms/base.html" %}
|
{% extends "cofcms/base.html" %}
|
||||||
{% load wagtailimages_tags cofcms_tags %}
|
{% load wagtailcore_tags wagtailimages_tags cofcms_tags %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<section class="intro">
|
<section class="intro">
|
||||||
<h1>{{ page.title }}</h1>
|
<h1>{{ page.title }}</h1>
|
||||||
<div>{{ page.introduction|safe }}</div>
|
<div>{{ page.introduction|richtext }}</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section class="pagecontent">
|
<section class="pagecontent">
|
||||||
|
@ -13,7 +13,7 @@
|
||||||
<h2>{{ block.value }}</h2>
|
<h2>{{ block.value }}</h2>
|
||||||
{% elif block.block_type == "paragraph" %}
|
{% elif block.block_type == "paragraph" %}
|
||||||
<article class="paragraph">
|
<article class="paragraph">
|
||||||
{{ block.value|safe }}
|
{{ block.value|richtext }}
|
||||||
</article>
|
</article>
|
||||||
{% elif block.block_type == "image" %}
|
{% elif block.block_type == "image" %}
|
||||||
<div class="image">
|
<div class="image">
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<section class="intro">
|
<section class="intro">
|
||||||
<h1>{{ page.title }}</h1>
|
<h1>{{ page.title }}</h1>
|
||||||
<div>{{ page.introduction|safe }}</div>
|
<div>{{ page.introduction|richtext }}</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section class="actuhome">
|
<section class="actuhome">
|
||||||
|
@ -31,7 +31,7 @@
|
||||||
{% if actu.is_event %}
|
{% if actu.is_event %}
|
||||||
<span class="actu-minical">{% mini_calendar actu %}</span><span class="actu-dates">{{ actu|dates }}</span>
|
<span class="actu-minical">{% mini_calendar actu %}</span><span class="actu-dates">{{ actu|dates }}</span>
|
||||||
{% else %}
|
{% else %}
|
||||||
{{ actu.body|safe|truncatewords_html:10 }}
|
{{ actu.body|richtext|truncatewords_html:10 }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
<a href="{% pageurl actu %}" class="actu-overlay"></a>
|
<a href="{% pageurl actu %}" class="actu-overlay"></a>
|
||||||
|
|
Loading…
Reference in a new issue