{% extends "base.html" %}
{% load i18n %}
{% load static %}

{% block extrahead %}
<link rel="stylesheet" type="text/css" href="{% static 'css/gallery.css' %}">
{% endblock %}

{% block title %}{{ block.super }} - {{ album.display_name }} - {{ album.date }}{% endblock %}

{% block content %}
<h1>{{ album.display_name }} - {{ album.date }}</h1>
<div class="photo_nav">
{# next_album has the "previous" class and vice-versa because album ordering is reversed #}
{% if next_album %}
<a href="{{ next_album.get_absolute_url }}" class="previous">{{ next_album.display_name }}</a>
{% endif %}
<a href="{% url 'gallery:year' album.date.year %}" class="up">{{ album.date.year }}</a>
{% if previous_album %}
<a href="{{ previous_album.get_absolute_url }}" class="next">{{ previous_album.display_name }}</a>
{% endif %}
</div>

{% spaceless %}
<div class="photo_list">
{% for photo in photos %}
<a href="{{ photo.get_absolute_url }}"><img src="{% url 'gallery:photo-resized' preset='thumb' pk=photo.pk %}" width="128" height="128" alt="{{ photo }}"></a>
{% empty %}
<p>{% trans "Sorry, you aren't authorized to view any photos in this album." %}</p>
{% endfor %}
</div>
{% endspaceless %}

<div class="album_export">
<a href="{% url 'gallery:album-export' pk=album.pk %}">{% trans "Download album" %}</a>
</div>

{% endblock %}
