src/egonomy/templates/partial/item_in_collection_list.html
changeset 268 f5dba584d140
parent 252 b7486a56ad7d
--- a/src/egonomy/templates/partial/item_in_collection_list.html	Fri Mar 14 16:27:58 2014 +0100
+++ b/src/egonomy/templates/partial/item_in_collection_list.html	Mon Mar 17 16:17:30 2014 +0100
@@ -1,6 +1,7 @@
 {% load static %}
 {% load i18n %}
 {% load thumbnail %}
+{% load absurl %}
 {% ifequal item.content_type.model "fragment" %}
   <li class="clearfix horizontal item-masonry">
       {% with fragment=item.content_object %}
@@ -18,8 +19,8 @@
           </a>
           <div class="tools toggle">
               <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 'view_fragment' fragment_pk=fragment.pk %}" title="{% trans 'Share on Twitter'%}"></a></li>
+                  <li><a class="tool facebook" target="_blank" href="https://www.facebook.com/sharer/sharer.php?u={% absurl 'view_fragment' fragment_pk=fragment.pk %}" title="{% trans 'Share on Facebook'%}"></a></li>
                   <li>{% if user.is_authenticated %}
                       <a class="tool plus open-popin additemtocollection" data-type="fragment" data-id="{{ fragment.pk }}" href="#add-to-collection" title="{% trans 'Add to a collection' %}"></a>
                     {% else %}
@@ -79,8 +80,8 @@
   {% endif %}
           <div class="tools toggle">
               <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>
                   <li>{% if user.is_authenticated %}
                       <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>
                     {% else %}