src/egonomy/templates/partial/image_in_list.html
changeset 268 f5dba584d140
parent 252 b7486a56ad7d
--- a/src/egonomy/templates/partial/image_in_list.html	Fri Mar 14 16:27:58 2014 +0100
+++ b/src/egonomy/templates/partial/image_in_list.html	Mon Mar 17 16:17:30 2014 +0100
@@ -1,6 +1,7 @@
 {% load static %}
 {% load i18n %}
 {% load thumbnail %}
+{% load absurl %}
 {# we suppose here that "img" has been defined #}
 <a draggable="true" data-title="{{ img.metadata.titre|default:_('No title') }}" data-description="{% trans 'Author' %} : {{ img.metadata.auteur|default:_('Not documented') }}"
    href="{% url 'annotate_picture' image_id=img.id %}{% if search %}?search={{ search }}&index_search={{ offset_search|add:forloop.counter0 }}&nb_results={{ nb_results }}{% endif %}">
@@ -32,8 +33,8 @@
 </a>
 <div class="tools-2">
     <ul class="clearfix">
-        <li><a class="tool twitter" href="#" title="{% trans 'Share on Twitter'%}"></a></li>
-        <li><a class="tool facebook" href="#" title="{% trans 'Share on Facebook'%}"></a></li>
+        <li><a class="tool twitter" target="_blank" href="https://twitter.com/share?url={% absurl 'annotate_picture' image_id=img.id %}" title="{% trans 'Share on Twitter'%}"></a></li>
+        <li><a class="tool facebook" target="_blank" href="https://www.facebook.com/sharer/sharer.php?u={% absurl 'annotate_picture' image_id=img.id %}" title="{% trans 'Share on Facebook'%}"></a></li>
       {% if user.is_authenticated %}
         <li><a class="tool plus open-popin additemtocollection" data-type="image" data-id="{{ img.id }}" href="#add-to-collection" title="{% trans 'Add to a collection'%}"></a></li>
       {% else %}