X-Git-Url: https://git.openstreetmap.org./osqa.git/blobdiff_plain/133a8f939cdfa69dd6a7caeafed158aa38d20092..162b4fd442c169a61d2f5b2b3bd613546c8472da:/forum/skins/default/templates/users/stats.html?ds=sidebyside diff --git a/forum/skins/default/templates/users/stats.html b/forum/skins/default/templates/users/stats.html index 6381b59..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,8 +53,8 @@
- + {{ answer.score }} @@ -50,8 +65,13 @@
{% endfor %} + {% if show_more_answers_link %} +
+ {% blocktrans with view_user.username as username %}View all questions answered by {{ username }}{% endblocktrans %} +
+ {% endif %} -
+
{% spaceless %}

@@ -120,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" %}