{% extends "photos/base.html" %}
{% load thumbnail %}
{% load photos_extras %}


{% block title %}{{block.super}} - Photo{% endblock %}
{% block content %}

<h1>Photo from {{ object.user }}</h1>

{% if album %}
{% get_next album object as next %}
{% get_previous album object as prev %}
{% endif %}

{% if next %}
<a href="{% url photo-album-detail album.id next.id %}">Next</a><br />
{% endif %}

{% if prev %}
<a href="{% url photo-album-detail album.id prev.id %}">Prev</a><br />
{% endif %}


{% if next %}<a href="{% url photo-album-detail album.id next.id %}">{% endif %}<img src="{% thumbnail object.photo 900x900 quality=75 %}" />{% if next %}</a>{% endif %}

<ul>
<h3>Album of this photo:</h3>
{% for album in object.get_albums %}
<li><a href="{{ album.get_absolute_url }}">{{ album }}</a></li>
{% endfor %}
</ul>
{% endblock %}