X-Git-Url: https://git.openstreetmap.org./osqa.git/blobdiff_plain/0f2d00f9d7d5d28149707f66c719b28edfe51aed..162b4fd442c169a61d2f5b2b3bd613546c8472da:/forum/skins/default/templates/users/stats.html diff --git a/forum/skins/default/templates/users/stats.html b/forum/skins/default/templates/users/stats.html index 96a1f36..d3806d9 100644 --- a/forum/skins/default/templates/users/stats.html +++ b/forum/skins/default/templates/users/stats.html @@ -6,11 +6,21 @@ {% load humanize %} {% load question_list_tags %} {% block usercontent %} + + {% declare %} + question_count = questions.count() + show_more_questions_link = question_count > 15 + questions = questions[:15] + + answer_count = answers.count() + show_more_answers_link = answer_count > 30 + answers = answers[:30] + {% enddeclare %} {% spaceless %}

- {% blocktrans count questions|length as counter %} + {% blocktrans count question_count as counter %} 1 Question {% plural %} {{counter}} Questions @@ -21,12 +31,17 @@ {% for question in questions %} {% question_list_item question favorite_count=yes signature_type=badges %} {% endfor %} + {% if show_more_questions_link %} +
+ {% blocktrans with view_user.username as username %}View all questions by {{ username }}{% endblocktrans %} +
+ {% endif %}
{% spaceless %}

- {% blocktrans count answers|length as counter %} + {% blocktrans count answer_count as counter %} 1 Answer {% plural %} {{counter}} Answers @@ -38,29 +53,25 @@
- + {{ answer.score }}
{% endfor %} + {% if show_more_answers_link %} +
+ {% blocktrans with view_user.username as username %}View all questions answered by {{ username }}{% endblocktrans %} +
+ {% endif %} -
+
{% spaceless %}

@@ -129,8 +140,8 @@
- {% for award in awards %} -  {{ award.name }} × {{ award.count|intcomma }}
+ {% for award, count in awards %} +  {{ award.name }} × {{ count|intcomma }}
{% if forloop.counter|divisibleby:"6" %}