src/hdalab/templates/profile_home.html
changeset 299 8e00641076e7
parent 298 8234cb238783
child 300 108fd2717177
--- a/src/hdalab/templates/profile_home.html	Fri Jul 18 13:29:53 2014 +0200
+++ b/src/hdalab/templates/profile_home.html	Mon Jul 21 16:07:00 2014 +0200
@@ -21,19 +21,22 @@
     <h2>Votre profil</h2>
     <p>Vos renkans : </p>
     <table>
-        <tr class="border_bottom"><th>Nom</th><th>Date de modification</th><th>Preview</th><th>Actions</th></tr>
-      {% for r in renkan_list %}
+        <tr class="border_bottom"><th>Nom</th><th>Date de modification</th><th>Preview</th><th>Statut</th><th>Actions</th></tr>
+      {% for hr in renkan_list %}
+       {% with hr.renkan as r %}
         <tr class="border_bottom">
             <td>{{ r.title }} ({{ r.id }})</td>
             <td>{{ r.modification_date|date:"Y-m-d H:i" }}</td>
             <td>{% thumbnail r.image 100x100 as thumb %}<img src="{{ thumb.url }}" width="{{ thumb.width }}" height="{{ thumb.height }}" /></td>
+            <td>{{ hr.state }}</td>
             <td>
                 <a title="Edit renkan" href="{% url 'renkan_edit' %}?rk_id={{ r.rk_id }}" class="renkan-basic-action"><span class="ui-icon ui-icon-pencil"></span></a>
                 <a title="View renkan" href="{% url 'renkan_view' %}?rk_id={{ r.rk_id }}" class="renkan-basic-action"><span class="ui-icon ui-icon-eye"></span></a>
-                <a title="Copy renkan" href="{% url 'renkan_copy' rk_id=r.rk_id %}" class="renkan-basic-action" onclick="return confirm('{% trans "Are you sure you want to copy this renkan ?" %}');" ><span class="ui-icon ui-icon-copy"></span></a>
-                <a title="Remove renkan" href="{% url 'renkan_delete' rk_id=r.rk_id %}" class="renkan-basic-action" onclick="return confirm('{% trans "Are you sure you want to delete this renkan ? You cannot undo this action." %}');" ><span class="ui-icon ui-icon-trash"></span></a>
+                <a title="Copy renkan" href="{% url 'renkan_copy' rk_id=r.rk_id %}?next={% url 'profile_home' %}" class="renkan-basic-action" onclick="return confirm('{% trans "Are you sure you want to copy this renkan ?" %}');" ><span class="ui-icon ui-icon-copy"></span></a>
+                <a title="Remove renkan" href="{% url 'renkan_delete' rk_id=r.rk_id %}?next={% url 'profile_home' %}" class="renkan-basic-action" onclick="return confirm('{% trans "Are you sure you want to delete this renkan ? You cannot undo this action." %}');" ><span class="ui-icon ui-icon-trash"></span></a>
             </td>
         </tr>
+       {% endwith %}
       {% endfor %}
     </table>
     <p>Gestion du mot de passe : <a href="{% url 'auth_password_change' %}">modification</a></p>