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

{% block base-content %}
    <div class="col-md-9">
        <article>
        <a href="{{ photo.get_next_photo.get_absolute_url }}">
                <img class="img-responsive" src="{{ photo.image.url }}" alt="{{ photo.title }}" />
            </a>
            <section>
                <h2>{% trans "Exif data" %}</h2>
                <table class="table table-condensed">
                    <thead>
                    </thead>
                    <tbody>
                    {% for key, value in photo.exif.items %}
                        <tr>
                            <th>{{ key }}</th>
                            <td><a href="{% url 'pgallery:exif_photo_list' exif_key=key exif_value=value %}">{{ value }}</a></td>
                        </tr>
                    {% endfor %}
                    </tbody>
                </table>
            </section>
        </article>
    </div>
    <div class="col-md-3">
        <section>
            <h2><a href="{{ photo.gallery.get_absolute_url }}">{{ photo.gallery.title }}</a></h2>
            {{ photo.title }}
            <div>
                {% trans "Tags" %}:
                {% for tag in photo.tags %}
                    <a href="{% url 'pgallery:tagged_photo_list' tag=tag %}" rel="tag">{{ tag }}</a>{% if not forloop.last %}, {% endif %}
                {% endfor %}
            </div>
        </section>
    </div>
{% endblock %}
