# HG changeset patch # User cavaliet # Date 1310118925 -7200 # Node ID 579ac2e2789ac2ee6d2f14108a7a90c154412546 # Parent c86fa4a358d73117233706927a1810925301ed22 Add alphabetical sort on tag list. diff -r c86fa4a358d7 -r 579ac2e2789a web/hdabo/static/hdabo/js/hdabo.js --- a/web/hdabo/static/hdabo/js/hdabo.js Fri Jul 08 03:23:20 2011 +0200 +++ b/web/hdabo/static/hdabo/js/hdabo.js Fri Jul 08 11:55:25 2011 +0200 @@ -35,6 +35,7 @@ datasheet_id:$('#datasheet_id').val(), num_page:$('#num_page').val(), nb_by_page:$('#nb_by_page').val(), + alpha:$('#alpha').val(), searched:$('#searched_str').val() }, callback : function(value, settings) { @@ -90,6 +91,7 @@ datasheet_id:$('#datasheet_id').val(), num_page:$('#num_page').val(), nb_by_page:$('#nb_by_page').val(), + alpha:$('#alpha').val(), searched:$('#searched_str').val() }, callback : function(value, settings) { @@ -111,6 +113,7 @@ datasheet_id:$('#datasheet_id').val(), num_page:$('#num_page').val(), nb_by_page:$('#nb_by_page').val(), + alpha:$('#alpha').val(), searched:$('#searched_str').val() }, callback : function(value, settings) { @@ -245,6 +248,7 @@ datasheet_id:$('#datasheet_id').val(), num_page:$('#num_page').val(), nb_by_page:$('#nb_by_page').val(), + alpha:$('#alpha').val(), searched:$('#searched_str').val(), tag_id:id_tag, activated:new_checked diff -r c86fa4a358d7 -r 579ac2e2789a web/hdabo/templates/all_tags.html --- a/web/hdabo/templates/all_tags.html Fri Jul 08 03:23:20 2011 +0200 +++ b/web/hdabo/templates/all_tags.html Fri Jul 08 11:55:25 2011 +0200 @@ -56,45 +56,46 @@ {% csrf_token %}
Chercher : {% for s in search_def %} - {{s.0}} + {{s.0}} {% endfor %}
Tags {{ current_page.start_index }} à {{ current_page.end_index }} sur {{ nb_total }}
+| id | -label | ++ {% if alpha != "true" and alpha != "1" %} + {% if searched and searched != "" %} + label + {% else %} + label + {% endif %} + {% else %}label{% endif %} + | {% comment %}original_label | {% endcomment %}Lien W | Lien D | @@ -9,7 +17,15 @@Supprimer le lien W |
Alias | Nb de fiches |
- Popularité | + {% if alpha == "true" or alpha == "1" %} + {% if searched and searched != "" %} + Popularité + {% else %} + Popularité + {% endif %} + {% else %}Popularité{% endif %} + | {% for tag in tags %}
|---|---|---|---|---|---|---|---|---|---|
| {{tag.id}} | diff -r c86fa4a358d7 -r 579ac2e2789a web/hdabo/urls.py --- a/web/hdabo/urls.py Fri Jul 08 03:23:20 2011 +0200 +++ b/web/hdabo/urls.py Fri Jul 08 11:55:25 2011 +0200 @@ -36,7 +36,8 @@ url(r'^alltags$', 'hdabo.views.all_tags'), url(r'^alltags/(?P