remove old cms, switch to wagtail; move website to cms
This commit is contained in:
91
cms/templates/cms/publication.html
Normal file
91
cms/templates/cms/publication.html
Normal file
@ -0,0 +1,91 @@
|
||||
{% 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 }}
|
||||
</div>
|
||||
|
||||
{% with list_paginator=paginator %}
|
||||
{% include "cms/snippets/list.html" %}
|
||||
{% endwith %}
|
||||
{% else %}
|
||||
{# detail view #}
|
||||
<div class="content">
|
||||
<img class="cover" src="{{ page.cover.file.url }}">
|
||||
<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 }}
|
||||
{% endif %}
|
||||
</div>
|
||||
<time datetime="{{ page.first_published_at }}">
|
||||
{% trans "Published on " %}
|
||||
{{ page.first_published_at|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 %}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user