]> git.openstreetmap.org Git - osqa.git/blob - forum/skins/default/templates/users/stats.html
OSQA-600, notification templates unicode fixes.
[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                             class="tag-link-{{ tag.name }}"
107                                                         title="{% blocktrans with tag.name as tag_name %}see other questions with {{view_user}}'s contributions tagged '{{ tag_name }}' {% endblocktrans %}"
108                                                         href="{% url tag_questions tag|urlencode %}?user={{view_user.username}}">{{tag.name}}</a>
109                         <span class="tag-number">&#215; {{ tag.user_tag_usage_count|intcomma }}</span><br/>
110                             {% if forloop.counter|divisibleby:"10" %}
111                                 </td>
112                                 <td width="180"  valign="top">
113                             {% endif %}
114                         {% endfor %}
115                     </td>
116                 </tr>
117             </table>
118         </div>
119         <a name="badges"></a>
120         {% spaceless %}
121         <h2>
122             {% blocktrans count total_awards as counter %}
123             <span class="count">{{counter}}</span> Badge
124             {% plural %}
125             <span class="count">{{counter}}</span> Badges
126             {% endblocktrans %}
127         </h2>
128         {% endspaceless %}
129         <div class="user-stats-table">
130             <table>
131                 <tr style="vertical-align: top;">
132                     <td style="line-height:35px; padding-right: 20px;">
133                         {% for award, count in awards %}
134                             <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/>
135                             {% if forloop.counter|divisibleby:"6" %}
136                                 </td>
137                                 <td width="180" style="line-height:35px">
138                             {% endif %}
139                         {% endfor %}
140                     </td>
141                 </tr>
142             </table>
143         </div>
144 {% endblock %}
145 <!-- end user_stats.html -->