{% load static %}
{% load i18n %}
{% load thumbnail %}
{% load absurl %}
{% load front_tags %}
        <div class="row">
          {% for i in image_results %}
            <div class="span2">
                <a data-url="{% url 'composer_image' branding=branding image_pk=i.pk %}"
                   data-title="{{ i.title }}"
                   data-description="{{ i.description }}" href="#">
                   {% thumbnail i.image_file "140x140" crop="center" format="PNG" as im %}<img src="{{ im.url }}" width="{{ im.width }}" height="{{ im.height }}" />{% empty %}<img src="{% static 'metadatacomposer/img/140x140.gif' %}" width="140px" height="140px" />{% endthumbnail %}
                <h5>{{ i.title }}</h5></a>
            </div>
          {% endfor %}
        </div>
        <div class="pagination">
            <ul>
            {% if image_results.has_previous %}
                <li><a href="{% url 'composer_image_page' branding=branding %}?page={{ image_results.previous_page_number }}&mode=library" class="image_pagination_library">{% trans "Previous" %}</a></li>
            {% else %}
               <li class="disabled"><a>{% trans "Previous" %}</a></li>
            {% endif %}
            {% if image_results.paginator.num_pages > 1 %}
             {% for i in image_results.paginator.num_pages|get_range %}
              {% if i|add:'1' == image_results.number %}
                <li class="active"><a href="#">{{i|add:'1'}}</a></li>
              {% else %}
                <li><a href="{% url 'composer_image_page' branding=branding %}?page={{i|add:'1'}}&mode=library" class="image_pagination_library">{{i|add:'1'}}</a></li>
              {% endif %}
             {% endfor %}
            {% endif %}
            {% if image_results.has_next %}
                <li><a href="{% url 'composer_image_page' branding=branding %}?page={{ image_results.next_page_number }}&mode=library" class="image_pagination_library">{% trans "Next" %}</a></li>
            {% else %}
               <li class="disabled"><a>{% trans "Next" %}</a></li>
            {% endif %}
            {% if image_results.paginator.num_pages > 1 %}
                <li><a href="{% url 'composer_image_page' branding=branding %}?page=x&mode=library" class="image_pagination_library">({% trans "All" %})</a></li>
            {% endif %}
            </ul>
        </div>