{% load endless i18n admin_static images_tags %}
<div class="container-fluid">
      <div class="row-fluid">
      <div class="span12">
        <h2 class="title-images">{% trans 'Images' %}</h2>
        <form class="form-inline search-images" method="get" action=".">
          <div class="span3">
            <label for="id_user">{% trans 'User' %}:</label>
            <select id="id_user" name="user" class="input-medium">
              <option value="">----</option>
              {% for user in users%}
              <option {% if user_id == user.id %}selected{% endif %} value="{{ user.id }}">{{ user.email }}</option>
              {% endfor %}
            </select>
          </div>
          <div class="span2">
            <label for="id_published">{% trans 'Published' %}:</label>
            <select id="id_published" name="published" class="input-medium">
              <option value="">----</option>
              <option {% if published == "1" %}selected{% endif %} value="1">Sim</option>
              <option {% if published == "0" %}selected{% endif %}value="0">Não</option>
            </select>
          </div>
          <div class="span3">
          	<label for="q">{% trans 'Text' %}:</label>
            <input id="text-search" type="text" class="input-medium" name="q" />
          </div>
          <div class="span2">
          <label></label>
            <button type="submit" class="btn span12 btn-search">{% trans 'Search' %}</button>
          </div>
          <a id="addNewImage" class="btn btn-warning pull-right span2" href="{% url 'image_add' %}"><i class="icon-picture"></i>{% trans 'Add Image' %}</a>
        </form>
      </div>
      <div class="row-fluid">
        {% paginate 20 images %}
        <ul class="thumbnails">
          {% for image in images %}
          <li class="span3 text-center">
            <div class="thumbnail">
              <a class="add-link-image" href="{% image_url image.get_absolute_url %}">
              	<img src="{% image_url image.get_absolute_url width=80 height=80 %}" />
              </a>
              <div class="caption">
                <a class="add-link-image" href="{% image_url image.get_absolute_url %}">
                	<p><b>{{ image.title }}</b></p>
                </a>
              </div>
            </div>
          </li>
          {% if forloop.counter|divisibleby:"4" and not forloop.last %}</ul><ul class="thumbnails">{% endif %}
          {% endfor %}
        </ul>
      </div>
      {% show_pages %}
      </div>
    </div>