]> git.openstreetmap.org Git - osqa.git/blobdiff - forum/skins/default/templates/users/stats.html
show the badges count on the user profile page only if the count is not equal to 1
[osqa.git] / forum / skins / default / templates / users / stats.html
index 7acacbd6db260740b200151db4133a9f40339046..fe34b19f3010f415629ef5ca8d8eb72e366a7b0f 100644 (file)
@@ -11,7 +11,7 @@
         {% spaceless %}
             <h2>
                 {% blocktrans count questions.paginator.count as counter %}
-                <span class="count">1</span> Question
+                <span class="count">{{counter}}</span> Question
                 {% plural %}
                 <span class="count">{{counter}}</span> Questions
                 {% endblocktrans %}
@@ -33,7 +33,7 @@
         {% spaceless %}
             <h2>
                 {% blocktrans count answers.paginator.count as counter %}
-                <span class="count">1</span> Answer
+                <span class="count">{{counter}}</span> Answer
                 {% plural %}
                 <span class="count">{{counter}}</span> Answers
                 {% endblocktrans %}
@@ -65,7 +65,7 @@
         {% spaceless %}
             <h2>
                 {% blocktrans count total_votes as cnt %}
-                    <span class="count">1</span> Vote
+                    <span class="count">{{cnt}}</span> Vote
                 {% plural %}
                     <span class="count">{{cnt}}</span> Votes
                 {% endblocktrans %}
@@ -91,7 +91,7 @@
         {% spaceless %}
             <h2>
                 {% blocktrans count user_tags|length as counter %}
-                    <span class="count">1</span> Tag
+                    <span class="count">{{counter}}</span> Tag
                 {% plural %}
                     <span class="count">{{counter}}</span> Tags
                 {% endblocktrans %}
                     <td valign="top" style="padding-right: 20px;">
                         {% for tag in user_tags%}
                         <a rel="tag" 
-                                                       title="{% blocktrans with tag.name as tag_name %}see other questions with {{view_user}}'s contributions tagged '{{ tag_name }}' {% endblocktrans %}" 
+                            class="tag-link-{{ tag.name }}"
+                                                       title="{% blocktrans with tag.name as tag_name %}see other questions with {{view_user}}'s contributions tagged '{{ tag_name }}' {% endblocktrans %}"
                                                        href="{% url tag_questions tag|urlencode %}?user={{view_user.username}}">{{tag.name}}</a>
                         <span class="tag-number">&#215; {{ tag.user_tag_usage_count|intcomma }}</span><br/>
                             {% if forloop.counter|divisibleby:"10" %}
         {% spaceless %}
         <h2>
             {% blocktrans count total_awards as counter %}
-            <span class="count">1</span> Badge
+            <span class="count">{{counter}}</span> Badge
             {% plural %}
             <span class="count">{{counter}}</span> Badges
             {% endblocktrans %}
                 <tr style="vertical-align: top;">
                     <td style="line-height:35px; padding-right: 20px;">
                         {% for award, count in awards %}
-                            <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/>
+                            {% spaceless %}
+                            <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>
+                            {% ifnotequal count 1 %}
+                                <span class="tag-number"> &#215; {{ count|intcomma }}</span>
+                            {% endifnotequal %}<br/>
                             {% if forloop.counter|divisibleby:"6" %}
                                 </td>
                                 <td width="180" style="line-height:35px">
                             {% endif %}
+                            {% endspaceless %}
                         {% endfor %}
                     </td>
                 </tr>