[damned-lies] Clean up stats table header



commit dfa0334869a4564961add1b2bf37ae21181dd092
Author: Claude Paroz <claude 2xlibre net>
Date:   Sat May 14 18:28:39 2011 +0200

    Clean up stats table header

 templates/languages/language_release.html       |    2 +-
 templates/languages/language_release_stats.html |   14 ++++++--------
 2 files changed, 7 insertions(+), 9 deletions(-)
---
diff --git a/templates/languages/language_release.html b/templates/languages/language_release.html
index db4fed4..8f65811 100644
--- a/templates/languages/language_release.html
+++ b/templates/languages/language_release.html
@@ -7,7 +7,7 @@
 <script type="text/javascript">
 $(document).ready(function() 
     { 
-        $("#stats-table").tablesorter({headers: {3:{sorter: false}}});
+        $("#stats-table").tablesorter();
         $("#stats-table").bind("sortStart",function() { 
             /* Hide category subheaders when sorting */
             $("tr.subheader").hide(); 
diff --git a/templates/languages/language_release_stats.html b/templates/languages/language_release_stats.html
index fc44c44..3ea1bb5 100644
--- a/templates/languages/language_release_stats.html
+++ b/templates/languages/language_release_stats.html
@@ -18,8 +18,10 @@
 
 <table class="tablesorter" name="stats-table" id="stats-table">
 <thead>
-  <tr><th>{% trans "Module" %}</th><th>{% trans "Branch" %}&nbsp;&nbsp;&nbsp;</th><th >{% trans "Statistics" %}</th>
-      <th></th><th>{% trans "Status" %}&nbsp;&nbsp;&nbsp;</th><th>{% trans "Date" %}&nbsp;&nbsp;&nbsp;</th></tr>
+  <tr><th>{% trans "Module" %}</th><th>{% trans "Branch" %}</th>
+      <th colspan="2">{% trans "Statistics" %}</th>
+      <th>{% trans "Status" %}</th><th>{% trans "Date" %}</th>
+  </tr>
 </thead>
 <tbody>
  {# empty line to not disturb tablesorter if 1st line is a colspan #}
@@ -27,11 +29,9 @@
 {% for catname,categ in modstats.categs.items %}
   {% if catname != "default" %}
     <tr class="subheader"><td colspan="6" class="leftcell" style="font-weight: bold; padding-top:1em;">
-     {% with categ.cattransperc as percentage %}
-     {% with categ.catname as categname %}
+     {% with categ.cattransperc as percentage and categ.catname as categname %}
      {% blocktrans %}{{ categname }} ({{ percentage }}% translated){% endblocktrans %}
      {% endwith %}
-     {% endwith %}
     </td></tr>
   {% endif %}
 
@@ -39,8 +39,7 @@
     {% with module.0 as modname %}
     {% for branch, doms in module.1.items %}
      {% for dom in doms %}
-      {% with dom.0 as domname %}
-      {% with dom.1 as stat %}
+      {% with dom.0 as domname and dom.1 as stat %}
       {% if stat and not stat.is_fake %}
         {% if stat.tr_percentage == 100 %}
           <tr id="{{ modname }}-{{ stat.domain.id }}-complete">
@@ -87,7 +86,6 @@
         </tr>
       {% endif %}
       {% endwith %}
-      {% endwith %}
      {% endfor %}
     {% endfor %}
     {% endwith %}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]