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