{% extends "egonomy_base.html" %}
{% load static %}
{% load i18n %}
{% load thumbnail %}
{% load navigation %}

{% block title %}{% trans "All pictures" %}{% endblock %}

{% block content %}
                <div class="fullwidth">
                    <div class="fullwidth">
                        <h2>{% trans "All pictures" %}</h2>
						{% if nb_pages %}<p>{% build_pagination nb_pages cur_page_nb "all_pictures" "contents_page clickable" %}</p>{% endif %}
                        <ul class="fullwidth">
                          {% for img in results %}
                            <li class="subcol_all">
                                <a href="{% url 'annotate_picture' image_id=img.id %}">
                                <div class="center-image">
                                 {% with img.info.image_file as image %}
                                 {% if image %}
                                  {% if image|is_portrait %}
							 	    {% thumbnail image "x110" format="PNG" crop="center" as im %}
	                                  <img src="{{ im.url }}" width="{{ im.width }}" height="{{ im.height }}"/>
	                                {% empty %}
	                                  <img src="{% static 'egonomy/img/empty.gif' %}" width="110" height="110" class="placeholder" />
	                                {% endthumbnail %}
	                              {% else %}
                                    {% thumbnail image "110" format="PNG" crop="center" as im %}
                                      <img src="{{ im.url }}" width="{{ im.width }}" height="{{ im.height }}"/>
                                    {% empty %}
                                      <img src="{% static 'egonomy/img/empty.gif' %}" width=110" height="110" class="placeholder" />
                                    {% endthumbnail %}
	                              {% endif %}
	                             {% else %}
	                                  <img src="{% static 'egonomy/img/empty.gif' %}" width=110" height="110" class="placeholder" />
	                             {% endif %}
	                             {% endwith %}
                                </div>
                                <h3>{{ img.metadata.titre }}</h3></a>
                                <p>{% trans "Annotated by" %} <strong>{{ img.metadata.auteur }}</strong></p>
                            </li>
                          {% endfor %}
                        </ul>
                        {% if nb_pages %}<p>{% build_pagination nb_pages cur_page_nb "all_pictures" "contents_page clickable" %}</p>{% endif %}
                    </div>
                </div>
{% endblock %}

