{% load i18n %}

{# Display a randomnly-selected set of photos from a given gallery #}

<div class="gallery-sample">

    <h2><a href="{{ gallery.get_absolute_url }}">{{ gallery.title }}</a></h2>
    <p class="text-muted small">{% trans "Published" %} {{ gallery.date_added }}</p>
    {% if gallery.description %}<p>{{ gallery.description|safe }}</p>{% endif %}

    {% for photo in gallery.sample %}
    <a href="{{ photo.get_absolute_url }}">
        <img src="{{ photo.get_thumbnail_url }}" class="img-thumbnail" alt="{{ photo.title }}">
    </a>
    {% endfor %}

</div>
