{% load static %}
{% load i18n %}
{% load thumbnail %}
{# we suppose here that "img" has been defined #}
<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 "x225" 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="225" height="225" class="placeholder" />
{% endthumbnail %}
{% else %}
{% thumbnail image "225" 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=225" height="225" class="placeholder" />
{% endthumbnail %}
{% endif %}
{% else %}
<img src="{% static 'egonomy/img/empty.gif' %}" width=225" height="225" class="placeholder" />
{% endif %}
{% endwith %}
</div>
<div class="content">
<h3>{{ img.metadata.titre|default:_("No title") }}</h3>
<p>{% trans "Author" %} : <strong>{{ img.metadata.auteur|default:_("Not documented") }}</strong></p>
</div>
</a>
<div class="tools-2">
<ul class="clearfix">
<li><a class="tools-sprite twitter" href="#"></a></li>
<li><a class="tools-sprite facebook" href="#"></a></li>
<li><a class="tools-sprite plus" href="#"></a></li>
<li><a class="tools-sprite cut" href="{% url 'create_fragment' image_id=img.id %}"></a></li>
</ul>
</div>