{% extends "base.html" %}

{% block head %}
	{{ block.super }}
	<link rel="alternate" type="application/rss+xml" title="RSS" href="?rss" />
	<link rel="unapi-server" type="application/xml" title="unAPI" href="{% url 'publications.views.unapi' %}"/>
{% endblock %}

{% block content %}
	{% if publications %}
		<div class="special_links">
			<a href="?plain">Plain text</a>,
			<a href="?ris">RIS</a>,
			<a href="?bibtex">BibTex</a>
		</div>
		{% for type in types %}
			<h1>{{ type.description }}{% if forloop.first %} by {{ author }}{% endif %}</h1>
			<hr/>
			<div{% if not forloop.last %} style="margin-bottom: 30px;"{% endif %}>
				{% for publication in type.publications %}
					<div{% if not forloop.last %} style="margin-bottom: 20px;"{% endif %}>
						{% include "publications/publication.html" %}
					</div>
				{% endfor %}
			</div>
		{% endfor %}
	{% else %}
		No publications found for {{ author }}.
	{% endif %}
{% endblock %}
