1 {% extends "user.html" %}
2 <!-- user_stats.html -->
5 {% load extra_filters %}
7 {% load question_list_tags %}
8 {% block usercontent %}
11 question_count = questions.count()
12 show_more_questions_link = question_count > 15
13 questions = questions[:15]
15 answer_count = answers.count()
16 show_more_answers_link = answer_count > 30
17 answers = answers[:30]
20 <a name="questions"></a>
23 {% blocktrans count question_count as counter %}
24 <span class="count">1</span> Question
26 <span class="count">{{counter}}</span> Questions
30 <div class="user-stats-table">
31 {% for question in questions %}
32 {% question_list_item question favorite_count=yes signature_type=badges %}
34 {% if show_more_questions_link %}
35 <div class="short-summary" style="text-align: right">
36 <a href="{{ view_user.get_asked_url }}">{% blocktrans with view_user.username as username %}View all questions by {{ username }}{% endblocktrans %}</a>
41 <a name="answers"></a>
44 {% blocktrans count answer_count as counter %}
45 <span class="count">1</span> Answer
47 <span class="count">{{counter}}</span> Answers
51 <div class="user-stats-table">
52 {% for answer in answers %}
53 <div class="answer-summary">
54 <a title="{{answer.question.title}}"
55 href="{{ answer.get_absolute_url }}">
56 <span class="{% if answer.nis.accepted %}answered-accepted {% endif %} answer-votes"
57 title="{% blocktrans with answer.score as vote_count %}the answer has been voted for {{ vote_count }} times{% endblocktrans %} {% if answer.nis.accepted %}{% trans "this answer has been selected as correct" %}{%endif%}">
61 <div class="answer-link">
63 <a href="{{ answer.get_absolute_url }}">{{answer.headline}}</a>
68 {% if show_more_answers_link %}
69 <div class="short-summary" style="text-align: right">
70 <a href="{{ view_user.get_answered_url }}">{% blocktrans with view_user.username as username %}View all questions answered by {{ username }}{% endblocktrans %}</a>
78 {% blocktrans count total_votes as cnt %}
79 <span class="count">1</span> Vote
81 <span class="count">{{cnt}}</span> Votes
85 <div class="user-stats-table">
89 <img style="cursor: default;" src="{% media "/media/images/vote-arrow-up-on.png" %}" alt="{% trans "thumb up" %}" />
90 <span title="{% trans "user has voted up this many times" %}" class="vote-count">{{up_votes}}</span>
94 <img style="cursor: default;" src="{% media "/media/images/vote-arrow-down-on.png" %}" alt="{% trans "thumb down" %}" />
95 <span title="{% trans "user voted down this many times" %}" class="vote-count">{{down_votes}}</span>
104 {% blocktrans count user_tags|length as counter %}
105 <span class="count">1</span> Tag
107 <span class="count">{{counter}}</span> Tags
111 <div class="user-stats-table">
114 <td width="180" valign="top">
115 {% for tag in user_tags%}
117 title="{% blocktrans with tag.name as tag_name %}see other questions with {{view_user}}'s contributions tagged '{{ tag_name }}' {% endblocktrans %}"
118 href="{% url tag_questions tag|urlencode %}?user={{view_user.username}}">{{tag.name}}</a>
119 <span class="tag-number">× {{ tag.user_tag_usage_count|intcomma }}</span><br/>
120 {% if forloop.counter|divisibleby:"10" %}
122 <td width="180" valign="top">
129 <a name="badges"></a>
132 {% blocktrans count total_awards as counter %}
133 <span class="count">1</span> Badge
135 <span class="count">{{counter}}</span> Badges
139 <div class="user-stats-table">
142 <td width="180" style="line-height:35px">
143 {% for award, count in awards %}
144 <a href="{% url badges %}{{award.id}}/{{award.name}}" title="{{ award.description }}" class="medal"><span class="badge{{ award.type }}">●</span> {{ award.name }}</a><span class="tag-number"> × {{ count|intcomma }}</span><br/>
145 {% if forloop.counter|divisibleby:"6" %}
147 <td width="180" style="line-height:35px">
155 <!-- end user_stats.html -->