Files
aircox-radiocampus/aircox_cms/templates/aircox_cms/dynamic_list_page.html
2017-05-15 16:52:58 +02:00

51 lines
1.4 KiB
HTML
Executable File

{% extends "aircox_cms/base_site.html" %}
{# generic page to display list of articles #}
{% load i18n %}
{% load wagtailcore_tags %}
{% load wagtailimages_tags %}
{% block title %}
<h1>
{# Translators: titles for the page that shows a list of elements. #}
{# Translators: terms are search terms, or tag tarms. url: url to the page #}
{% if list_selector.terms %}
{% blocktrans with terms=list_selector.terms trimmed %}
Search in publications for <i>{{ terms }}</i>
{% endblocktrans %}
{% elif list_selector.filter_related %}
{# should never happen #}
{% blocktrans with title=list_selector.filter_related.title url=list_selector.filter_related.url trimmed %}
Related to <a href="{{ url }}">{{ title }}</a>
{% endblocktrans %}
{% else %}
{% blocktrans %}All the publications{% endblocktrans %}
{% endif %}
</h1>
{% endblock %}
{% block content %}
{% with related=list_selector.filter_related %}
{% if related %}
<div class="body headline">
{% image related.cover fill-128x128 class="cover item_cover" %}
{{ related.headline }}
<a href="{{ related.url }}">{% trans "More about it" %}</a>
</div>
{% elif page.body %}
<div class="body">
{{ page.body|richtext }}
</div>
{% endif %}
{% endwith %}
{% with list_paginator=paginator %}
{% include "aircox_cms/snippets/list.html" %}
{% endwith %}
{% endblock %}