summaryrefslogtreecommitdiffstats
path: root/askbot/skins/default/templates/user_stats.html
blob: 6c96d94d9f8dea9d871072d0835a157a797a8220 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
{% extends "user.html" %}
<!-- user_stats.html -->
    {% block usercontent %}
        {% include "user_info.html" %}
        <a name="questions"></a>
        {% spaceless %}
            <h2>{% trans counter=questions|length %}<span class="count">{{counter}}</span> Question{% pluralize %}<span class="count">{{counter}}</span> Questions{% endtrans %}</h2>
        {% endspaceless %}
    {% include "users_questions.html" %}
        <a name="answers"></a>
        {% spaceless %}
            <h2 style="clear:both;">{% trans counter=answered_questions|length %}<span class="count">{{counter}}</span> Answer{% pluralize %}<span class="count">{{counter}}</span> Answers{% endtrans %}</h2>
        {% endspaceless %}
        <div class="user-stats-table">
            {% for answered_question in answered_questions %}
            <div class="answer-summary">
                <a title="{{answered_question.summary|collapse}}" 
                    href="{% url question answered_question.id %}{{answered_question.title|slugify}}#{{answered_question.answer_id}}">
                    <span class="answer-votes {% if answered_question.accepted %}answered-accepted{% endif %}" 
                          title="{% trans answer_score=answered_question.answer_score %}the answer has been voted for {{ answer_score }} times{% endtrans %} {% if answered_question.accepted %}{% trans %}this answer has been selected as correct{% endtrans %}{%endif%}">
                        {{ answered_question.answer_score }}
                    </span>
                </a>
                <div class="answer-link">
                    {% spaceless %}
                    <a href="{% url question answered_question.id %}{{answered_question.title|slugify}}#{{answered_question.answer_id}}">{{answered_question.title}}</a> 
                    {% endspaceless %}
                    {% if answered_question.comment_count %}
                    <span>
                        {% trans comment_count=answered_question.comment_count %}({{comment_count}} comment){% pluralize %}the answer has been commented {{comment_count}} times{% endtrans %}
                    </span> 
                    {% endif %}
                </div>
            </div>
            {% endfor %}
        </div>
        <br/>
        <a name="votes"></a>
        {% spaceless %}
            <h2>{% trans cnt=total_votes %}<span class="count">{{cnt}}</span> Vote{% pluralize %}<span class="count">{{cnt}}</span> Votes {% endtrans %}</h2>
        {% endspaceless %}
        <div class="user-stats-table">
            <table>
                <tr>
                    <td width="60">
                        <img style="cursor: default;" src="{{"/images/vote-arrow-up-on.png"|media}}" alt="{% trans %}thumb up{% endtrans %}" />
                            <span title="{% trans %}user has voted up this many times{% endtrans %}" class="vote-count">{{up_votes}}</span>
                    </td>
                    <td width="60">
                        <img style="cursor: default;" src="{{"/images/vote-arrow-down-on.png"|media}}" alt="{% trans %}thumb down{% endtrans %}" />
                            <span title="{% trans %}user voted down this many times{% endtrans %}" class="vote-count">{{down_votes}}</span>

                    </td>
                </tr>
            </table>
        </div>
        <a name="tags"></a>
        {% spaceless %}
            <h2>{% trans counter=user_tags|length %}<span class="count">{{counter}}</span> Tag{% pluralize %}<span class="count">{{counter}}</span> Tags{% endtrans %}</h2>
        {% endspaceless %}
        <div class="user-stats-table">
            <table class="tags">
                <tr>
                    <td width="180" valign="top">
                        {% for tag in user_tags %}
                        <a rel="tag" 
                            title="{% trans tag_name=tag.name %}see other questions with {{view_user}}'s contributions tagged '{{ tag_name }}' {% endtrans %}" 
                            href="{% url questions %}?tags={{tag|urlencode}}&amp;author={{view_user.id}}&amp;start_over=true">{{tag.name}}</a>
                        <span class="tag-number">&#215; {{ tag.user_tag_usage_count|intcomma }}</span><br/>
                            {% if loop.index is divisibleby 10 %}
                                </td>
                                <td width="180"  valign="top">
                            {% endif %}
                        {% endfor %}
                    </td>
                </tr>
            </table>
        </div>
        <a name="badges"></a>
        {% spaceless %}
        <h2>{% trans counter=total_awards %}<span class="count">{{counter}}</span> Badge{% pluralize %}<span class="count">{{counter}}</span> Badges{% endtrans %}</h2>
        {% endspaceless %}
        <div class="user-stats-table">
            <table>
                <tr>
                    <td width="180" style="line-height:35px">
                        {% for badge in badges %}{# todo: translate badge name properly #}
                            <a href="{{badge.get_absolute_url()}}" title="{% trans description=badge.description %}{{description}}{% endtrans %}" class="medal"><span class="{{ badge.css_class }}">&#9679;</span>&nbsp;{% trans name=badge.name %}{{name}}{% endtrans %}</a><span class="tag-number"> &#215; {{ awarded_badge_counts[badge.id]|intcomma }}</span><br/>
                            {% if loop.index is divisibleby 3 %}
                                </td>
                                <td width="180" style="line-height:35px">
                            {% endif %}
                        {% endfor %}
                    </td>
                </tr>
            </table>
        </div>
{% endblock %}
<!-- end user_stats.html -->