{% load i18n thumbnail %}
<div class="album-detail-{{ album_object.id }}">
    <h3>{{ album_object.name }}</h3>
    {% if album_object.description %}
        <p>{{ album_object.description }}</p>
    {% endif %}
    
    <div class="album-grid-simple equal-heights">{% for ressource in ressource_list %}
    {% spaceless %}
        <div class="three columns item equalized-item">
            {% if ressource.file_url %}
                {% if ressource.get_file_kind == 'binary' %}
                    <a href="{{ ressource.file_url }}" target="_blank">
                {% else %}
                    <a href="{{ ressource.file_url }}">
                {% endif %}
            {% else %}
                <a href="{{ ressource.file.url }}" class="popup-link" target="_blank">
            {% endif %}

            {% if ressource.image %}
                {% version_object ressource.image 'thumbnail' as image_thumb %}
                <img src="{{ image_thumb.url }}" alt="">
            {% endif %}

                <h4>{{ ressource.name }}</h4>
            </a>

            {% if ressource.description %}
            <div class="description">
                <p>{{ ressource.description }}</p>
            </div>
            {% endif %}
        </div>
    {% endspaceless %}
    {% endfor %}</div>
</div>
