Commit dfa03348 authored by Claude Paroz's avatar Claude Paroz

Clean up stats table header

parent 8aaaf133
......@@ -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();
......
......@@ -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 %}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment