forked from rc/aircox
95 lines
2.6 KiB
HTML
95 lines
2.6 KiB
HTML
{% extends "cms/base_site.html" %}
|
|
{% load i18n %}
|
|
{% load wagtailcore_tags %}
|
|
{% load wagtailimages_tags %}
|
|
|
|
{% block content %}
|
|
{% if object_list %}
|
|
{# list view #}
|
|
<div class="body summary">
|
|
{{ page.summary }}
|
|
<a href="?" class="go_back">{% trans "Go back to the publication" %}</a>
|
|
</div>
|
|
|
|
{% with list_paginator=paginator %}
|
|
{% include "cms/snippets/list.html" %}
|
|
{% endwith %}
|
|
{% else %}
|
|
{# detail view #}
|
|
<div class="content">
|
|
{% if page.cover %}
|
|
<img class="cover" src="{{ page.cover.file.url }}">
|
|
{% endif %}
|
|
<div class="body">
|
|
{{ page.body|richtext}}
|
|
</div>
|
|
|
|
{% block content_extras %}
|
|
{% endblock %}
|
|
|
|
{% if page.related_links.all %}
|
|
<ul class="related">
|
|
<h3>{% trans "Related links" %}</h3>
|
|
{% for link in page.related_links.all %}
|
|
<li>
|
|
<a href="{{ link.url }}">
|
|
{% if link.icon %}{% image link.icon fill-size-32x32 %}{% endif %}
|
|
{{ link.title|default:link.url }}
|
|
</a>
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
{% endif %}
|
|
|
|
<div class="comments">
|
|
{% include "cms/snippets/comments.html" %}
|
|
</div>
|
|
</div>
|
|
|
|
{% block page_nav %}
|
|
<nav class="page_nav">
|
|
{% block metadata %}
|
|
<div class="meta">
|
|
<div class="author">
|
|
{% if page.publish_as %}
|
|
{% with page.publish_as as item %}
|
|
{% include "cms/snippets/list_item.html" %}
|
|
{% endwith %}
|
|
{% else %}
|
|
{{ page.owner|default:'' }}
|
|
{% endif %}
|
|
</div>
|
|
<time datetime="{{ page.specific.date }}">
|
|
{% trans "Published on " %}
|
|
{{ page.specific.date|date:'l d F, H:i' }}
|
|
</time>
|
|
|
|
<div class="tags">
|
|
{% for tag in page.tags.all %}
|
|
{# <a href="{% pageurl page.blog_index %}?tag={{ tag }}">{{ tag }}</a> #}
|
|
{{ tag }}
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|
|
|
|
{% block page_nav_extras %}
|
|
{% endblock %}
|
|
|
|
{% if page.recents %}
|
|
<div>
|
|
<h2>{% trans "Last Publications" %}</h2>
|
|
{% with object_list=page.recents %}
|
|
{% include "cms/snippets/list.html" %}
|
|
{% endwith %}
|
|
{# TODO: url to complete list of publications #}
|
|
</div>
|
|
{% endif %}
|
|
</nav>
|
|
{% endblock %}
|
|
{% endif %}
|
|
{% endblock %}
|
|
|
|
|
|
|