{% load i18n %}
<div class="row">
    <div class="album-detail-{{ album_instance.id }}">
        <h3>{{ album_instance.name }}</h3>
        {% if album_instance.description %}
            <p>{{ album_instance.description }}</p>
        {% endif %}
        
        <div class="album-grid-simple equal-heights">{% for ressource in album_instance.ressource_set.all %}
        {% spaceless %}
            <div class="large-3 columns item equalized-item{% if forloop.last %} end{% endif %}">
                {% if ressource.file_url %}
                    {% ifequal ressource.file_type 0 %}
                        <a href="{{ ressource.file_url }}" target="_blank">
                    {% else %}
                        <a href="{{ ressource.file_url }}">
                    {% endifequal %}
                {% else %}
                    <a href="{{ ressource.file.url }}" class="popup-link">
                {% endif %}
                
                {% if ressource.image %}
                    <img src="{% thumbnail ressource.image 105x105 crop %}" alt="">
                {% endif %}
                
                    <h4>{{ ressource.name }}</h4>
                </a>
                
                {% if ressource.description %}
                <div class="description">
                    <p>{{ ressource.description }}</p>
                </div>
                {% endif %}
            </div>
        {% endspaceless %}
        {% endfor %}</div>
    </div>
</div>
