Improve "Messages sent" formatting on /activity.

(imported from commit 891760c116d5a3290b49fb2d75eae0f0b227540d)
This commit is contained in:
Steve Howell 2013-12-18 16:26:32 -05:00
parent ef959a748e
commit 5d85bfbf6b
2 changed files with 7 additions and 6 deletions

View File

@ -75,7 +75,7 @@ def get_realm_day_counts():
result = {}
for domain in counts:
cnts = [counts[domain].get(age, 0) for age in reversed(range(8))]
cnts = ','.join(map(str, cnts))
cnts = ''.join('<td>%s</td>' % (cnt,) for cnt in cnts)
result[domain] = dict(cnts=cnts)
return result

View File

@ -11,7 +11,7 @@
<th>Bots</th>
<th>Hours per user</th>
<th>Hours</th>
<th>Messages sent</th>
<th colspan=8>Messages sent</th>
</tr>
</thead>
@ -55,10 +55,11 @@
</td>
{# Messages sent #}
<td>
{{ row.history }}
</td>
{% if row.history %}
{{ row.history|safe }}
{% else %}
<td colspan=8></td>
{% endif %}
</tr>
{% endfor %}
</tbody>