trash icon to remove fragment
authorcavaliet
Wed, 19 Jun 2013 17:10:30 +0200
changeset 127 6d975009b57a
parent 126 b844bdfb8bc2
child 129 57d5dd58202e
trash icon to remove fragment
src/egonomy/static/egonomy/css/style.css
src/egonomy/templates/egonomy_all_fragments.html
src/egonomy/templates/partial/fragment_in_list.html
--- a/src/egonomy/static/egonomy/css/style.css	Wed Jun 19 16:19:01 2013 +0200
+++ b/src/egonomy/static/egonomy/css/style.css	Wed Jun 19 17:10:30 2013 +0200
@@ -194,25 +194,3 @@
 .highlight {
     background: #ffff80;
 }
-/* red cross on top right corner */
-.options_on_hover{
-    position: relative;
-}
-.options_on_hover:hover > a > .top_right_options{
-    display: block;
-}
-.top_right_options{
-    background-image: url("images/ui-icons_454545_256x240.png");
-    background-position: -34px -194px;
-    background-repeat: no-repeat;
-    cursor: pointer;
-    display: none;
-    height: 12px;
-    position: absolute;
-    right: -5px;
-    top: -5px;
-    width: 12px;
-}
-.top_right_options:hover{
-    background-image: url("images/ui-icons_cd0a0a_256x240.png");
-}
--- a/src/egonomy/templates/egonomy_all_fragments.html	Wed Jun 19 16:19:01 2013 +0200
+++ b/src/egonomy/templates/egonomy_all_fragments.html	Wed Jun 19 17:10:30 2013 +0200
@@ -30,7 +30,7 @@
             {% if nb_pages > 1 %}{% build_pagination nb_pages cur_page_nb url_pagination "" %}{% endif %}
             <ul class="list-projets-4 clearfix">
               {% for frg in results %}
-                <li class="subcol-fourth {% if user_fragments and username = user.username %}options_on_hover{% endif %}">
+                <li class="subcol-fourth">
                 {% include "partial/fragment_in_list.html" %}
                 </li>
               {% endfor %}
--- a/src/egonomy/templates/partial/fragment_in_list.html	Wed Jun 19 16:19:01 2013 +0200
+++ b/src/egonomy/templates/partial/fragment_in_list.html	Wed Jun 19 17:10:30 2013 +0200
@@ -13,7 +13,7 @@
 <div class="content">
     <a href="{% url 'view_fragment' fragment_pk=frg.pk %}"><h3>{{ frg.highlighted.title|first|safe|default:frg.title }}</h3></a>
     <p>{% trans "Fragment from" %} <a href="{% url 'annotate_picture' image_id=fragment.image.id %}">{{ fragment.image.metadata.titre|default:_("No title") }}</a>
-    <br/>{% trans "Annotated by" %} <strong><a href="{% url 'user_fragments' username=frg.author %}">{{ frg.author }}</a></strong></p>
+    <br/>{% trans "Annotated by" %} <a href="{% url 'user_fragments' username=frg.author %}"><strong>{{ frg.author }}</strong></a></p>
 </div>
 <div class="tools-2">
     <ul class="clearfix">
@@ -21,8 +21,9 @@
         <li><a class="tool facebook" href="#" title="{% trans 'Share on Facebook'%}"></a></li>
         <li><a class="tool plus" href="#" title="+"></a></li>
         <li><a class="tool cut" href="{% url 'create_fragment' image_id=fragment.image.id %}" title="{% trans 'Create a fragment'%}"></a></li>
+      {% if user_fragments and username = user.username %}
+        <li><a class="tool trash" href="{% url 'delete_fragment' %}?fragment_pk={{ frg.pk }}&next={% url 'user_fragments' user.username %}%3Fpage%3D{{ cur_page_nb }}" onclick="return confirm('{% trans "Do you really want to delete this fragment ? Warning : this action est irreversible." %}')" title="{% trans "Delete this fragment" %}"></a></li>
+      {% endif %}
     </ul>
 </div>
-{# en attendant la poubelle #}
-{% if user_fragments and username = user.username %}<a href="{% url 'delete_fragment' %}?fragment_pk={{ frg.pk }}&next={% url 'user_fragments' user.username %}%3Fpage%3D{{ cur_page_nb }}" onclick="return confirm('{% trans "Do you really want to delete this fragment ? Warning : this action est irreversible." %}')" title="{% trans "Delete this fragment" %}"><div class="top_right_options"></div></a>{% endif %}
 {% endwith %}
\ No newline at end of file