]> git.openstreetmap.org Git - osqa.git/blobdiff - forum/skins/default/templates/user_stats.html
fix in css, answered questions were not being properly highlighted
[osqa.git] / forum / skins / default / templates / user_stats.html
index a3f88131b87e93e75cc35eeaaa1f3d45e8ee9b1f..96a1f36d17723a57b500ce098baf08becd422e53 100644 (file)
@@ -4,6 +4,7 @@
 {% load extra_tags %}
 {% load extra_filters %}
 {% load humanize %}
+{% load question_list_tags %}
                {% block usercontent %}
        
         <a name="questions"></a>
                 {% endblocktrans %}
             </h2>
         {% endspaceless %}
-               {% include "users_questions.html" %}
+               <div class="user-stats-table">
+                   {% for question in questions %}
+                       {% question_list_item question favorite_count=yes signature_type=badges %}
+                   {% endfor %}
+               </div>
+               <br clear="all"/>
         <a name="answers"></a>
         {% spaceless %}
             <h2>
-                {% blocktrans count answered_questions|length as counter %}
+                {% blocktrans count answers|length as counter %}
                 <span class="count">1</span> Answer
                 {% plural %}
                 <span class="count">{{counter}}</span> Answers
             </h2>
         {% endspaceless %}
         <div class="user-stats-table">
-            {% for answered_question in answered_questions %}
+            {% for answer in answers %}
             <div class="answer-summary">
-                <a title="{{answered_question.summary|collapse}}" 
-                    href="{% url question answered_question.id %}{{answered_question.title|slugify}}#{{answered_question.answer_id}}">
-                    <span class="answer-votes {% if answered_question.accepted %}answered-accepted{% endif %}
-                                               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%}">
-                        {{ answered_question.vote_count }}
+                <a title="{{answer.question.title}}"
+                    href="{{ answer.get_absolute_url }}">
+                    <span class="{% if answer.accepted %}answered-accepted {% endif %} answer-votes
+                                               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%}">
+                        {{ answer.score }}
                     </span>
                 </a>
                 <div class="answer-link">
                     {% spaceless %}
-                    <a href="{% url question answered_question.id %}{{answered_question.title|slugify}}#{{answered_question.answer_id}}">{{answered_question.title}}</a> 
+                    <a href="{{ answer.get_absolute_url }}#{{answer.id}}">{{answer.question.title}}</a>
                     {% endspaceless %}
-                    {% if answered_question.comment_count %}
+                    {% if answer.comment_count %}
                     <span>
-                                   {% blocktrans count answered_question.comment_count as comment_count %}
+                                   {% blocktrans count answer.comment_count as comment_count %}
                     (one comment)
                     {% plural %}
                     the answer has been commented {{comment_count}} times
                 <tr>
                     <td width="180" style="line-height:35px">
                         {% for award in awards %}
-                            <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"> &#x2715; {{ award.count|intcomma }}</span><br/>
+                            <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/>
                             {% if forloop.counter|divisibleby:"6" %}
                                 </td>
                                 <td width="180" style="line-height:35px">