# HG changeset patch # User ymh # Date 1320619550 -3600 # Node ID 85c7e5e965e244cbd06088d1de3d6c20b64d5bc6 # Parent 8551d844b4f331a6200f668dffc777211a0a4fb3# Parent 9eab3e86db7d37211af18ed8058cd8eb12317f5b Branch merge diff -r 8551d844b4f3 -r 85c7e5e965e2 Controller/WikiTagController.php --- a/Controller/WikiTagController.php Sun Nov 06 23:44:37 2011 +0100 +++ b/Controller/WikiTagController.php Sun Nov 06 23:45:50 2011 +0100 @@ -596,16 +596,18 @@ $sort = "popd"; // sort by descendent popularity by default. $reverse_sort = "popa"; } - $sort_query = "t.popularity DESC t.normalizedLabel ASC t.label ASC"; + //$sort_query = "nb_docs DESC t.popularity DESC t.normalizedLabel ASC t.label ASC"; switch($sort){ case "popd": $qb->addOrderBy('t.popularity','DESC'); + $qb->addOrderBy('nb_docs','DESC'); $qb->addOrderBy('t.normalizedLabel','ASC'); $qb->addOrderBy('t.label','ASC'); $reverse_sort = "popa"; break; case "popa": $qb->addOrderBy('t.popularity','ASC'); + $qb->addOrderBy('nb_docs','DESC'); $qb->addOrderBy('t.normalizedLabel','ASC'); $qb->addOrderBy('t.label','ASC'); $reverse_sort = "popd"; @@ -619,6 +621,19 @@ $qb->addOrderBy('t.normalizedLabel','ASC'); $qb->addOrderBy('t.label','ASC'); $reverse_sort = "labd"; + case "nbd": + $qb->addOrderBy('nb_docs','DESC'); + $qb->addOrderBy('t.popularity','DESC'); + $qb->addOrderBy('t.normalizedLabel','ASC'); + $qb->addOrderBy('t.label','ASC'); + $reverse_sort = "nba"; + break; + case "nba": + $qb->addOrderBy('nb_docs','ASC'); + $qb->addOrderBy('t.popularity','DESC'); + $qb->addOrderBy('t.normalizedLabel','ASC'); + $qb->addOrderBy('t.label','ASC'); + $reverse_sort = "nbd"; break; } diff -r 8551d844b4f3 -r 85c7e5e965e2 Resources/views/WikiTag/TagListTable.html.twig --- a/Resources/views/WikiTag/TagListTable.html.twig Sun Nov 06 23:44:37 2011 +0100 +++ b/Resources/views/WikiTag/TagListTable.html.twig Sun Nov 06 23:45:50 2011 +0100 @@ -29,7 +29,28 @@ Catégorie Supprimer
le lien W Alias - Nb de
fiches + + {% if sort != "nba" and sort != "nbd" %} + {% if searched and searched != "" %} + Nb de
fiches
+ {% else %} + Nb de
fiches
+ {% endif %} + {% else %} + Nb de
fiches + {% if searched and searched != "" %} + + {% else %} + + {% endif %} + {% if sort == "nba" %} + + {% else %} + + {% endif %} + + {% endif %} + {% if sort != "popa" and sort != "popd" %} {% if searched and searched != "" %} @@ -45,9 +66,9 @@ {% endif %} {% if sort == "popa" %} - + {% else %} - + {% endif %} {% endif %}