X-Git-Url: https://git.openstreetmap.org./osqa.git/blobdiff_plain/410bfa05ee36ed1d99356c443a5f3f6aa3ee9578..6b22f44c53cf0d72a7b2b068f51cae01e1129e23:/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 adc6e12..35c344a 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 %}