]> git.openstreetmap.org Git - osqa.git/blob - forum/skins/default/templates/user_stats.html
user profile fixes
[osqa.git] / forum / skins / default / templates / user_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_extended question %}
23                     {% endfor %}
24                 </div>
25                 <br clear="all"/>
26         <a name="answers"></a>
27         {% spaceless %}
28             <h2>
29                 {% blocktrans count answered_questions|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 answered_question in answered_questions %}
38             <div class="answer-summary">
39                 <a title="{{answered_question.summary|collapse}}" 
40                     href="{{ answered_question.get_absolute_url }}#{{answered_question.answer_id}}">
41                     <span class="answer-votes {% if answered_question.accepted %}answered-accepted{% endif %}" 
42                                                 title="{% blocktrans with answered_question.vote_count as vote_count %}the answer has been voted for {{ vote_count }} times{% endblocktrans %} {% if answered_question.accepted %}{% trans "this answer has been selected as correct" %}{%endif%}">
43                         {{ answered_question.vote_count }}
44                     </span>
45                 </a>
46                 <div class="answer-link">
47                     {% spaceless %}
48                     <a href="{{ answered_question.get_absolute_url }}#{{answered_question.answer_id}}">{{answered_question.title}}</a> 
49                     {% endspaceless %}
50                     {% if answered_question.comment_count %}
51                     <span>
52                                     {% blocktrans count answered_question.comment_count as comment_count %}
53                     (one comment)
54                     {% plural %}
55                     the answer has been commented {{comment_count}} times
56                     {% endblocktrans %}
57                     </span> 
58                     {% endif %}
59                 </div>
60             </div>
61             {% endfor %}
62         </div>
63         <br/>
64         <a name="votes"></a>
65         {% spaceless %}
66             <h2>
67                 {% blocktrans count total_votes as cnt %}
68                     <span class="count">1</span> Vote
69                 {% plural %}
70                     <span class="count">{{cnt}}</span> Votes
71                 {% endblocktrans %}
72             </h2>
73         {% endspaceless %}
74         <div class="user-stats-table">
75             <table>
76                 <tr>
77                     <td width="60">
78                         <img style="cursor: default;" src="{% media  "/media/images/vote-arrow-up-on.png" %}" alt="{% trans "thumb up" %}" />
79                             <span title="{% trans "user has voted up this many times" %}" class="vote-count">{{up_votes}}</span>
80
81                     </td>
82                     <td width="60">
83                         <img style="cursor: default;" src="{% media  "/media/images/vote-arrow-down-on.png" %}" alt="{% trans "thumb down" %}" />
84                             <span title="{% trans "user voted down this many times" %}" class="vote-count">{{down_votes}}</span>
85
86                     </td>
87                 </tr>
88             </table>
89         </div>
90         <a name="tags"></a>
91         {% spaceless %}
92             <h2>
93                 {% blocktrans count user_tags|length as counter %}
94                     <span class="count">1</span> Tag
95                 {% plural %}
96                     <span class="count">{{counter}}</span> Tags
97                 {% endblocktrans %}
98             </h2>
99         {% endspaceless %}
100         <div class="user-stats-table">
101             <table class="tags">
102                 <tr>
103                     <td width="180" valign="top">
104                         {% for tag in user_tags%}
105                         <a rel="tag" 
106                                                         title="{% blocktrans with tag.name as tag_name %}see other questions with {{view_user}}'s contributions tagged '{{ tag_name }}' {% endblocktrans %}" 
107                                                         href="{% url tag_questions tag|urlencode %}?user={{view_user.username}}">{{tag.name}}</a>
108                         <span class="tag-number">&#215; {{ tag.user_tag_usage_count|intcomma }}</span><br/>
109                             {% if forloop.counter|divisibleby:"10" %}
110                                 </td>
111                                 <td width="180"  valign="top">
112                             {% endif %}
113                         {% endfor %}
114                     </td>
115                 </tr>
116             </table>
117         </div>
118         <a name="badges"></a>
119         {% spaceless %}
120         <h2>
121             {% blocktrans count total_awards as counter %}
122             <span class="count">1</span> Badge
123             {% plural %}
124             <span class="count">{{counter}}</span> Badges
125             {% endblocktrans %}
126         </h2>
127         {% endspaceless %}
128         <div class="user-stats-table">
129             <table>
130                 <tr>
131                     <td width="180" style="line-height:35px">
132                         {% for award in awards %}
133                             <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/>
134                             {% if forloop.counter|divisibleby:"6" %}
135                                 </td>
136                                 <td width="180" style="line-height:35px">
137                             {% endif %}
138                         {% endfor %}
139                     </td>
140                 </tr>
141             </table>
142         </div>
143 {% endblock %}
144 <!-- end user_stats.html -->