]> git.openstreetmap.org Git - osqa.git/blob - forum/skins/default/templates/users/stats.html
convertd comments to nodes
[osqa.git] / forum / skins / default / templates / users / stats.html
1 {% extends "user.html" %}
2 <!-- user_stats.html -->
3 {% load i18n %}
4 {% load extra_tags %}
5 {% load extra_filters %}
6 {% load humanize %}
7 {% load question_list_tags %}
8                 {% block usercontent %}
9         
10         <a name="questions"></a>
11         {% spaceless %}
12             <h2>
13                 {% blocktrans count questions|length as counter %}
14                 <span class="count">1</span> Question
15                 {% plural %}
16                 <span class="count">{{counter}}</span> Questions
17                 {% endblocktrans %}
18             </h2>
19         {% endspaceless %}
20                 <div class="user-stats-table">
21                     {% for question in questions %}
22                         {% question_list_item question favorite_count=yes signature_type=badges %}
23                     {% endfor %}
24                 </div>
25                 <br clear="all"/>
26         <a name="answers"></a>
27         {% spaceless %}
28             <h2>
29                 {% blocktrans count answers|length as counter %}
30                 <span class="count">1</span> Answer
31                 {% plural %}
32                 <span class="count">{{counter}}</span> Answers
33                 {% endblocktrans %}
34             </h2>
35         {% endspaceless %}
36         <div class="user-stats-table">
37             {% for answer in answers %}
38             <div class="answer-summary">
39                 <a title="{{answer.question.title}}"
40                     href="{{ answer.get_absolute_url }}">
41                     <span class="{% if answer.accepted %}answered-accepted {% endif %} answer-votes" 
42                                                 title="{% blocktrans with answer.score as vote_count %}the answer has been voted for {{ vote_count }} times{% endblocktrans %} {% if answer.accepted %}{% trans "this answer has been selected as correct" %}{%endif%}">
43                         {{ answer.score }}
44                     </span>
45                 </a>
46                 <div class="answer-link">
47                     {% spaceless %}
48                     <a href="{{ answer.get_absolute_url }}">{{answer.headline}}</a>
49                     {% endspaceless %}
50                 </div>
51             </div>
52             {% endfor %}
53         </div>
54         <br/>
55         <a name="votes"></a>
56         {% spaceless %}
57             <h2>
58                 {% blocktrans count total_votes as cnt %}
59                     <span class="count">1</span> Vote
60                 {% plural %}
61                     <span class="count">{{cnt}}</span> Votes
62                 {% endblocktrans %}
63             </h2>
64         {% endspaceless %}
65         <div class="user-stats-table">
66             <table>
67                 <tr>
68                     <td width="60">
69                         <img style="cursor: default;" src="{% media  "/media/images/vote-arrow-up-on.png" %}" alt="{% trans "thumb up" %}" />
70                             <span title="{% trans "user has voted up this many times" %}" class="vote-count">{{up_votes}}</span>
71
72                     </td>
73                     <td width="60">
74                         <img style="cursor: default;" src="{% media  "/media/images/vote-arrow-down-on.png" %}" alt="{% trans "thumb down" %}" />
75                             <span title="{% trans "user voted down this many times" %}" class="vote-count">{{down_votes}}</span>
76
77                     </td>
78                 </tr>
79             </table>
80         </div>
81         <a name="tags"></a>
82         {% spaceless %}
83             <h2>
84                 {% blocktrans count user_tags|length as counter %}
85                     <span class="count">1</span> Tag
86                 {% plural %}
87                     <span class="count">{{counter}}</span> Tags
88                 {% endblocktrans %}
89             </h2>
90         {% endspaceless %}
91         <div class="user-stats-table">
92             <table class="tags">
93                 <tr>
94                     <td width="180" valign="top">
95                         {% for tag in user_tags%}
96                         <a rel="tag" 
97                                                         title="{% blocktrans with tag.name as tag_name %}see other questions with {{view_user}}'s contributions tagged '{{ tag_name }}' {% endblocktrans %}" 
98                                                         href="{% url tag_questions tag|urlencode %}?user={{view_user.username}}">{{tag.name}}</a>
99                         <span class="tag-number">&#215; {{ tag.user_tag_usage_count|intcomma }}</span><br/>
100                             {% if forloop.counter|divisibleby:"10" %}
101                                 </td>
102                                 <td width="180"  valign="top">
103                             {% endif %}
104                         {% endfor %}
105                     </td>
106                 </tr>
107             </table>
108         </div>
109         <a name="badges"></a>
110         {% spaceless %}
111         <h2>
112             {% blocktrans count total_awards as counter %}
113             <span class="count">1</span> Badge
114             {% plural %}
115             <span class="count">{{counter}}</span> Badges
116             {% endblocktrans %}
117         </h2>
118         {% endspaceless %}
119         <div class="user-stats-table">
120             <table>
121                 <tr>
122                     <td width="180" style="line-height:35px">
123                         {% for award in awards %}
124                             <a href="{% url badges %}{{award.id}}/{{award.name}}" title="{{ award.description }}" class="medal"><span class="badge{{ award.type }}">&#9679;</span>&nbsp;{{ award.name }}</a><span class="tag-number"> &#215; {{ award.count|intcomma }}</span><br/>
125                             {% if forloop.counter|divisibleby:"6" %}
126                                 </td>
127                                 <td width="180" style="line-height:35px">
128                             {% endif %}
129                         {% endfor %}
130                     </td>
131                 </tr>
132             </table>
133         </div>
134 {% endblock %}
135 <!-- end user_stats.html -->