]> git.openstreetmap.org Git - osqa.git/blob - forum/skins/default/templates/users/stats.html
Fixes OSQA 413, 414, 415, 416, 417 (patches from mathieu Lafon) and 420 /patch by...
[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.paginator.count as counter %}
14                 <span class="count">{{counter}}</span> Question
15                 {% plural %}
16                 <span class="count">{{counter}}</span> Questions
17                 {% endblocktrans %}
18                 <a class="feed-icon" style="background-image:url('{% media "media/images/feed-icon-small.png" %}');"
19                     href="{{ view_user.get_asked_url }}?type=rss" title="{% trans "subscribe to question RSS feed" %}"></a>
20             </h2>
21         {% endspaceless %}
22         <div>{{ questions.paginator.sort_tabs }}</div>
23                 <div id="listA" class="user-stats-table">
24                     {% for question in questions.paginator.page %}
25                         {% question_list_item question favorite_count=yes signature_type=badges %}
26                     {% endfor %}
27                 </div>
28                 <br clear="all"/>
29                 <div class="pager">{{ questions.paginator.page_numbers }}</div>
30                 <br clear="all"/>
31
32         <a name="answers"></a>
33         {% spaceless %}
34             <h2>
35                 {% blocktrans count answers.paginator.count as counter %}
36                 <span class="count">{{counter}}</span> Answer
37                 {% plural %}
38                 <span class="count">{{counter}}</span> Answers
39                 {% endblocktrans %}
40             </h2>
41         {% endspaceless %}
42         <div>{{ answers.paginator.sort_tabs }}</div>
43         <div class="user-stats-table">
44             {% for answer in answers.paginator.page %}
45             <div class="answer-summary">
46                 <a title="{{answer.question.title}}"
47                     href="{{ answer.get_absolute_url }}">
48                     <span class="{% if answer.nis.accepted %}answered-accepted {% endif %} answer-votes" 
49                                                 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%}">
50                         {{ answer.score }}
51                     </span>
52                 </a>
53                 <div class="answer-link">
54                     {% spaceless %}
55                     <a href="{{ answer.get_absolute_url }}">{{answer.headline}}</a>
56                     {% endspaceless %}
57                 </div>
58             </div>
59             {% endfor %}
60         </div>
61         <br clear="all"/>
62                 <div class="pager">{{ answers.paginator.page_numbers }}</div>
63         <br clear="all"/>
64         <a name="votes"></a>
65         {% spaceless %}
66             <h2>
67                 {% blocktrans count total_votes as cnt %}
68                     <span class="count">{{cnt}}</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">{{counter}}</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 style="vertical-align: top;">
103                     <td valign="top" style="padding-right: 20px;">
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">{{counter}}</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 style="vertical-align: top;">
131                     <td style="line-height:35px; padding-right: 20px;">
132                         {% for award, count in awards %}
133                             <a href="{% url badges %}{{award.id}}/{{award.name|slugify}}" title="{{ award.description }}" class="medal"><span class="badge{{ award.type }}">&#9679;</span>&nbsp;{{ award.name }}</a><span class="tag-number"> &#215; {{ 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 -->