work on list

This commit is contained in:
bkfox
2016-07-22 16:20:04 +02:00
parent ee91ff76e7
commit eae1b9dca0
3 changed files with 218 additions and 137 deletions

View File

@ -8,15 +8,15 @@
{% block title %}
<h1>
{% if search_query %}
{% if list_selector.search_query %}
{% blocktrans %}Search in publications for <i>{{ search_query }}</i>{% endblocktrans %}
{% elif tag_query %}
{% elif list_selector.tag_query %}
{% blocktrans %}Search in publications for <i>{{ search_query }}</i>{% endblocktrans %}
{% elif thread_query %}
{% elif list_selector.filter_related %}
{# should never happen #}
{% with title=thread_query.title url=thread_query.url %}
{% with title=list_selector.filter_related.title url=list_selector.filter_related.url %}
{% blocktrans %}
Publications in <a href="{{ url }}">{{ title }}</a>{% endblocktrans %}
Related to <a href="{{ url }}">{{ title }}</a>{% endblocktrans %}
{% endwith %}
{% else %}
{% blocktrans %}All the publications{% endblocktrans %}
@ -26,18 +26,19 @@
{% block content %}
{% if thread_query %}
{% with related=list_selector.filter_related %}
{% if related %}
<div class="body summary">
{% image thread_query.cover fill-128x128 class="cover item_cover" %}
{{ thread_query.summary }}
<a href="{{ thread_query.url }}">{% trans "More about it" %}</a>
{% image related.cover fill-128x128 class="cover item_cover" %}
{{ related.summary }}
<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 "cms/snippets/list.html" %}

View File

@ -56,9 +56,9 @@
{{ page.owner }}
{% endif %}
</div>
<time datetime="{{ page.first_published_at }}">
<time datetime="{{ page.specific.date }}">
{% trans "Published on " %}
{{ page.first_published_at|date:'l d F, H:i' }}
{{ page.specific.date|date:'l d F, H:i' }}
</time>
<div class="tags">