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


{% block title %}{{ object.title }}{% endblock %}

{% block content %}

<div class="row">
    <div class="col-lg-12">
        <h1>{{ object.title }}</h1>
        <p class="text-muted small">{{ object.date_added | date:"F d, Y"}}</p>
    </div>
</div>

<div class="row">
    <div class="col-md-6">
        {% if object.caption %}<p>{{ object.caption|safe }}</p>{% endif %}
        <img src="{{ object.src.url }}" class="img-thumbnail" alt="{{ object.title }}">
    </div>
    <div class="col-md-6">
        {% if object.albums %}
        <table>
            {% for album in object.albums.all %}
            <tr>
                <td>{% previous_in_album object album %}</td>
                <td class="text-center"><a href="{{ album.get_absolute_url }}">{{ album.title }}</a></td>
                <td>{% next_in_album object album %}</td>
            </tr>
            {% endfor %}
        </table>
        {% endif %}
    </div>
</div>

{% endblock %}
