src/hdalab/templates/editorial/manage_renkans.html
changeset 331 306b95944074
parent 329 ea6268cf8c83
child 342 a0fa17c48236
--- a/src/hdalab/templates/editorial/manage_renkans.html	Fri Sep 05 17:05:48 2014 +0200
+++ b/src/hdalab/templates/editorial/manage_renkans.html	Mon Sep 08 13:03:36 2014 +0200
@@ -13,24 +13,26 @@
     <link rel="stylesheet" type="text/css" href="{% static 'hdalab/css/profile.css' %}" />
 {% endblock %}
 
-{% block js_import %}
-{{block.super}}
-    <script src="{% static 'hdalab/js/profile.js' %}"></script>
-    <script src="{% static 'hdalab/lib/jquery.tablesorter.min.js' %}"></script> 
-    <script type="text/javascript">
-    $(document).ready(function(){
-        $("#rk-table").tablesorter({headers: { 3: { sorter: false }, 5: { sorter: false } }}); 
-    });
-    </script>
-{% endblock %}
-
 {% block main_content %}
+    <p>{% if page.has_previous %}<a href="?page={{ page.previous_page_number }}&sort={{ sort_param }}&order={{ order_param }}" >{% trans 'Previous' %}</a>{% endif %}
+       {% if page.has_previous and page.has_next %} - {% endif %}{% if page.has_next %}<a href="?page={{ page.next_page_number }}&sort={{ sort_param }}&order={{ order_param }}">{% trans 'Next' %}</a>{% endif %}</p>
     <table id="rk-table">
       <thead>
-        <tr class="border_bottom"><th>Nom</th><th>Utilisateur</th><th>Date de modification</th><th>Preview</th><th>Statut</th><th>Actions</th></tr>
+        <tr class="border_bottom">
+          <th><a class="" href="?sort=title&order={% if sort_param == 'title' %}{{ opposite }}{% else %}asc{% endif %}">{% trans 'Title' %}</a>
+              {% if sort_param == 'title' %}<span class="ui-icon {% if opposite == 'asc' %}ui-icon-triangle-1-s{% else %}ui-icon-triangle-1-n{% endif %}"></span>{% endif %}</th>
+          <th><a href="?sort=user&order={% if sort_param == 'user' %}{{ opposite }}{% else %}desc{% endif %}">{% trans 'User' %}</a>
+              {% if sort_param == 'user' %}<span class="ui-icon {% if opposite == 'asc' %}ui-icon-triangle-1-s{% else %}ui-icon-triangle-1-n{% endif %}"></span>{% endif %}</th>
+          <th><a href="?sort=date&order={% if sort_param == 'date' %}{{ opposite }}{% else %}desc{% endif %}">{% trans 'Modification date' %}</a>
+              {% if sort_param == 'date' %}<span class="ui-icon {% if opposite == 'asc' %}ui-icon-triangle-1-s{% else %}ui-icon-triangle-1-n{% endif %}"></span>{% endif %}</th>
+          <th>{% trans 'Preview' %}</th>
+          <th><a href="?sort=state&order={% if sort_param == 'state' %}{{ opposite }}{% else %}asc{% endif %}">{% trans 'State' %}</a>
+              {% if sort_param == 'state' %}<span class="ui-icon {% if opposite == 'asc' %}ui-icon-triangle-1-s{% else %}ui-icon-triangle-1-n{% endif %}"></span>{% endif %}</th>
+          <th>{% trans 'Actions' %}</th>
+        </tr>
       </thead>
       <tbody>
-      {% for hr in renkan_list %}
+      {% for hr in page.object_list %}
        {% with hr.renkan as r %}
         <tr class="border_bottom">
             <td>{{ r.title }}</td>
@@ -49,4 +51,6 @@
       {% endfor %}
       </tbody>
     </table>
+    <p>{% if page.has_previous %}<a href="?page={{ page.previous_page_number }}&sort={{ sort_param }}&order={{ order_param }}" >{% trans 'Previous' %}</a>{% endif %}
+       {% if page.has_previous and page.has_next %} - {% endif %}{% if page.has_next %}<a href="?page={{ page.next_page_number }}&sort={{ sort_param }}&order={{ order_param }}">{% trans 'Next' %}</a>{% endif %}</p>
 {% endblock %}
\ No newline at end of file