{% load i18n pagination_tags %}
{% spaceless %}
  {% if media_filters %}
  <div class="media-filters">
    <a {% if not media_filter %}class="active"{% endif %} href="{{media_url}}?page=1&media_filter=0">{% trans "All" %}</a>
    {% for mf in media_filters %}
      <a {% if media_filter == mf.id %}class="active" {% endif %}href="{{media_url}}?page=1&media_filter={{ mf.id }}">{{ mf.name }}</a>
    {% endfor %}
  </div>
  {% endif %}

  <div class="library-items library-images">
  {% autopaginate images 12 %}  
    {% for img in images %}
        <div class="library-image">
          <img class="library-thumbnail" src="{{ img.as_thumbnail.url }}" title="{{img.name}}" rel="{{img.get_absolute_url}}" />
          <div class="library-image-controls" style="">
            {{ img.name }}<br />
            <a href="{% url 'admin:coop_cms_image_change' img.id %}" target="_blank">{% trans "Edit" %}</a>
          </div>
        </div>
    {% endfor %}
    <div>
    {% paginate %}
    </div>
  </div>
{% endspaceless %}
